forked from 3wordchant/capsul-flask
fine-tuning vm list page ip display depending on state
This commit is contained in:
parent
5d3dbac9ba
commit
1de0388df2
@ -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
|
||||
|
@ -333,6 +333,9 @@ pre.code.wrap {
|
||||
color: #069e5f;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
color: rgba(221, 169, 56, 0.8);
|
||||
}
|
||||
|
||||
footer, p {
|
||||
text-align: left;
|
||||
|
Loading…
Reference in New Issue
Block a user