Commit e7ed8921 by Őry Máté

one: fix show.html if no firewall_host

parent 7e6a19f1
......@@ -116,6 +116,7 @@
</table>
</div>
</div>
{% if i.firewall_host %}
<div class="contentblock" id="ports">
<h2>{% trans "Port administration" %}</h2>
<div class="content">
......@@ -158,6 +159,7 @@
</form>
</div>
</div>
{% endif %}
</div>
<div class="boxes">
<div class="contentblock" id="vm-list">
......
......@@ -168,6 +168,10 @@ def vm_show(request, iid):
inst.update_state()
if inst.template.state == "SAVING":
inst.check_if_is_save_as_done()
try:
ports = inst.firewall_host.list_ports()
except:
ports = None
return render_to_response("show.html", RequestContext(request,{
'uri': inst.get_connect_uri(),
'state': inst.state,
......@@ -177,7 +181,7 @@ def vm_show(request, iid):
'instances': _list_instances(request),
'i': inst,
'booting' : not inst.active_since,
'ports': inst.firewall_host.list_ports()
'ports': ports,
}))
@require_safe
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment