aff_stacks.html 2.33 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
{% 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
Copyright © 2017  Goulven Kermarec
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 %}

25
{% load acl %}
26
{% load logs_extra %}
27
{% load i18n %}
28

29 30 31
<table class="table table-striped">
    <thead>
        <tr>
32
            {% trans "Stack" as tr_stack %}
33
            <th>{% include 'buttons/sort.html' with prefix='stack' col='name' text=tr_stack %}</th>
34
            {% trans "ID" as tr_id %}
35
            <th>{% include 'buttons/sort.html' with prefix='stack' col='id' text=id %}</th>
36 37
            <th>{% trans "Details" %}</th>
            <th>{% trans "Members" %}</th>
Gabriel Detraz's avatar
Gabriel Detraz committed
38
            <th></th>
39
        </tr>
40 41
    </thead>
    {% for stack in stack_list %}
42 43 44 45 46 47
        <tr>
            <td>{{ stack.name }}</td>
            <td>{{ stack.stack_id }}</td>
            <td>{{ stack.details }}</td>
            <td>
            {% for switch in stack.switch_set.all %}
48
                <a href="{% url 'topologie:index-port' switch.id %}">
49 50 51 52 53 54
                    {{ switch }}
                </a>
            {% endfor %}
            </td>
            <td class="text-right">
                {% can_edit stack %}
55
                {% include 'buttons/edit.html' with href='topologie:edit-stack' id=stack.id %}
56 57 58
                {% acl_end %}
                {% history_button stack %}
                {% can_delete stack %}
59
                {% include 'buttons/suppr.html' with href='topologie:del-stack' id=stack.id %}
60 61 62
                {% acl_end %}
            </td>
        </tr>
63
    {% endfor %}
64
</table>
Gabriel Detraz's avatar
Gabriel Detraz committed
65