diff --git a/capsulflask/console.py b/capsulflask/console.py index 402f687..721538a 100644 --- a/capsulflask/console.py +++ b/capsulflask/console.py @@ -67,13 +67,14 @@ def index(): vm["state"] = "unknown" + vms = list(map( lambda x: dict( id=x['id'], size=x['size'], state=x['state'], - ipv4=(x['ipv4'] if x['ipv4'] else "..booting.."), - ipv4_status=("ok" if x['ipv4'] else "waiting-pulse"), + ipv4=(x['ipv4'] if x['ipv4'] else ("..booting.." if vm["state"] == "running" else "unknown")), + ipv4_status=("ok" if x['ipv4'] else ("waiting-pulse" if vm["state"] == "running" else "yellow"), os=x['os'], created=x['created'].strftime("%b %d %Y") ), vms diff --git a/capsulflask/static/style.css b/capsulflask/static/style.css index 925ec6c..34321e6 100644 --- a/capsulflask/static/style.css +++ b/capsulflask/static/style.css @@ -333,6 +333,9 @@ pre.code.wrap { color: #069e5f; } +.yellow { + color: rgba(221, 169, 56, 0.8); +} footer, p { text-align: left;