mirror of
https://github.com/retspen/webvirtcloud
synced 2024-10-31 19:44:16 +00:00
show instance title in instances view for non superuser
This commit is contained in:
parent
e9e62e3c41
commit
6546fa2570
2 changed files with 12 additions and 2 deletions
|
@ -155,7 +155,7 @@
|
|||
<tbody class="searchable">
|
||||
{% for inst, vm in all_user_vms.items %}
|
||||
<tr>
|
||||
<td><a href="{% url 'instance' vm.compute_id vm.name %}">{{ vm.name }}</a></td>
|
||||
<td><a href="{% url 'instance' vm.compute_id vm.name %}">{{ vm.name }}</a><br><small><em>{{ vm.title }}</em></small></td>
|
||||
<td>{% ifequal vm.status 1 %}
|
||||
<span class="text-success">{% trans "Active" %}</span>
|
||||
{% endifequal %}
|
||||
|
|
|
@ -463,7 +463,17 @@ class wvmConnect(object):
|
|||
vcpu = cur_vcpu
|
||||
else:
|
||||
vcpu = util.get_xml_path(dom.XMLDesc(0), "/domain/vcpu")
|
||||
return {'name': dom.name(), 'status': dom.info()[0], 'uuid': dom.UUIDString(), 'vcpu': vcpu, 'memory': mem}
|
||||
title = util.get_xml_path(dom.XMLDesc(0), "/domain/title")
|
||||
description = util.get_xml_path(dom.XMLDesc(0), "/domain/description")
|
||||
return {
|
||||
'name': dom.name(),
|
||||
'status': dom.info()[0],
|
||||
'uuid': dom.UUIDString(),
|
||||
'vcpu': vcpu,
|
||||
'memory': mem,
|
||||
'title': title if title else '',
|
||||
'description': description if description else '',
|
||||
}
|
||||
|
||||
def close(self):
|
||||
"""Close connection"""
|
||||
|
|
Loading…
Reference in a new issue