diff --git a/instances/templates/instance.html b/instances/templates/instance.html
index b274f03..77f5791 100644
--- a/instances/templates/instance.html
+++ b/instances/templates/instance.html
@@ -529,6 +529,11 @@
{% trans "Options" %}
+
+
+ {% trans "Users" %}
+
+
{% endif %}
@@ -877,6 +882,13 @@
+
+
{% trans "Instance owners" %}
+ {% for userinstance in userinstances %}
+
{{ userinstance.user }}
+ {% endfor %}
+
+
{% endif %}
@@ -1272,7 +1284,7 @@
}
});
}
- if (~$.inArray(hash, ['#media', '#network', '#clone', '#autostart', '#xmledit', '#vncsettings', '#migrate', '#options'])) {
+ if (~$.inArray(hash, ['#media', '#network', '#clone', '#autostart', '#xmledit', '#vncsettings', '#migrate', '#options', '#users'])) {
var btnsect = $('#navbtn>li>a');
$(btnsect).each(function () {
if ($(this).attr('href') === '#settings') {
diff --git a/instances/views.py b/instances/views.py
index 5fcce4a..4b00ec9 100644
--- a/instances/views.py
+++ b/instances/views.py
@@ -302,6 +302,8 @@ def instance(request, compute_id, vname):
instance = Instance(compute_id=compute_id, name=vname, uuid=uuid)
instance.save()
+ userinstances = UserInstance.objects.filter(instance=instance).order_by('user__username')
+
if request.method == 'POST':
if 'poweron' in request.POST:
conn.start()