[BUGFIX] 0 value in loadavg
This commit is contained in:
parent
0c9860192b
commit
e99c38970a
@ -61,16 +61,10 @@ define(['snabbdom', 'helper', 'moment'], function (V, helper, moment) {
|
||||
};
|
||||
|
||||
self.showLoad = function showLoad(d) {
|
||||
if (!d.loadavg) {
|
||||
return undefined;
|
||||
}
|
||||
return showBar(d.loadavg.toFixed(2), d.loadavg % 1, d.loadavg >= d.nproc);
|
||||
};
|
||||
|
||||
self.showRAM = function showRAM(d) {
|
||||
if (!d.memory_usage) {
|
||||
return undefined;
|
||||
}
|
||||
return showBar(Math.round(d.memory_usage * 100) + ' %', d.memory_usage, d.memory_usage >= 0.8);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user