8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +00:00

Nouvel affichage pour les machines

L'ancien affichage commençait à prendre trop de place donc il fallait
réarranger les infos
This commit is contained in:
Maël Kervella 2017-10-07 21:48:23 +00:00
parent 7c372d04bb
commit fad9fd0dcd

View file

@ -27,30 +27,36 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endif %} {% endif %}
<table class="table"> <table class="table">
<colgroup>
<col>
<col>
<col>
<col width="{% if ipv6_enabled %}300{% else %}150{% endif %}px">
<col width="144px">
</colgroup>
<thead> <thead>
<tr> <th>Nom DNS</th>
<th>Actions</th>
<th>Proprietaire</th>
<th>Nom dns</th>
<th>Type</th> <th>Type</th>
<th>Mac</th> <th>MAC</th>
<th>IP</th> <th>IP</th>
<th></th> <th>Actions</th>
</tr> <tbody>
</thead>
{% for machine in machines_list %} {% for machine in machines_list %}
{% for interface in machine.interface_set.all %} <tr class="info">
<tr class="active"> <td colspan="4">
{% if forloop.first %} <b>{{ machine.name }}</b> <i class="glyphicon glyphicon-chevron-right"></i>
<td rowspan="{{ machine.interface_set.all|length }}"> <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">
{% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc='Ajouter une interface' %} {% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc='Ajouter une interface' %}
{% include 'buttons/suppr.html' with href='machines:del-machine' id=machine.id %}
{% include 'buttons/history.html' with href='machines:history' name='machine' id=machine.id %} {% 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 %}
</td> </td>
<td rowspan="{{ machine.interface_set.all|length }}"> </tr>
<a href="{% url 'users:profil' userid=machine.user.id %}"><b>{{ machine.user }}</b></a> {% for interface in machine.interface_set.all %}
</td> <tr>
{% endif %}
<td> <td>
{% if interface.domain.related_domain.all %} {% if interface.domain.related_domain.all %}
<div class="dropdown"> <div class="dropdown">
@ -72,19 +78,26 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{{ interface.domain }} {{ interface.domain }}
{% endif %} {% endif %}
</td> </td>
<td>{{ interface.type }}</td> <td>
<td>{{ interface.mac_address }}</td> {{ interface.type }}
<td><b>IPv4</b> {{ interface.ipv4 }} </td>
{% if ipv6_enabled %} <td>
{{ interface.mac_address }}
</td>
<td>
<b>IPv4</b> {{ interface.ipv4 }}
<br> <br>
{% if ipv6_enabled and interface.ipv6 != 'None'%}
<b>IPv6</b> {{ interface.ipv6 }} <b>IPv6</b> {{ interface.ipv6 }}
{% endif %} {% endif %}
</td> </td>
<td> <td class="text-right">
<div class="dropdown"> <div class="dropdown" style="width: 128px;">
<button class="btn btn-default dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <button class="btn btn-primary btn-sm dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Modifier <span class="caret"></span> <i class="glyphicon glyphicon-edit"></i> <span class="caret"></span>
</button> </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 %}
<ul class="dropdown-menu" aria-labelledby="editioninterface"> <ul class="dropdown-menu" aria-labelledby="editioninterface">
<li> <li>
<a href="{% url 'machines:edit-interface' interface.id %}"> <a href="{% url 'machines:edit-interface' interface.id %}">
@ -101,16 +114,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<i class="glyphicon glyphicon-edit"></i> Gerer la configuration des ports <i class="glyphicon glyphicon-edit"></i> Gerer la configuration des ports
</a> </a>
</li> </li>
<li>
<a href="{% url 'machines:history' 'interface' interface.id %}">
<i class="glyphicon glyphicon-time"></i> Historique
</a>
</li>
<li>
<a href="{% url 'machines:del-interface' interface.id %}">
<i class="glyphicon glyphicon-trash"></i> Supprimer
</a>
</li>
</ul> </ul>
</div> </div>
</td> </td>
@ -120,5 +123,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td colspan="8"></td> <td colspan="8"></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody>
</table> </table>