Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
"""
Returns the CPU usage in percent
"""
- return 100 - self.data.cpu_idle
+ return 1 - self.data.cpu_idle
@property
def mem_usage(self):
// Updates the progressbar and sets a colour
updateProgressBar = function(e, percentage) {
// Set the value
- e.val(percentage);
+ e.val(percentage * 100);
// Remove all classes
e.removeClass("is-dark is-light is-danger is-warning is-success");
- if (percentage >= 90) {
+ if (percentage >= 0.9) {
e.addClass("is-danger");
- } else if (percentage >= 75) {
+ } else if (percentage >= 0.75) {
e.addClass("is-warning");
} else {