Merge branch 'bug/13917' into release/0.10.2
[ganeti_webmgr.git] / ganeti_web / templates / ganeti / vm_template / detail.html
blob6a3395bace6d16131f9d5f2e5a3d8c90606ea4c0
1 {% extends "menu_base.html" %}
2 {% load i18n %}
3 {% load webmgr_tags %}
5 {% block title %}{% trans "Template" %}{% endblock title %}
6 {% block head %}
7 <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.ajax.delete.js"></script>
8 <script type="text/javascript">
9 $(document).ready(function() {
10 $("a.delete").live("click", function(){
11 if (confirm("{% trans 'Are you sure you want to delete this template' %}?")) {
12 $("a.delete").text("{% trans 'Deleting' %}...");
13 $("a.delete").removeAttr("href");
14 $("a.delete").addClass("deleting");
15 $("a.delete").removeClass("delete");
17 var href = "{% url template-delete cluster template %}";
18 $.delete_(href, function(data){
19 window.location = "{% url template-list %}";
20 });
22 return false;
23 });
24 });
25 </script>
26 {% endblock head %}
27 {% block content %}
28 <h1 class="breadcrumb">
29 <a href="{% url template-list %}">{% trans "Template" %}</a>
30 : {{template.template_name}}
31 </h1>
32 <ul id="actions">
33 <li>
34 <a class="button add" href="{% url instance-create-from-template cluster template %}">
35 {% trans "Create VM" %}
36 </a>
37 </li>
38 <li>
39 <a class="button edit" href="{% url template-edit cluster template %}">
40 {% trans "Edit" %}
41 </a>
42 </li>
43 <li>
44 <a class="button edit" href="{% url template-copy cluster template %}">
45 {% trans "Copy" %}
46 </a>
47 </li>
48 <li>
49 <a class="button delete" href="{% url template-delete cluster template %}">
50 {% trans "Delete" %}
51 </a>
52 </li>
53 </ul>
55 <table class="horizontal overview">
56 <tr><th>{% trans "Description" %}</th><td>{{ template.description }}</td></tr>
57 <tr>
58 <th>{% trans "Operating System" %}</th>
59 <td>{{ template.os|render_os }}</td>
60 </tr>
61 <tr><th>{% trans "Autostart" %}</th><td>{{ template.start|checkmark }}</td></tr>
62 <tr><th>{% trans "DNS Name Check" %}</th><td>{{ template.name_check|checkmark }}</td></tr>
63 </table>
64 <h3>Hardware</h3>
65 <table class="horizontal">
66 <tr><th>{% trans "VCPUs" %}</th><td>{{ template.vcpus }}</td></tr>
67 {% if template.memory %}
68 <tr><th>{% trans "Memory (Min/Max)" %}</th><td>{{ template.minmem|render_storage }} / {{ template.memory|render_storage }}</td></tr>
69 {% endif %}
70 <tr><th>{% trans "NIC type" %}</th><td>{{ template.nic_type }}</td></tr>
71 <tr><th>{% trans "Disk Template" %}</th><td>{{ template.disk_template }}</td></tr>
72 </table>
74 {% if template.disks %}
75 <h3>{% trans "Disks" %}</h3>
76 <table>
77 <tr>
78 <th>{% trans "Disk" %}</th>
79 <th>{% trans "Type" %}</th>
80 <th>{% trans "Size" %}</th>
81 </tr>
82 {% for disk in template.disks %}
83 <tr>
84 <td>{% trans "disk/" %}{{ forloop.counter0 }}</td>
85 <td>{{ template.disk_type|default:"None" }}</td>
86 <td>{{ disk.size|render_storage }}</td>
87 </tr>
88 {% endfor %}
89 </table>
90 {% endif %}
92 {% if template.nics %}
93 <h3>{% trans "Network Devices" %}</h3>
94 <table>
95 <tr>
96 <th>{% trans "Nic" %}</th>
97 <th>{% trans "Mac" %}</th>
98 <th>{% trans "IP" %}</th>
99 <th>{% trans "Mode" %}</th>
100 <th>{% trans "Link" %}</th>
101 </tr>
102 {% for nic in template.nics %}
103 <tr>
104 <td>{% trans "nic" %}{{ forloop.counter0 }}</td>
105 <td>{{ nic.mac|default:"None" }}</td>
106 <td>{{ nic.ip|default:"None" }}</td>
107 <td>{{ nic.mode }}</td>
108 <td>{{ nic.link }}</td>
109 </tr>
110 {% endfor %}
111 </table>
112 {% endif %}
114 <h3>Hypervisor</h3>
115 <table class="horizontal">
116 <tr><th>{% trans "Boot Order" %}</th><td>{{ template.boot_order }}</td></tr>
117 <tr>
118 <th>{% trans "CDROM Image Path" %}</th>
119 <td>{{ template.cdrom_image_path }}</td>
120 </tr>
121 <tr>
122 <th>{% trans "CDROM 2 Image Path" %}</th>
123 <td>{{ template.cdrom2_image_path }}</td>
124 </tr>
125 <tr>
126 <th>{% trans "Kernel Path" %}</th><td>{{ template.kernel_path }}</td>
127 </tr>
128 <tr><th>{% trans "Root Path" %}</th><td>{{ template.root_path }}</td></tr>
129 <tr>
130 <th>{% trans "Serial Console" %}</th>
131 <td>{{ template.serial_console|checkmark }}</td>
132 </tr>
133 </table>
135 {% endblock content %}