mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
instance template change to instances as group of hosts. bootstrap.min.css and js updated. some info added.
This commit is contained in:
parent
a933ffb00f
commit
20e8b876e4
8 changed files with 88 additions and 29 deletions
|
@ -37,21 +37,41 @@
|
|||
</div>
|
||||
{% else %}
|
||||
<table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable>
|
||||
<thead>
|
||||
<thead >
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name<br>Description</th>
|
||||
<th>Host<br>User</th>
|
||||
<th>Status</th>
|
||||
<th>VCPU</th>
|
||||
<th>Memory<br>({% trans "MB" %})</th>
|
||||
<th data-sortable="false" style="width:205px;">Actions</th>
|
||||
<th data-sortable="false" style="width:205px;">Actions & Usage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="searchable">
|
||||
{% for host, inst in all_host_vms.items %}
|
||||
<!-- copied /-->
|
||||
<!-- <tr style="font-size:16px;background-color: #5CB75C; color: white" > /-->
|
||||
<tr class="success" style="font-size:16px">
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td><a href="{% url 'overview' host.0 %}">{{ host.1 }}</a></td>
|
||||
<td></td>
|
||||
<td>{% ifequal host.2 1 %}<span class="label label-success">{% trans "Active" %}
|
||||
</span>{% endifequal %}
|
||||
{% ifequal host.2 2 %}<span class="label label-danger">{% trans "Not Active" %}
|
||||
</span>{% endifequal %}
|
||||
{% ifequal host.2 3 %}<span class="label label-danger">{% trans "Connection Failed" %}
|
||||
</span>{% endifequal %}
|
||||
</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>
|
||||
</tr>
|
||||
<!-- copied /-->
|
||||
{% for vm, info in inst.items %}
|
||||
<tr>
|
||||
<td><a href="{% url 'instance' host.0 vm %}">{{ vm }}</a><br><small><em>{{ info.title }}</em></small></td>
|
||||
<td></td>
|
||||
<td>{{ forloop.counter }}   <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>{% ifequal info.status 1 %}
|
||||
<span class="text-success">{% trans "Active" %}</span>
|
||||
|
@ -63,8 +83,8 @@
|
|||
<span class="text-warning">{% trans "Suspend" %}</span>
|
||||
{% endifequal %}
|
||||
</td>
|
||||
<td>{{ info.vcpu }}</td>
|
||||
<td>{{ info.memory }}</td>
|
||||
<td style="text-align:center;">{{ info.vcpu }}</td>
|
||||
<td style="text-align:right;">{{ info.memory |filesizeformat }}</td>
|
||||
<td><form action="" method="post" role="form">{% csrf_token %}
|
||||
<input type="hidden" name="name" value="{{ vm }}"/>
|
||||
<input type="hidden" name="compute_id" value="{{ host.0 }}"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue