2018-07-30 10:33:09 +00:00
|
|
|
{% load i18n %}
|
2020-06-04 12:22:55 +00:00
|
|
|
<table class="table table-hover sortable-theme-bootstrap" data-sortable>
|
2018-07-30 10:33:09 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-05-26 10:52:52 +00:00
|
|
|
<th scope="col">{% trans "Name" %}<br>{% trans "Description" %}</th>
|
|
|
|
<th scope="col">{% trans "Host" %}<br>{% trans "User"%}</th>
|
|
|
|
<th scope="col">{% trans "Status" %}</th>
|
|
|
|
<th scope="col">{% trans "VCPU" %}</th>
|
|
|
|
<th scope="col">{% trans "Memory" %}</th>
|
|
|
|
<th scope="col" style="width:200px;" data-sortable="false">{% trans "Actions" %}</th>
|
2018-07-30 10:33:09 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="searchable">
|
|
|
|
{% for host, inst in all_host_vms.items %}
|
2020-05-19 16:53:54 +00:00
|
|
|
{% for inst, vm in inst.items %}
|
2018-07-30 10:33:09 +00:00
|
|
|
<tr>
|
2020-06-16 12:57:50 +00:00
|
|
|
<td><a href="{% url 'instances:instance' host.0 inst %}">{{ inst }}</a><br><small><em>{{ info.title }}</em></small></td>
|
2018-07-30 10:33:09 +00:00
|
|
|
<td><a href="{% url 'overview' host.0 %}">{{ host.1 }}</a><br><small><em>{% if info.userinstances.count > 0 %}{{ info.userinstances.first_user.user.username }}{% if info.userinstances.count > 1 %} (+{{ info.userinstances.count|add:"-1" }}){% endif %}{% endif %}</em></small></td>
|
|
|
|
<td>
|
2020-06-04 12:40:57 +00:00
|
|
|
{% if vm.status == 1 %}<span class="text-success">{% trans "Active" %}</span>{% endif %}
|
|
|
|
{% if vm.status == 5 %}<span class="text-danger">{% trans "Off" %}</span>{% endif %}
|
|
|
|
{% if vm.status == 3 %}<span class="text-warning">{% trans "Suspend" %}</span>{% endif %}
|
2018-07-30 10:33:09 +00:00
|
|
|
</td>
|
2020-05-19 16:53:54 +00:00
|
|
|
<td>{{ vm.vcpu }}</td>
|
|
|
|
<td>{{ vm.memory|filesizeformat }}</td>
|
|
|
|
<td class="text-nowrap">
|
|
|
|
{% include "instance_actions.html" %}
|
2018-07-30 10:33:09 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|