Commit 5f9d66e5 by Kálmán Viktor

dashboard: display parent tempalte in vm/template detail

parent aef328d4
...@@ -552,7 +552,8 @@ class TemplateForm(forms.ModelForm): ...@@ -552,7 +552,8 @@ class TemplateForm(forms.ModelForm):
exclude = ('state', 'disks', ) exclude = ('state', 'disks', )
widgets = { widgets = {
'system': forms.TextInput, 'system': forms.TextInput,
'max_ram_size': forms.HiddenInput 'max_ram_size': forms.HiddenInput,
'parent': forms.Select(attrs={'disabled': ""}),
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
{% csrf_token %} {% csrf_token %}
{{ form.name|as_crispy_field }} {{ form.name|as_crispy_field }}
{{ form.parent|as_crispy_field }}
<fieldset class="resources-sliders"> <fieldset class="resources-sliders">
<legend>{% trans "Resource configuration" %}</legend> <legend>{% trans "Resource configuration" %}</legend>
......
...@@ -90,6 +90,16 @@ ...@@ -90,6 +90,16 @@
</div> </div>
</form> </form>
</div><!-- id:vm-details-tags --> </div><!-- id:vm-details-tags -->
<dl>
<dt>{% trans "Template" %}:</dt>
<dd>
{% if instance.template %}
{{ instance.template.name }}
{% else %}
-
{% endif %}
</dd>
</dl>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
{% if graphite_enabled %} {% if graphite_enabled %}
......
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