8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 09:26:27 +00:00

Volet js pour affichage ipv6 fonctionnel

This commit is contained in:
Gabriel Detraz 2018-01-30 00:07:46 +00:00 committed by root
parent c3ecbe4efe
commit e21b393563
2 changed files with 33 additions and 12 deletions

View file

@ -84,9 +84,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<br> <br>
{% if ipv6_enabled and interface.ipv6 != 'None'%} {% if ipv6_enabled and interface.ipv6 != 'None'%}
<b>IPv6</b> <b>IPv6</b>
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#collapseDomain_{{interface.id}}" aria-expanded="true" aria-controls="collapseDomain_{{interface.id}}"> <button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#collapseIpv6_{{interface.id}}" aria-expanded="true" aria-controls="collapseIpv6_{{interface.id}}">
Afficher l'IPV6 Afficher l'IPV6
</button> </button>
{% endif %} {% endif %}
</td> </td>
<td class="text-right"> <td class="text-right">
@ -132,22 +132,21 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</td> </td>
</tr> </tr>
{% if ipv6_enabled and interface.ipv6 != 'None'%} {% if ipv6_enabled and interface.ipv6 != 'None'%}
<tr> <tr>
<td colspan=5 style="border-top: none; padding: 1px;"> <td colspan=5 style="border-top: none; padding: 1px;">
<div class="collapse in" id="collapseDomain_IPV6"> <div class="collapse in" id="collapseIpv6_{{interface.id}}">
<ul class="list-group" style="margin-bottom: 0px;"> <ul class="list-group" style="margin-bottom: 0px;">
{{interface.ipv6}} {% for ipv6 in interface.ipv6.all %}
</ul> <li class="list-group-item col-xs-6 col-sm-6 col-md-6" style="border: none;">
{{ipv6}}
</li>
{% endfor %}
</ul>
</div> </div>
</td> </td>
<tr> <tr>
{% endif %} {% endif %}
{% endfor %}
<tr>
<td colspan="8"></td>
</tr>
{% endif %}
{% if interface.domain.related_domain.all %} {% if interface.domain.related_domain.all %}
@ -183,6 +182,12 @@ $("#machines_table").ready( function() {
alias_div[i].collapse('hide'); 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++) {
ipv6_div[i].collapse('hide');
}
} );
</script> </script>
{% if machines_list.paginator %} {% if machines_list.paginator %}

View file

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-01-29 23:52
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('preferences', '0028_auto_20180128_2203'),
('preferences', '0040_auto_20180129_1745'),
]
operations = [
]