root / templates / index.html @ 064ecc91
History | View | Annotate | Download (1.5 kB)
1 |
{% extends "base.html" %} |
---|---|
2 |
{% block title %}Overview{% endblock %} |
3 |
{% block extrahead %} |
4 |
<script type="text/javascript" src="/static/js/jquery.dataTables.js"></script> |
5 |
<script type="text/javascript"> |
6 |
$(document).ready( function(){
|
7 |
$('#cluster_overview_table').dataTable( {
|
8 |
"bJQueryUI": true,
|
9 |
"oLanguage": {
|
10 |
"sLengthMenu": 'Display <select><option value="25">25</option><option value="50">50</option><option value="-1">All</option></select> clusters'
|
11 |
},
|
12 |
"iDisplayLength": 25,
|
13 |
} );
|
14 |
});
|
15 |
</script>
|
16 |
{% endblock %} |
17 |
{% block content %} |
18 |
<h3>Clusters Overview</h3> |
19 |
<table class="display" width="100%" id="cluster_overview_table"> |
20 |
<thead>
|
21 |
<tr>
|
22 |
<th>Cluster</th> |
23 |
<th>Nodes</th> |
24 |
<th>Hypervisors</th> |
25 |
<th>Default hypervisor</th> |
26 |
<th>Master node</th> |
27 |
<th>Ganeti version</th> |
28 |
</tr>
|
29 |
</thead>
|
30 |
<tbody>
|
31 |
{% for cluster in object_list %} |
32 |
<tr class="GradeA"> |
33 |
<td>
|
34 |
<a href="{% url cluster_detail cluster.slug %}">{{ cluster.hostname }}</a> |
35 |
</td>
|
36 |
<td>
|
37 |
{% with cluster.get_cluster_nodes as nodes %} |
38 |
<!--{{ nodes|length }} node{{ nodes|pluralize }}-->
|
39 |
|
40 |
{% for node in nodes %} |
41 |
<div>{{ node.id }}</div> |
42 |
{% endfor %} |
43 |
|
44 |
{% endwith %} |
45 |
</td>
|
46 |
|
47 |
{% with cluster.get_cluster_info as info %} |
48 |
<td>{{ info.enabled_hypervisors|join:", " }}</td> |
49 |
<td>{{ info.default_hypervisor }}</td> |
50 |
<td>{{ info.master }}</td> |
51 |
<td>{{ info.software_version }}</td> |
52 |
{% endwith %} |
53 |
|
54 |
</tr>
|
55 |
|
56 |
{% endfor %} |
57 |
</tbody>
|
58 |
</table>
|
59 |
|
60 |
{% endblock %} |