8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

tried to follow Chirac advice

This commit is contained in:
fournier_bap 2018-01-31 19:16:36 +01:00
parent b48ccb189e
commit 04e163c35a

View file

@ -65,7 +65,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr> <tr>
<td> <td>
{{ interface.domain }} {{ interface.domain }}
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target=".multiple-collapse" aria-expanded="true" aria-controls="collapseDetails1_{{interface.id}} collapseDetails2_{{interface.id}} collapseDetails3_{{interface.id}} collapseDetails4_{{interface.id}} "> <button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#collapseDetails_{{interface.id}}" aria-expanded="true" aria-controls="collapseDetails_{{interface.id}}">
Détails... Détails...
</button> </button>
</td> </td>
@ -122,16 +122,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</tr> </tr>
<div class="collapse in" id="collapseDetails_{{interface.id}}"> <div class="collapse in" id="collapseDetails_{{interface.id}}">
<tr>
{% if ipv6_enabled and interface.ipv6 != 'None'%} {% if ipv6_enabled and interface.ipv6 != 'None'%}
<tr>
<td colspan=5 style="border-top: none; padding: 1px;"> <td colspan=5 style="border-top: none; padding: 1px;">
<tr class="info"> <tr class="info">
<td> <div class="collapse in" id="collapseDetails1_{{interface.id}}"> <b>IPV6</b> </div> </td> <td> <b>IPV6</b> </td>
</tr> </tr>
<div class="collapse in" id="collapseDetails2_{{interface.id}}">
<ul class="list-group" style="margin-bottom: 0px;"> <ul class="list-group" style="margin-bottom: 0px;">
{% for ipv6 in interface.ipv6.all %} {% for ipv6 in interface.ipv6.all %}
<li class="list-group-item col-xs-6 col-sm-6 col-md-6" style="border: none;"> <li class="list-group-item col-xs-6 col-sm-6 col-md-6" style="border: none;">
@ -139,23 +136,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div>
</td>
</tr>
<tr>
{% endif %} {% endif %}
{% if interface.domain.related_domain.all %} {% if interface.domain.related_domain.all %}
<tr class="info">
<td> <div class="collapse in" id="collapseDetails3_{{interface.id}}"> <b>Aliases</b> </div> </td>
</tr>
<tr>
<td colspan=5 style="border-top: none; padding: 1px;"> <td colspan=5 style="border-top: none; padding: 1px;">
<tr class="info">
<div class="collapse in" id="collapseDetails4_{{interface.id}}"> <td> <b>Aliases</b> </td>
</tr>
<ul class="list-group" style="margin-bottom: 0px;"> <ul class="list-group" style="margin-bottom: 0px;">
{% for al in interface.domain.related_domain.all %} {% for al in interface.domain.related_domain.all %}
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;"> <li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;">
@ -164,33 +151,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<i class="glyphicon glyphicon-share-alt"></i> <i class="glyphicon glyphicon-share-alt"></i>
</a> </a>
</li> </li>
{% endfor %} {% endfor %}
{% endif %}
</ul> </ul>
</td>
</tr>
</div> </div>
</td>
{% endif %}
</tr>
{% endfor %} {% endfor %}
<tr> <tr>
<td colspan="8"></td> <td colspan="8"></td>
</tr> </tr>
</div>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<script> <script>
$("#machines_table").ready( function() { $("#machines_table").ready( function() {
var alias_div = [{% for machine in machines_list %}{% for interface in machine.interface_set.all %}{% if interface.domain.related_domain.all %}$("#collapseDomain_{{interface.id}}"), {% endif %}{% endfor %}{% endfor %}]; var details_div = [{% for machine in machines_list %}{% for interface in machine.interface_set.all %}{% if interface.ipv6.all %}$("#collapseDetails_{{interface.id}}"), {% endif %}{% endfor %}{% endfor %}];
for (var i=0 ; i<alias_div.length ; i++) {
alias_div[i].collapse('hide');
}
} );
$("#machines_table").ready( function() {
var ipv6_div = [{% for machine in machines_list %}{% for interface in machine.interface_set.all %}{% if interface.ipv6.all %}$("#collapseIpv6_{{interface.id}}"), {% endif %}{% endfor %}{% endfor %}];
for (var i=0 ; i<ipv6_div.length ; i++) { for (var i=0 ; i<ipv6_div.length ; i++) {
ipv6_div[i].collapse('hide'); details_div[i].collapse('hide');
} }
} ); } );
</script> </script>