101 lines
3.1 KiB
HTML
101 lines
3.1 KiB
HTML
{% extends 'django_openstack/dash/base.html' %}
|
|
{% load parse_date %}
|
|
{% load sizeformat %}
|
|
|
|
{% block sidebar %}
|
|
{% with current_sidebar="overview" %}
|
|
{{block.super}}
|
|
{% endwith %}
|
|
{% endblock %}
|
|
|
|
{% block page_header %}
|
|
{# to make searchable false, just remove it from the include statement #}
|
|
{% include "django_openstack/common/_page_header.html" with title="Overview" %}
|
|
{% endblock page_header %}
|
|
|
|
{% block dash_main %}
|
|
<div id="usage">
|
|
|
|
{% if usage.instances %}
|
|
<div class="usage_block">
|
|
<h3>CPU</h3>
|
|
<ul>
|
|
<li><span class="quantity">{{usage.total_active_vcpus|default:0}}</span><span class="unit">Cores</span> Active</li>
|
|
<li><span class="quantity">{{usage.total_cpu_usage|floatformat|default:0}}</span><span class="unit">CPU-HR</span> Used</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="usage_block">
|
|
<h3>RAM</h3>
|
|
<ul>
|
|
<li><span class="quantity">{{total_ram|default:0}}</span><span class="unit">{{ram_unit}}</span> Active</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="usage_block last">
|
|
<h3>Disk</h3>
|
|
<ul>
|
|
<li><span class="quantity">{{usage.total_active_disk_size|default:0}}</span><span class="unit">GB</span> Active</li>
|
|
<li><span class="quantity">{{usage.total_disk_usage|floatformat|default:0}}</span><span class="unit">GB-HR</span> Used</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class='table_title wide'>
|
|
<a class="csv_download_link" href="{{csv_link}}">Download CSV »</a>
|
|
<h3>Server Usage Summary
|
|
<small>
|
|
{% if show_terminated %}
|
|
( <a href="{% url dash_overview %}">Hide Terminated</a> )
|
|
{% else %}
|
|
( <a href="{% url dash_overview %}?show_terminated=1">Show Terminated</a> )
|
|
{% endif %}
|
|
</small>
|
|
</h3>
|
|
</div>
|
|
|
|
<table class="wide">
|
|
<tr id='headings'>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>User</th>
|
|
<th>VCPUs</th>
|
|
<th>Ram Size</th>
|
|
<th>Disk Size</th>
|
|
<th>Flavor</th>
|
|
<th>Uptime</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
<tbody class='main'>
|
|
{% for instance in instances %}
|
|
{% if instance.ended_at %}
|
|
<tr class="terminated">
|
|
{% else %}
|
|
<tr class="{% cycle 'odd' 'even' %}">
|
|
{% endif %}
|
|
<td>{{instance.id}}</td>
|
|
<td>{{instance.name}}</td>
|
|
<td>{{instance.user_id}}</td>
|
|
<td>{{instance.vcpus}}</td>
|
|
<td>{{instance.ram_size|mbformat}}</td>
|
|
<td>{{instance.disk_size}}GB</td>
|
|
<td>{{instance.flavor}}</td>
|
|
<td>{{instance.uptime_at|timesince}}</td>
|
|
<td>{{instance.state|lower|capfirst}}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan=9> No active instances. </td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<div class="message_box info">
|
|
<h2>Info</h2>
|
|
<p>There are currently no instances.<br/><br/>You can launch an instance from the <a href='{% url dash_images request.user.tenant %}'>Images Page.</a></p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|