Merge branch 'develop' into feature/search_autocomplete_haste
[ganeti_webmgr.git] / ganeti / templates / virtual_machine / edit_confirm.html
blob8d69d5cb084c77d6f2339ad307c0191fbf0d2df0
1 {% extends "menu_base.html" %}
2 {% load i18n %}
3 {% load webmgr_tags %}
4 {% block head %}
5 <style>
6 div.info {float:left;width:390px;margin:0px;}
7 #vm_summary {width:390px;float:left;margin-right:10px;}
8 #vm_summary h2 {margin-top:0px;}
9 #vm_summary h2 a {color:white;}
10 form {float:left;clear:left;}
11 form input.submit {margin:1em .5em 0px 0px;}
12 form input.save_reboot {width:10em;margin:1em .5em 0px 0px;}
13 </style>
14 {% endblock %}
15 {% block content %}
16 <h1>
17 {% if cluster_admin %}
18 <a class="breadcrumb" href="{% url cluster-detail cluster.slug %}#virtual_machines">{{cluster.hostname|abbreviate_fqdn}}</a>
19 {% else %}
20 <span class="breadcrumb">{{cluster.hostname|abbreviate_fqdn}}</span>
21 {% endif %}
22 : <a class="breadcrumb" href="{% url instance-detail cluster.slug instance.hostname %}">{{ instance.hostname }}</a>
23 : {% trans "Confirm Changes" %}
24 </h1>
26 <div id="vm_summary">
27 <table>
28 <h2><a href="{% url instance-detail cluster.slug instance.hostname %}">{{ instance.hostname }}</a></h2>
29 {% for k, v in instance_diff.items %}
30 <tr><th>{{ k }}</th><td>{{ v|capfirst }}</td></tr>
31 {% empty %}
32 <tr><td>{% trans "Nothing changed" %}.</td></tr>
33 {% endfor %}
34 </table>
35 </div>
36 {% with instance.info.status as status %}
37 {% ifequal status "running" %}
38 <div class="info">
39 <p><b style="color:red;">Warning:</b> In order for your changes to the instance to take effect, you must
40 first reboot the instance. Either click 'Save & Reboot', or click 'Save' and reboot at a later time.</p>
41 <br />
42 <p><b>Note:</b> Rebooting must be done through Ganeti or Ganeti Web Manager. Your changes will
43 not take effect if you reboot from within the instance.</p>
44 </div>
45 {% endifequal %}
46 <form method="post">
47 {% csrf_token %}
48 {{ form.rapi_dict }}
49 {{ form.errors }}
50 <input class="submit" type="submit" name="edit" value="{% trans "Edit" %}">
51 {% if instance_diff.items %}
52 {% ifequal status "running" %}
53 {% if power %}
54 <input class="save_reboot" type="submit" name="reboot" value="{% trans "Save & Reboot" %}">
55 {% endif %}
56 {% endifequal %}
57 <input class="submit" type="submit" name="save" value="{% trans "Save" %}">
58 {% endif %}
59 <input class="submit" type="submit" name="cancel" value="{% trans "Cancel" %}">
60 </form>
61 {% endwith %}
62 {% endblock %}