Merge branch 'patch-2' of git://github.com/batman-nair/bumblebee-status into batman-nair-patch-2
This commit is contained in:
commit
b8bfc5b889
1 changed files with 5 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
||||||
Parameters:
|
Parameters:
|
||||||
* traffic.exclude: Comma-separated list of interface prefixes to exclude (defaults to "lo,virbr,docker,vboxnet,veth")
|
* traffic.exclude: Comma-separated list of interface prefixes to exclude (defaults to "lo,virbr,docker,vboxnet,veth")
|
||||||
* traffic.states: Comma-separated list of states to show (prefix with "^" to invert - i.e. ^down -> show all devices that are not in state down)
|
* traffic.states: Comma-separated list of states to show (prefix with "^" to invert - i.e. ^down -> show all devices that are not in state down)
|
||||||
|
* traffic.showname: set as False to hide network interface name
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
@ -23,6 +24,7 @@ class Module(bumblebee.engine.Module):
|
||||||
self._exclude = tuple(filter(len, self.parameter("exclude", "lo,virbr,docker,vboxnet,veth").split(",")))
|
self._exclude = tuple(filter(len, self.parameter("exclude", "lo,virbr,docker,vboxnet,veth").split(",")))
|
||||||
self._status = ""
|
self._status = ""
|
||||||
|
|
||||||
|
self._showname = self.parameter("showname", "True")
|
||||||
self._prev = {}
|
self._prev = {}
|
||||||
self._states = {}
|
self._states = {}
|
||||||
self._states["include"] = []
|
self._states["include"] = []
|
||||||
|
@ -86,6 +88,7 @@ class Module(bumblebee.engine.Module):
|
||||||
|
|
||||||
name = "traffic-{}".format(interface)
|
name = "traffic-{}".format(interface)
|
||||||
|
|
||||||
|
if self._showname != "False":
|
||||||
self.create_widget(widgets, name, interface)
|
self.create_widget(widgets, name, interface)
|
||||||
|
|
||||||
for direction in ["rx", "tx"]:
|
for direction in ["rx", "tx"]:
|
||||||
|
|
Loading…
Reference in a new issue