Merge branch 'bug/13917' into release/0.10.2
[ganeti_webmgr.git] / ganeti_web / templates / ganeti / importing / missing_db.html
blob77cf3c2de0f71282642aa66e4bbb9fc7fa2f5b33
1 {% extends "menu_base.html" %}
2 {% load i18n %}
3 {% block title %}{% trans "Import VMs" %}{% endblock %}
4 {% block head %}
5 <link rel="stylesheet" type="text/css" href="{{SITE_ROOT}}/object_permissions_media/css/form.css"/>
6 <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.multi_checkbox_selector.js"></script>
7 <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.tablesorter.min.js"></script>
8 <script type="text/javascript" src="{{SITE_ROOT}}/object_permissions_media/js/autocomplete_user_search.js"></script>
9 <script type="text/javascript">
10 $(document).ready(function() {
11 $("#missing_form").select_all();
12 $("#orphanlist").tablesorter({
13 headers: {
14 0: { sorter: 'false' },
16 });
17 autocomplete_user_search($("#id_owner"),'{% url owner-search %}');
18 });
19 </script>
20 {% endblock %}
21 {% block content %}
22 <h1 class="breadcrumb"><span>{% trans "Admin" %}</span> : {% trans "Import Virtual Machines" %}</h1>
24 <p class="info">
25 {% trans "If you manually create virtual machines they will exist only in the ganeti cluster, and must be manually imported into Ganeti Web Manager's database." %}.
26 </p>
28 <form id="missing_form" action="{% url import-missing_db %}" method="post">{% csrf_token %}
29 {{form.errors}}
30 <div class="owner">{{form.owner.label}}: {{form.owner}}</div>
31 <input type="submit" value="{% trans "Import Selected" %}" {%if not vms%}disabled{%endif%}>
32 <table id="orphanlist" class="sorted">
33 <thead>
34 <tr>
35 <th></th>
36 <th>{% trans "Cluster" %}</th>
37 <th>{% trans "Hostname" %}</th>
38 </tr>
39 </thead>
40 <tbody id="orphans">
41 {% for vm in vms %}
42 <tr><td><input type="checkbox" name="virtual_machines" value="{{vm.0}}" /></td><td>{{vm.1}}</td><td>{{vm.2}}</td></tr>
43 {% empty %}
44 <tr><td colspan="3">{% trans "All virtual machines are synchronized" %}.</td></tr>
45 {% endfor %}
46 </tbody>
47 </table>
48 </form>
49 {% endblock %}