Merge tag '0.10.2'
[ganeti_webmgr.git] / ganeti_web / templates / ganeti / cluster / edit.html
blobd83cd0aa1de7ec7cf22f47e5da3ae11c8db172c7
1 {% extends "menu_base.html" %}
2 {% load i18n %}
3 {% block title %}
4 {% if cluster %}
5 {% trans "Edit" %} {{ cluster.slug }}
6 {% else %}
7 {% trans "Add a new cluster" %}
8 {% endif %}
9 {% endblock %}
11 {% block head %}
12 <link rel="stylesheet" type="text/css"
13 href="{{STATIC_URL}}/css/cluster_edit.css"/>
14 <link rel="stylesheet" type="text/css"
15 href="{{STATIC_URL}}/css/help_tips.css"/>
17 <!-- javascript includes -->
18 <script src="{{STATIC_URL}}/js/helpTips.js"></script>
20 <script type="text/javascript">
22 $(document).ready(function() {
23 /* run when document is fully loaded */
24 // init the help tips for the individ. form objects
25 initHelpTips('#clusterform');
26 });
28 </script>
29 {% endblock %}
31 {% block content %}
33 <h1 class="breadcrumb"><a href="{% url cluster-list %}">{% trans "Cluster" %}</a> :
34 {% if cluster %}
35 <a href="{% url cluster-detail cluster.slug %}">{{ cluster.hostname }}</a>
36 : {% trans "Edit" %}
37 {% else %}{% trans "Add" %}{% endif %}</h1>
39 <div id="clusterform">
40 <form method="post">
41 {% csrf_token %}
42 <fieldset class="first_fieldset">
43 {% if form.hostname.errors %}<p class="error">{{form.hostname.errors}}</p>{%endif%}
44 <p><label for="id_hostname" class="required">{{form.hostname.label}}:</label> {{form.hostname}}</p>
45 {% if cluster %}
46 {% if form.slug.errors %}<p class="error">{{form.slug.errors}}</p>{%endif%}
47 <p><label for="id_slug" class="required">{{form.slug.label}}:</label> {{form.slug}}</p>
48 {% endif %}
49 {% if form.port.errors %}<p class="error">{{form.port.errors}}</p>{%endif%}
50 <p><label for="id_port" class="required">{{form.port.label}}:</label> {{form.port}}</p>
51 {% if form.description.errors %}<p class="error">{{form.description.errors}}</p>{%endif%}
52 <p><label for="id_description">{{form.description.label}}:</label> {{form.description}}</p>
53 {% if form.username.errors %}<p class="error">{{form.username.errors}}</p>{%endif%}
54 <p><label for="id_username">{{form.username.label}}:</label> {{form.username}}</p>
55 {% if form.password.errors %}<p class="error">{{form.password.errors}}</p>{%endif%}
56 <p><label for="id_password">{{form.password.label}}:</label> {{form.password}}</p>
57 </fieldset>
59 <fieldset>
60 <legend>{% trans "Default Quota" %}</legend>
61 {% if form.virtual_cpus.errors %}<p class="error">{{form.hostname.errors}}</p>{%endif%}
62 <p><label for="id_virtual_cpus">{{form.virtual_cpus.label}}:</label> {{form.virtual_cpus}}</p>
63 {% if form.disk.errors %}<p class="error">{{form.hostname.errors}}</p>{%endif%}
64 <p><label for="id_disk">{{form.disk.label}}:</label> {{form.disk}}</p>
65 {% if form.ram.errors %}<p class="error">{{form.hostname.errors}}</p>{%endif%}
66 <p><label for="id_ram">{{form.ram.label}}:</label> {{form.ram}}</p>
67 </fieldset>
69 {% if cluster %}
70 <input class="submit" type="submit" value="{% trans 'Save' %}">
71 {% else %}
72 <input class="submit" type="submit" value="{% trans 'Add' %}">
73 {% endif %}
74 </form>
75 </div>
77 <div id="help" class="help_tip">
78 <h3></h3>
79 <div></div>
80 </div>
81 <div id="help-contents">
82 {% include "ganeti/helptips/cluster_edit.html" %}
83 </div>
85 {% endblock %}