8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-01 17:12:26 +00:00
re2o/machines/templates/machines/aff_machines.html

129 lines
5.3 KiB
HTML
Raw Normal View History

{% 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 %}
{% if machines_list.paginator %}
2016-11-16 19:55:28 +00:00
{% include "pagination.html" with list=machines_list %}
{% endif %}
2016-11-16 19:55:28 +00:00
<table class="table">
<colgroup>
<col>
<col>
<col>
<col width="{% if ipv6_enabled %}300{% else %}150{% endif %}px">
<col width="144px">
</colgroup>
2016-11-16 19:55:28 +00:00
<thead>
<th>Nom DNS</th>
<th>Type</th>
<th>MAC</th>
<th>IP</th>
<th>Actions</th>
<tbody>
2016-11-16 19:55:28 +00:00
{% for machine in machines_list %}
<tr class="info">
<td colspan="4">
<b>{{ machine.name }}</b> <i class="glyphicon glyphicon-chevron-right"></i>
<a href="{% url 'users:profil' userid=machine.user.id %}" title="Voir le profil">
<i class="glyphicon glyphicon-user"></i> {{ machine.user }}
</a>
</td>
<td class="text-right">
2016-11-18 10:53:10 +00:00
{% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc='Ajouter une interface' %}
{% include 'buttons/history.html' with href='machines:history' name='machine' id=machine.id %}
{% include 'buttons/suppr.html' with href='machines:del-machine' id=machine.id %}
2016-11-16 19:55:28 +00:00
</td>
</tr>
{% for interface in machine.interface_set.all %}
<tr>
2016-11-19 01:13:19 +00:00
<td>
2016-12-24 19:04:53 +00:00
{% if interface.domain.related_domain.all %}
2016-11-19 01:13:19 +00:00
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
2016-12-24 19:04:53 +00:00
{{ interface.domain }} <span class="caret"></span>
2016-11-19 01:13:19 +00:00
</button>
<ul class="dropdown-menu" aria-labelledby="editioninterface">
2016-12-24 19:04:53 +00:00
{% for al in interface.domain.related_domain.all %}
2016-11-19 01:13:19 +00:00
<li>
<a href="http://{{ al }}">
{{ al }}
2016-11-19 01:13:19 +00:00
<i class="glyphicon glyphicon-share-alt"></i>
</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
2016-12-24 19:04:53 +00:00
{{ interface.domain }}
2016-11-19 01:13:19 +00:00
{% endif %}
</td>
2016-11-16 19:55:28 +00:00
<td>
{{ interface.type }}
</td>
<td>
{{ interface.mac_address }}
</td>
<td>
<b>IPv4</b> {{ interface.ipv4 }}
<br>
{% if ipv6_enabled and interface.ipv6 != 'None'%}
<b>IPv6</b> {{ interface.ipv6 }}
{% endif %}
</td>
<td class="text-right">
<div class="dropdown" style="width: 128px;">
<button class="btn btn-primary btn-sm dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<i class="glyphicon glyphicon-edit"></i> <span class="caret"></span>
2016-11-16 19:55:28 +00:00
</button>
{% include 'buttons/history.html' with href='machines:history' name='interface' id=interface.id %}
{% include 'buttons/suppr.html' with href='machines:del-interface' id=interface.id %}
2016-11-16 19:55:28 +00:00
<ul class="dropdown-menu" aria-labelledby="editioninterface">
<li>
<a href="{% url 'machines:edit-interface' interface.id %}">
<i class="glyphicon glyphicon-edit"></i> Editer
</a>
</li>
<li>
<a href="{% url 'machines:index-alias' interface.id %}">
<i class="glyphicon glyphicon-edit"></i> Gerer les alias
</a>
</li>
2016-11-16 19:55:28 +00:00
<li>
<a href="{% url 'machines:port-config' interface.id%}">
<i class="glyphicon glyphicon-edit"></i> Gerer la configuration des ports
2016-11-16 19:55:28 +00:00
</a>
</li>
</ul>
</div>
</td>
</tr>
{% endfor %}
2016-11-16 19:55:28 +00:00
<tr>
<td colspan="8"></td>
</tr>
{% endfor %}
</tbody>
2016-11-16 19:55:28 +00:00
</table>