fix wrong var name
This commit is contained in:
parent
88905b944d
commit
70628039c4
@ -69,7 +69,7 @@ def index():
|
||||
|
||||
mappedVms = []
|
||||
for vm in vms:
|
||||
ip_display = x['ipv4']
|
||||
ip_display = vm['ipv4']
|
||||
if not ip_display:
|
||||
if vm["state"] == "running":
|
||||
ip_display = "..booting.."
|
||||
@ -77,20 +77,20 @@ def index():
|
||||
ip_display = "unknown"
|
||||
|
||||
ip_display_class = "ok"
|
||||
if not x['ipv4']:
|
||||
if not vm['ipv4']:
|
||||
if vm["state"] == "running":
|
||||
ip_display_class = "waiting-pulse"
|
||||
else:
|
||||
ip_display_class = "yellow"
|
||||
|
||||
mappedVms.append(dict(
|
||||
id=x['id'],
|
||||
size=x['size'],
|
||||
state=x['state'],
|
||||
id=vm['id'],
|
||||
size=vm['size'],
|
||||
state=vm['state'],
|
||||
ipv4=ip_display,
|
||||
ipv4_status=ip_display_class,
|
||||
os=x['os'],
|
||||
created=x['created'].strftime("%b %d %Y")
|
||||
os=vm['os'],
|
||||
created=vm['created'].strftime("%b %d %Y")
|
||||
))
|
||||
|
||||
return render_template("capsuls.html", vms=mappedVms, has_vms=len(vms) > 0, created=created)
|
||||
|
Loading…
Reference in New Issue
Block a user