8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00

fix typo in iptypes and update display of switchs

This commit is contained in:
grisel-davy 2020-10-23 12:09:09 +02:00 committed by Gabriel Detraz
parent ef890bc3ba
commit 4fac613373
2 changed files with 51 additions and 47 deletions

View file

@ -28,10 +28,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load logs_extra %} {% load logs_extra %}
{% load i18n %} {% load i18n %}
{% if iptype_list.paginator %}
{% include 'pagination.html' with list=iptype_list %}
{% endif %}
{% for type in iptype_list %} {% for type in iptype_list %}
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<div class="containeri-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-sm-3"> <div class="col-sm-3">
<h4>{{ type.name }}</h4> <h4>{{ type.name }}</h4>

View file

@ -26,45 +26,20 @@ 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 switch in switch_list %}
{% if switch_list.paginator %} <div class="panel panel-default">
{% include 'pagination.html' with list=switch_list %} <div class="panel-heading">
{% endif %} <div class="container-fluid">
<div class="row">
<table class="table table-striped"> <div class="col-sm-3">
<thead> <a href="{%url 'topologie:index-port' switch.id %}">
<tr> {{ switch }}
{% trans "DNS name" as tr_dns %}
<th>{% include 'buttons/sort.html' with prefix='switch' col='dns' text=tr_dns %}</th>
{% trans "IPv4 address" as tr_ip %}
<th>{% include 'buttons/sort.html' with prefix='switch' col='ip' text=tr_ip %}</th>
{% trans "Switch bay" as tr_bay %}
<th>{% include 'buttons/sort.html' with prefix='switch' col='loc' text=tr_bay %}</th>
{% trans "Ports" as tr_ports %}
<th>{% include 'buttons/sort.html' with prefix='switch' col='ports' text=tr_ports %}</th>
{% trans "Stack" as tr_stack %}
<th>{% include 'buttons/sort.html' with prefix='switch' col='stack' text=tr_stack %}</th>
<th>{% trans "Stack member ID" %}</th>
<th>{% trans "Switch model" %}</th>
<th>{% trans "Details" %}</th>
<th></th>
</tr>
</thead>
{% for switch in switch_list %}
<tr>
<td>
<a href="{% url 'topologie:index-port' switch.id %}">
{{ switch }}
</a> </a>
</td> </div>
<td>{{ switch.interface_set.first.ipv4 }}</td> <div class="col-sm-3">
<td>{{ switch.switchbay }}</td> {% trans "Switch bay" as tr_bay %} {{switch.switchbay}}
<td>{{ switch.number }}</td> </div>
<td>{{ switch.stack.name }}</td> <div class="col-sm-26 text-right">
<td>{{ switch.stack_member_id }}</td>
<td>{{ switch.model }}</td>
<td>{{ switch.interface_set.first.details }}</td>
<td class="text-right">
{% can_edit switch %} {% can_edit switch %}
{% include 'buttons/edit.html' with href='topologie:edit-switch' id=switch.id %} {% include 'buttons/edit.html' with href='topologie:edit-switch' id=switch.id %}
{% acl_end %} {% acl_end %}
@ -75,14 +50,38 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_create Port %} {% can_create Port %}
{% trans "Creation of ports" as tr_creation %} {% trans "Creation of ports" as tr_creation %}
{% include 'buttons/add.html' with href='topologie:create-ports' id=switch.id desc=tr_creation %} {% include 'buttons/add.html' with href='topologie:create-ports' id=switch.id desc=tr_creation %}
{% acl_end %} {% acl_end %}
</td> </div>
</tr> </div>
{% endfor %} </div>
</table> </div>
<div class="panel-body">
{% if switch_list.paginator %} <div class="table-repsonsive">
{% include 'pagination.html' with list=switch_list %} <table class="table">
<thead>
<tr>
<th>{% trans "IPv4 address"%}</th>
<th>{% trans "Ports"%}</th>
<th>{% trans "Stack"%}</th>
<th>{% trans "Stack member ID" %}</th>
<th>{% trans "Switch model" %}</th>
</tr>
</thead>
<tr>
<td>{{ switch.interface_set.first.ipv4 }}</td>
<td>{{ switch.number }}</td>
<td>{{ switch.stack.name }}</td>
<td>{{ switch.stack_member_id }}</td>
<td>{{ switch.model }}</td>
</tr>
</table>
</div>
</div>
{% if switch.interface_set.first.details %}
<div class="panel-footer">
<span><b>{% trans "Details: " %}</b>{{ switch.interface_set.first.details }}</span>
</div>
{% endif %} {% endif %}
</div> </div>
{% endfor %}