mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-28 11:41:46 +03:00
Merge pull request #657 from notFloran/hide-empty-sensors
Hide empty sensors in web ui
This commit is contained in:
commit
2905689749
@ -4,11 +4,13 @@ glancesApp.service('GlancesPluginSensors', function(GlancesPlugin) {
|
||||
this.sensors = [];
|
||||
|
||||
this.setData = function(data, views) {
|
||||
_.remove(data[_pluginName], function(sensor) {
|
||||
return sensor.type == "battery" && _.isArray(sensor.value) && _.isEmpty(sensor.value);
|
||||
data = data[_pluginName];
|
||||
|
||||
_.remove(data, function(sensor) {
|
||||
return (_.isArray(sensor.value) && _.isEmpty(sensor.value)) || sensor.value === 0;
|
||||
});
|
||||
|
||||
this.sensors = data[_pluginName];
|
||||
this.sensors = data;
|
||||
};
|
||||
|
||||
this.getAlert = function(sensor) {
|
||||
|
Loading…
Reference in New Issue
Block a user