Commit db901b28 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Display additional vm backend info in helpdesk app

Refs #3452
parent c957f753
......@@ -57,6 +57,9 @@
<dt>Build backendjobstatus</dt><dd>{{ vm.backendjobstatus }}</dd>
<dt>Build percentage</dt><dd>{{ vm.buildpercentage }}</dd>
</dl>
<dl class="dl-horizontal well">
{{ vm|backend_info|safe }}
</dl>
</div>
<div class="tab-pane" id="network{{ vm.pk }}">
<table class="table well">
......
......@@ -81,4 +81,16 @@ def network_nics(network, account, show_deleted=False):
nics = nics.filter(machine__deleted=False).distinct()
return nics
network_nics.is_safe = True
@register.filter(name="backend_info")
def backend_info(vm):
content = ""
backend = vm.backend
excluded = ['password_hash', 'hash', 'username']
for field in vm.backend._meta.fields:
if field.name in excluded:
continue
content += '<dt>Backend ' + field.name + '</dt><dd>' + \
str(getattr(backend, field.name)) + '</dd>'
return content
backend_info.is_safe = True
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 to comment