72 lines
2.6 KiB
HTML
72 lines
2.6 KiB
HTML
<!-- TODO(termie): move most of this to django_openstack -->
|
|
{% load sizeformat %}
|
|
<table id='instances' class="wide">
|
|
<tr id='headings'>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Groups</th>
|
|
<th>Image</th>
|
|
<th>Size</th>
|
|
<th>IPs</th>
|
|
<th>State</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
<tbody class='main'>
|
|
{% for instance in instances %}
|
|
<tr class="{% cycle 'odd' 'even' %}">
|
|
<td>{{instance.id}}</td>
|
|
<td class="name">{{instance.name}}
|
|
{% if instance.attrs.key_name %}
|
|
<br/>
|
|
<small> ({{instance.attrs.key_name}}) </small>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<ul>
|
|
{% for group in instance.attrs.security_groups %}
|
|
<li>{{group}}</li>
|
|
{% endfor %}
|
|
<ul>
|
|
</td>
|
|
<td>{{instance.image_name}}</td>
|
|
<td>
|
|
<ul>
|
|
<li>{{instance.attrs.memory_mb|mbformat}} Ram</li>
|
|
<li>{{instance.attrs.vcpus}} VCPU</li>
|
|
<li>{{instance.attrs.disk_gb}}GB Disk</li>
|
|
</ul>
|
|
</td>
|
|
<td class="ip_list">
|
|
{% for ip_group, addresses in instance.addresses.items %}
|
|
{% if instance.addresses.items|length > 1 %}
|
|
<h4>{{ip_group}}</h4>
|
|
<ul>
|
|
{% for address in addresses %}
|
|
<li>{{address.addr}}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<ul>
|
|
{% for address in addresses %}
|
|
<li>{{address.addr}}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
<td>{{instance.status|lower|capfirst}}</td>
|
|
<td id="actions">
|
|
<ul>
|
|
<li class="form">{% include "django_openstack/common/instances/_terminate.html" with form=terminate_form %}</li>
|
|
<li class="form">{% include "django_openstack/common/instances/_reboot.html" with form=reboot_form %}</li>
|
|
<li><a target="_blank" href="{% url dash_instances_console request.user.tenant instance.id %}">Log</a></li>
|
|
<li><a target="_blank" href="{% url dash_instances_vnc request.user.tenant instance.id %}">VNC Console</a></li>
|
|
<li><a href="{% url dash_instances_update request.user.tenant instance.id %}">Edit</a></li>
|
|
<li><a href="{% url dash_snapshots_create request.user.tenant instance.id %}">Snapshot</a></li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|