mirror of https://github.com/nicolargo/glances.git
Correct issue with hide on diskio
This commit is contained in:
parent
e660520eb2
commit
e7bd8d4768
|
|
@ -245,7 +245,7 @@ class DiskioPlugin(GlancesPluginModel):
|
|||
# Disk list (sorted by name)
|
||||
for i in self.sorted_stats():
|
||||
# Hide stats if never be different from 0 (issue #1787)
|
||||
if all(self.get_views(item=i[self.get_key()], key=f, option='hidden') for f in self.hide_zero_fields):
|
||||
if self.hide_zero and all(i.get(f) == 0 for f in self.hide_zero_fields):
|
||||
continue
|
||||
# Is there an alias for the disk name ?
|
||||
disk_name = i['alias'] if 'alias' in i else i['disk_name']
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ class NetworkPlugin(GlancesPluginModel):
|
|||
if ('is_up' in i) and (i['is_up'] is False):
|
||||
continue
|
||||
# Hide stats if never be different from 0 (issue #1787)
|
||||
if all(self.get_views(item=i[self.get_key()], key=f, option='hidden') for f in self.hide_zero_fields):
|
||||
if self.hide_zero and all(i.get(f) == 0 for f in self.hide_zero_fields):
|
||||
continue
|
||||
# Format stats
|
||||
# Is there an alias for the interface name ?
|
||||
|
|
|
|||
|
|
@ -580,7 +580,6 @@ class GlancesPluginModel:
|
|||
item_views = self.views
|
||||
else:
|
||||
item_views = self.views[item]
|
||||
|
||||
if key is None:
|
||||
return item_views
|
||||
if key not in item_views:
|
||||
|
|
|
|||
Loading…
Reference in New Issue