2017-01-15 23:07:42 +00:00
|
|
|
{% comment %}
|
|
|
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
|
|
|
se veut agnostique au réseau considéré, de manière à être installable en
|
|
|
|
quelques clics.
|
|
|
|
|
|
|
|
Copyright © 2017 Gabriel Détraz
|
2019-09-29 14:02:28 +00:00
|
|
|
Copyright © 2017 Lara Kermarec
|
2017-01-15 23:07:42 +00:00
|
|
|
Copyright © 2017 Augustin Lemesle
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along
|
|
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
{% endcomment %}
|
|
|
|
|
2017-12-27 22:07:05 +00:00
|
|
|
{% load acl %}
|
2018-07-19 10:30:15 +00:00
|
|
|
{% load logs_extra %}
|
2018-08-05 16:48:56 +00:00
|
|
|
{% load i18n %}
|
2017-12-27 22:07:05 +00:00
|
|
|
|
2018-04-13 18:31:51 +00:00
|
|
|
<div class="table-responsive">
|
2018-07-19 10:30:15 +00:00
|
|
|
{% if switch_list.paginator %}
|
2019-01-08 23:40:48 +00:00
|
|
|
{% include 'pagination.html' with list=switch_list %}
|
2018-07-19 10:30:15 +00:00
|
|
|
{% endif %}
|
2017-10-26 16:48:09 +00:00
|
|
|
|
2018-07-19 10:30:15 +00:00
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2018-08-05 16:48:56 +00:00
|
|
|
{% trans "DNS name" as tr_dns %}
|
2019-01-08 23:40:48 +00:00
|
|
|
<th>{% include 'buttons/sort.html' with prefix='switch' col='dns' text=tr_dns %}</th>
|
2018-08-05 16:48:56 +00:00
|
|
|
{% trans "IPv4 address" as tr_ip %}
|
2019-01-08 23:40:48 +00:00
|
|
|
<th>{% include 'buttons/sort.html' with prefix='switch' col='ip' text=tr_ip %}</th>
|
2018-08-05 16:48:56 +00:00
|
|
|
{% trans "Switch bay" as tr_bay %}
|
2019-01-08 23:40:48 +00:00
|
|
|
<th>{% include 'buttons/sort.html' with prefix='switch' col='loc' text=tr_bay %}</th>
|
2018-08-05 16:48:56 +00:00
|
|
|
{% trans "Ports" as tr_ports %}
|
2019-01-08 23:40:48 +00:00
|
|
|
<th>{% include 'buttons/sort.html' with prefix='switch' col='ports' text=tr_ports %}</th>
|
2018-08-05 16:48:56 +00:00
|
|
|
{% trans "Stack" as tr_stack %}
|
2019-01-08 23:40:48 +00:00
|
|
|
<th>{% include 'buttons/sort.html' with prefix='switch' col='stack' text=tr_stack %}</th>
|
2019-11-16 14:14:22 +00:00
|
|
|
<th>{% trans "Stack member ID" %}</th>
|
2018-08-05 16:48:56 +00:00
|
|
|
<th>{% trans "Switch model" %}</th>
|
|
|
|
<th>{% trans "Details" %}</th>
|
2018-07-19 10:30:15 +00:00
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{% for switch in switch_list %}
|
2018-08-05 16:48:56 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
2019-01-08 23:40:48 +00:00
|
|
|
<a href="{% url 'topologie:index-port' switch.id %}">
|
2018-08-05 16:48:56 +00:00
|
|
|
{{ switch }}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>{{ switch.interface_set.first.ipv4 }}</td>
|
|
|
|
<td>{{ switch.switchbay }}</td>
|
|
|
|
<td>{{ switch.number }}</td>
|
|
|
|
<td>{{ switch.stack.name }}</td>
|
|
|
|
<td>{{ switch.stack_member_id }}</td>
|
|
|
|
<td>{{ switch.model }}</td>
|
|
|
|
<td>{{ switch.interface_set.first.details }}</td>
|
|
|
|
<td class="text-right">
|
|
|
|
{% can_edit switch %}
|
2019-01-08 23:40:48 +00:00
|
|
|
{% include 'buttons/edit.html' with href='topologie:edit-switch' id=switch.id %}
|
2018-08-05 16:48:56 +00:00
|
|
|
{% acl_end %}
|
|
|
|
{% history_button switch %}
|
|
|
|
{% can_delete switch %}
|
|
|
|
{% include 'buttons/suppr.html' with href='machines:del-machine' id=switch.id %}
|
|
|
|
{% acl_end %}
|
|
|
|
{% can_create Port %}
|
|
|
|
{% trans "Creation of ports" as tr_creation %}
|
2019-01-08 23:40:48 +00:00
|
|
|
{% include 'buttons/add.html' with href='topologie:create-ports' id=switch.id desc=tr_creation %}
|
2018-08-05 16:48:56 +00:00
|
|
|
{% acl_end %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2018-07-19 10:30:15 +00:00
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2017-11-14 21:23:39 +00:00
|
|
|
|
2018-07-19 10:30:15 +00:00
|
|
|
{% if switch_list.paginator %}
|
2019-01-08 23:40:48 +00:00
|
|
|
{% include 'pagination.html' with list=switch_list %}
|
2018-07-19 10:30:15 +00:00
|
|
|
{% endif %}
|
2018-04-13 18:31:51 +00:00
|
|
|
</div>
|
2018-08-05 16:48:56 +00:00
|
|
|
|