console/SWSCloudCore/templates/default/containers/index.html

77 lines
3.6 KiB
HTML
Raw Normal View History

2015-11-30 12:35:57 +03:00
{% extends "default/_layout.html" %}
2016-01-20 08:38:08 +03:00
{% block title %}Контейнеры{% endblock %}
2015-11-30 12:35:57 +03:00
{% block content %}
<div class="row">
<div class="large-12 columns">
2016-04-02 02:45:26 +03:00
<h3>Список <a href="{{ url_for('containers.create') }}">+</a></h3>
2015-11-30 12:35:57 +03:00
</div>
</div>
<div class="row">
<div class="large-12 columns">
2016-04-02 02:45:26 +03:00
<table id="zones" width="100%">
2015-11-30 12:35:57 +03:00
<thead>
<tr>
<th width="45%">ID</th>
<th>IP</th>
2015-12-16 14:54:40 +03:00
<th>Диск</th>
2016-01-21 01:27:11 +03:00
<th>Память</th>
2015-11-30 12:35:57 +03:00
<th>Статус</th>
<th width="10%">&nbsp;</th>
</tr>
</thead>
<tbody>
{% if containers.total == 0 %}
<tr>
2016-04-02 02:45:26 +03:00
<td>Нет ни одного контейнера. <a href="{{ url_for('containers.create') }}">Добавить</a>.</td>
2015-11-30 12:35:57 +03:00
</tr>
{% else %}
{% for container in containers['items'] %}
<tr>
2016-04-02 00:42:22 +03:00
<td>{{ container['id'] }}</td>
2015-11-30 12:35:57 +03:00
<td>
2016-04-02 00:42:22 +03:00
{% if container['ipv4'] %}IPv4: {{ container['ipv4'] }}{% endif %}
{% if container['ipv6'] %}IPv6: {{ container['ipv6'] }}{% endif %}
2015-11-30 12:35:57 +03:00
</td>
2015-12-16 14:54:40 +03:00
<td>
{% set size_gb = (container.size / 1024 / 1024) %}
2015-12-16 14:54:40 +03:00
{{ '%0.2f' | format(size_gb|float) }}GB
</td>
2015-11-30 12:35:57 +03:00
<td>
2016-01-23 17:49:03 +03:00
<a href="{{ url_for('containers.stats', container_id=container.id) }}">
2016-04-02 00:42:22 +03:00
{% if container['status'] == 1 %}
{% set memory_mb = (container.memory / 1024 / 1024) %}
{{ '%0.2f' | format(memory_mb|float) }}MB
{% else %}
0MB
{% endif %}
2016-01-23 17:49:03 +03:00
</a>
2016-01-21 01:27:11 +03:00
</td>
2015-11-30 12:35:57 +03:00
<td>
{% if container['status'] == 0 %}
Неактивно
{% elif container['status'] == 1 %}
Активно
{% elif container['status'] == 2 %}
Процесс активации
{% elif container['status'] == 3 %}
Процесс деактивации
{% elif container['status'] == 4 %}
Создание...
{% elif container['status'] == 5 %}
Удаление...
{% endif %}
</td>
<td>
2016-04-02 02:45:26 +03:00
<a href="{{ url_for('containers.settings', container_id=container.id) }}">Настройки</a>
2015-11-30 12:35:57 +03:00
</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
</div>
{% endblock %}