1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

instances view changed. memory usage converted to progress-bar. some bandi007 changes applied

This commit is contained in:
catborise 2018-07-18 10:08:02 +03:00
parent 6a7f30d4a6
commit 0778116a40
3 changed files with 14 additions and 8 deletions

View file

@ -41,11 +41,11 @@
<tr>
<th>#</th>
<th>Name<br>Description</th>
<th>Host<br>User</th>
<th>User</th>
<th>Status</th>
<th>VCPU</th>
<th>Memory<br>({% trans "MB" %})</th>
<th data-sortable="false" style="width:205px;">Actions & Usage</th>
<th data-sortable="false" style="width:205px;">Actions & Mem Usage</th>
</tr>
</thead>
<tbody class="searchable">
@ -64,14 +64,19 @@
</td>
<td style="text-align:center;">{{ host.3 }}</td>
<td style="text-align:right;">{{ host.4|filesizeformat }}</td>
<td style="text-align:left;">Mem Usage: {{ host.5 }}%</td>
<td style="text-align:left;">
<div class="progress-bar-success" role="progressbar" style="width: {{ host.5 }}%" aria-valuenow="{{ host.5 }}" aria-valuemin="0" aria-valuemax="100">{{ host.5 }}%</div>
</td>
</tr>
<!-- copied /-->
{% for vm, info in inst.items %}
<tr>
<td></td>
<td>{{ forloop.counter }} &emsp; <a href="{% url 'instance' host.0 vm %}">{{ vm }}</a><br><small><em>{{ info.title }}</em></small></td>
<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><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>{% ifequal info.status 1 %}
<span class="text-success">{% trans "Active" %}</span>
{% endifequal %}