mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-03 07:03:40 +03:00
Merge branch 'issue1126' into develop
This commit is contained in:
commit
ca563cac7a
1
NEWS
1
NEWS
@ -17,6 +17,7 @@ Bugs corrected:
|
||||
* GPU plugin. <class 'TypeError'>: ... not JSON serializable"> (issue #1112)
|
||||
* PermissionError on macOS (issue #1120)
|
||||
* Cant move up or down in glances --browser (issue #1113)
|
||||
* Unable to give aliases to or hide network interfaces and disks (issue #1126)
|
||||
|
||||
Installation:
|
||||
|
||||
|
@ -722,13 +722,15 @@ class GlancesPlugin(object):
|
||||
hide=sda2,sda5,loop.*
|
||||
"""
|
||||
# TODO: possible optimisation: create a re.compile list
|
||||
return not all(j is None for j in [re.match(i, value) for i in self.get_conf_value('hide', header=header)])
|
||||
return not all(j is None for j in [re.match(i, value.lower()) for i in self.get_conf_value('hide', header=header)])
|
||||
|
||||
def has_alias(self, header):
|
||||
"""Return the alias name for the relative header or None if nonexist."""
|
||||
try:
|
||||
return self._limits[self.plugin_name + '_' + header + '_' + 'alias'][0]
|
||||
# Force to lower case (issue #1126)
|
||||
return self._limits[self.plugin_name + '_' + header.lower() + '_' + 'alias'][0]
|
||||
except (KeyError, IndexError):
|
||||
# logger.debug("No alias found for {}".format(header))
|
||||
return None
|
||||
|
||||
def msg_curse(self, args=None, max_width=None):
|
||||
|
Loading…
Reference in New Issue
Block a user