提交 4478faf9 编写于 作者: N nicolargo

Solve issue with hide and upper case in the network interface (issue #1126)

上级 7e9b6612
...@@ -17,6 +17,7 @@ Bugs corrected: ...@@ -17,6 +17,7 @@ Bugs corrected:
* GPU plugin. <class 'TypeError'>: ... not JSON serializable"> (issue #1112) * GPU plugin. <class 'TypeError'>: ... not JSON serializable"> (issue #1112)
* PermissionError on macOS (issue #1120) * PermissionError on macOS (issue #1120)
* Cant move up or down in glances --browser (issue #1113) * Cant move up or down in glances --browser (issue #1113)
* Unable to give aliases to or hide network interfaces and disks (issue #1126)
Installation: Installation:
......
...@@ -122,8 +122,6 @@ tx_critical=90 ...@@ -122,8 +122,6 @@ tx_critical=90
#hide=docker.*,lo #hide=docker.*,lo
# WLAN 0 alias # WLAN 0 alias
#wlan0_alias=Wireless IF #wlan0_alias=Wireless IF
Ethernet 1_alias=Eth1
hide=Eth.*
# It is possible to overwrite the bitrate thresholds per interface # It is possible to overwrite the bitrate thresholds per interface
# WLAN 0 Default limits (in bits per second aka bps) for interface bitrate # WLAN 0 Default limits (in bits per second aka bps) for interface bitrate
#wlan0_rx_careful=4000000 #wlan0_rx_careful=4000000
......
...@@ -722,7 +722,7 @@ class GlancesPlugin(object): ...@@ -722,7 +722,7 @@ class GlancesPlugin(object):
hide=sda2,sda5,loop.* hide=sda2,sda5,loop.*
""" """
# TODO: possible optimisation: create a re.compile list # 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): def has_alias(self, header):
"""Return the alias name for the relative header or None if nonexist.""" """Return the alias name for the relative header or None if nonexist."""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册