Merge pull request #387 from bbernhard/fix_iface_down
small improvement in pi-hole module
This commit is contained in:
commit
9d9bf0fa8e
1 changed files with 5 additions and 5 deletions
|
@ -30,7 +30,7 @@ class Module(bumblebee.engine.Module):
|
||||||
|
|
||||||
def pihole_status(self, widget):
|
def pihole_status(self, widget):
|
||||||
if self._pihole_status is None:
|
if self._pihole_status is None:
|
||||||
return "unknown"
|
return "pi-hole unknown"
|
||||||
return "pi-hole " + ("up/" + self._ads_blocked_today if self._pihole_status else "down")
|
return "pi-hole " + ("up/" + self._ads_blocked_today if self._pihole_status else "down")
|
||||||
|
|
||||||
def update_pihole_status(self):
|
def update_pihole_status(self):
|
||||||
|
@ -61,8 +61,8 @@ class Module(bumblebee.engine.Module):
|
||||||
self.update_pihole_status()
|
self.update_pihole_status()
|
||||||
|
|
||||||
def state(self, widget):
|
def state(self, widget):
|
||||||
if self._pihole_status:
|
if self._pihole_status is None:
|
||||||
return ["enabled"]
|
|
||||||
elif not self._pihole_status:
|
|
||||||
return ["disabled", "warning"]
|
|
||||||
return []
|
return []
|
||||||
|
elif self._pihole_status:
|
||||||
|
return ["enabled"]
|
||||||
|
return ["disabled", "warning"]
|
||||||
|
|
Loading…
Reference in a new issue