console/app/templates/administrator/ips/index.html
2016-01-17 20:12:34 +03:00

51 lines
1.9 KiB
HTML

{% extends 'administrator/_layout.auth.html' %}
{% block title %}IPs{% endblock %}
{% block subtitle %}IPs list <label><a href="{{ url_for('administrator.ips_create') }}">New IP</a></label>{% endblock %}
{% block content %}
Total: {{ ips['total'] }}
<table class="table table-bordered">
<thead>
<tr>
<th>Id</th>
<th>Data center</th>
<th>Server</th>
<th>IPv4</th>
<th>IPv4 gateway</th>
<th>IPv6</th>
<th>IPv6 gateway</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% if ips['total'] == 0 %}
<tr>
<td colspan="6">Нет ни одного правила</td>
</tr>
{% else %}
{% for ip in ips['items'] %}
<tr>
<td>{{ ip.id }}</td>
<td><a href="#">{{ ip.datacenter.name }}</a></td>
<td><a href="#">{{ ip.server.hostname }}</a></td>
<td>{{ ip.ipv4 }}</td>
<td>{{ ip.ipv4_gateway }}</td>
<td>{{ ip.ipv6 }}</td>
<td>{{ ip.ipv6_gateway }}</td>
<td>
{% if ip.status == 0 %}
<span class="label label-default">Free</span>
{% else %}
<span class="label label-primary">Busy</span>
{% endif %}
</td>
<td><a href="{{ url_for('administrator.ips_edit', ip_id=ip.id) }}">Edit</a></td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
{% endblock %}