8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Update display of ip_types

This commit is contained in:
grisel-davy 2020-10-23 10:12:18 +02:00 committed by Gabriel Detraz
parent 52a23be738
commit 00e5575a21

View file

@ -28,39 +28,59 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load logs_extra %} {% load logs_extra %}
{% load i18n %} {% load i18n %}
<div class="table-responsive"> {% for type in iptype_list %}
<table class="table table-striped"> <div class="panel panel-default">
<thead> <div class="panel-heading">
<tr> <div class="containeri-fluid">
<th>{% trans "IP type" %}</th> <div class="row">
<th>{% trans "Extension" %}</th> <div class="col-sm-3">
<th>{% blocktrans %}"infra" right required{% endblocktrans %}</th> <h4>{{ type.name }}</h4>
<th>{% trans "IPv4 range" %}</th> </div>
<th>{% trans "v6 prefix" %}</th> <div class="col-sm-3">
<th>{% trans "DNSSEC reverse v4/v6" %}</th> <h4>{{ type.extension }}</h4>
<th>{% trans "On VLAN(s)" %}</th> </div>
<th>{% trans "Default ports opening" %}</th> <div class="col-sm-4 text-center">
<th></th> {% if type.need_infra %}
</tr> <span class="text-success">{% trans "Infra right required" %}
</thead> {% else %}
{% for type in iptype_list %} <span class="text-danger">{% trans "Infra right not required" %}
<tr> {% endif %}
<td>{{ type.name }}</td> </div>
<td>{{ type.extension }}</td> <div class="col-sm-2 text-right">
<td>{{ type.need_infra|tick }}</td>
<td>{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}{% if type.ip_network %}<b><u> on </u></b>
{{ type.ip_network }}{% endif %}</td>
<td>{{ type.prefix_v6 }}/{{ type.prefix_v6_length }}</td>
<td>{{ type.reverse_v4|tick }}/{{ type.reverse_v6|tick }}</td>
<td>{{ type.vlan }}</td>
<td>{{ type.ouverture_ports }}</td>
<td class="text-right">
{% can_edit type %} {% can_edit type %}
{% include 'buttons/edit.html' with href='machines:edit-iptype' id=type.id %} {% include 'buttons/edit.html' with href='machines:edit-iptype' id=type.id %}
{% acl_end %} {% acl_end %}
{% history_button type %} {% history_button type %}
</td> </div>
</tr> </div>
{% endfor %} </div>
</table> </div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "IPv4 range" %}</th>
<th>{% trans "v6 prefix" %}</th>
<th>{% trans "DNSSEC reverse v4/v6" %}</th>
<th>{% trans "On VLAN(s)" %}</th>
<th>{% trans "Default ports opening" %}</th>
</tr>
</thead>
<tr>
<td>{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}{% if type.ip_network %}
<b><u> on </u></b>
{{ type.ip_network }}{% endif %}</td>
<td>{{ type.prefix_v6 }}/{{ type.prefix_v6_length }}</td>
<td>{{ type.reverse_v4|tick }}/{{ type.reverse_v6|tick }}</td>
<td>{{ type.vlan }}</td>
<td>{{ type.ouverture_ports }}</td>
</tr>
</table>
</div>
</div>
</div> </div>
{% endfor %}