8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 03:13:12 +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,75 +122,57 @@ 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'%}
<tr> {% if ipv6_enabled and interface.ipv6 != 'None'%}
<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>
<ul class="list-group" style="margin-bottom: 0px;">
<div class="collapse in" id="collapseDetails2_{{interface.id}}"> {% for ipv6 in interface.ipv6.all %}
<ul class="list-group" style="margin-bottom: 0px;"> <li class="list-group-item col-xs-6 col-sm-6 col-md-6" style="border: none;">
{% for ipv6 in interface.ipv6.all %} {{ipv6}}
<li class="list-group-item col-xs-6 col-sm-6 col-md-6" style="border: none;"> </li>
{{ipv6}}
</li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> {% endif %}
{% if interface.domain.related_domain.all %}
</td>
</tr>
<tr>
{% endif %}
{% 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>
<ul class="list-group" style="margin-bottom: 0px;"> </tr>
{% for al in interface.domain.related_domain.all %} <ul class="list-group" style="margin-bottom: 0px;">
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;"> {% 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;">
<a href="http://{{ al }}"> <a href="http://{{ al }}">
{{ al }} {{ al }}
<i class="glyphicon glyphicon-share-alt"></i> <i class="glyphicon glyphicon-share-alt"></i>
</a> </a>
</li> </li>
{% endfor %}
</ul> {% endfor %}
</div> {% endif %}
</ul>
</td> </td>
{% endif %} </tr>
</tr> </div>
{% 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>