提交 ca563cac 编写于 作者: N nicolargo

Merge branch 'issue1126' into develop

......@@ -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):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册