Remove empty battery in the web ui

This commit is contained in:
Floran Brutel 2015-05-25 12:36:18 +02:00
parent 31de5b3b1c
commit 9e2a72245c

View File

@ -141,6 +141,10 @@ glancesApp.controller('statsController', function($scope, $http, $interval, $q,
}
}
_.remove(response['sensors'], function(sensor) {
return sensor.type == "battery" && _.isArray(sensor.value) && _.isEmpty(sensor.value);
});
$scope.is_bsd = response['system'].os_name === 'FreeBSD';
$scope.is_linux = response['system'].os_name === 'Linux';
$scope.is_mac = response['system'].os_name === 'Darwin';