76 lines
3.6 KiB
HTML
76 lines
3.6 KiB
HTML
{% extends "default/_layout.html" %}
|
|
|
|
{% block title %}Контейнеры{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="large-12 columns">
|
|
<h3>Список <a href="{{ url_for('containers.create') }}">+</a></h3>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="large-12 columns">
|
|
<table id="zones" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th width="45%">ID</th>
|
|
<th>IP</th>
|
|
<th>Диск</th>
|
|
<th>Память</th>
|
|
<th>Статус</th>
|
|
<th width="10%"> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% if containers.total == 0 %}
|
|
<tr>
|
|
<td>Нет ни одного контейнера. <a href="{{ url_for('containers.create') }}">Добавить</a>.</td>
|
|
</tr>
|
|
{% else %}
|
|
{% for container in containers['items'] %}
|
|
<tr>
|
|
<td>{{ container['id'] }}</td>
|
|
<td>
|
|
{% if container['ipv4'] %}IPv4: {{ container['ipv4'] }}{% endif %}
|
|
{% if container['ipv6'] %}IPv6: {{ container['ipv6'] }}{% endif %}
|
|
</td>
|
|
<td>
|
|
{% set size_gb = (container.size / 1024 / 1024) %}
|
|
{{ '%0.2f' | format(size_gb|float) }}GB
|
|
</td>
|
|
<td>
|
|
<a href="{{ url_for('containers.stats', container_id=container.id) }}">
|
|
{% if container['status'] == 1 %}
|
|
{% set memory_mb = (container.memory / 1024 / 1024) %}
|
|
{{ '%0.2f' | format(memory_mb|float) }}MB
|
|
{% else %}
|
|
0MB
|
|
{% endif %}
|
|
</a>
|
|
</td>
|
|
<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>
|
|
<a href="{{ url_for('containers.settings', container_id=container.id) }}">Настройки</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|