mirror of https://github.com/nicolargo/glances.git
Revert some change on hide zero feature (need additional tests
This commit is contained in:
parent
1567c2db49
commit
3de1a25305
|
|
@ -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 self.hide_zero and all(i.get(f) == 0 for f in self.hide_zero_fields):
|
||||
if all(self.get_views(item=i[self.get_key()], key=f, option='hidden') 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 self.hide_zero and all(i.get(f) == 0 for f in self.hide_zero_fields):
|
||||
if all(self.get_views(item=i[self.get_key()], key=f, option='hidden') for f in self.hide_zero_fields):
|
||||
continue
|
||||
# Format stats
|
||||
# Is there an alias for the interface name ?
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ from glances.globals import (
|
|||
WINDOWS,
|
||||
auto_unit,
|
||||
pretty_date,
|
||||
split_esc,
|
||||
string_value_to_float,
|
||||
subsample,
|
||||
split_esc,
|
||||
)
|
||||
from glances.main import GlancesMain
|
||||
from glances.outputs.glances_bars import Bar
|
||||
|
|
|
|||
Loading…
Reference in New Issue