diff --git a/wolbox/static/style.css b/wolbox/static/style.css index 033b576..a203d2d 100644 --- a/wolbox/static/style.css +++ b/wolbox/static/style.css @@ -133,8 +133,10 @@ input[type=submit] { .Up { background-color: #2fcc2e; + color: #000000; } .Down { background-color: #cc2f2e; + color: #ffffff; } diff --git a/wolbox/wolbox.py b/wolbox/wolbox.py index 28c42b6..fbb4031 100644 --- a/wolbox/wolbox.py +++ b/wolbox/wolbox.py @@ -56,11 +56,11 @@ def discover(): for h in hosts: h["status"] = "Down" for d in discovered: - if d == "stats" or d == "runtime": - continue - for h in hosts: - fqdn = h["hostname"]+"."+domain - hostinfo = discovered[d]["hostname"] - discovered_host = next(iter(hostinfo), {"name": "none"})["name"] - if fqdn.lower() == discovered_host.lower(): - h["status"] = "Up" + if isinstance(discovered[d], dict): + if "hostname" in discovered[d]: + for h in hosts: + fqdn = h["hostname"] + "." + domain + hostinfo = discovered[d]["hostname"] + discovered_host = next(iter(hostinfo), {"name": "none"})["name"] + if fqdn.lower() == discovered_host.lower(): + h["status"] = "Up"