mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 17:03:45 +00:00
Ajout dnssec reverse bool for iptypes
This commit is contained in:
parent
8e8c10ce68
commit
029a83bd33
3 changed files with 16 additions and 5 deletions
|
@ -218,7 +218,8 @@ class IpTypeForm(FormRevMixin, ModelForm):
|
|||
class Meta:
|
||||
model = IpType
|
||||
fields = ['type', 'extension', 'need_infra', 'domaine_ip_start',
|
||||
'domaine_ip_stop', 'prefix_v6', 'vlan', 'ouverture_ports']
|
||||
'domaine_ip_stop', 'dnssec_reverse_v4', 'prefix_v6',
|
||||
'dnssec_reverse_v6', 'vlan', 'ouverture_ports']
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||
|
@ -231,6 +232,7 @@ class EditIpTypeForm(IpTypeForm):
|
|||
synchroniser les objets iplist"""
|
||||
class Meta(IpTypeForm.Meta):
|
||||
fields = ['extension', 'type', 'need_infra', 'prefix_v6', 'vlan',
|
||||
'dnssec_reverse_v4', 'dnssec_reverse_v6',
|
||||
'ouverture_ports']
|
||||
|
||||
|
||||
|
|
|
@ -256,11 +256,19 @@ class IpType(RevMixin, AclMixin, models.Model):
|
|||
need_infra = models.BooleanField(default=False)
|
||||
domaine_ip_start = models.GenericIPAddressField(protocol='IPv4')
|
||||
domaine_ip_stop = models.GenericIPAddressField(protocol='IPv4')
|
||||
dnssec_reverse_v4 = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Activer DNSSEC sur le reverse DNS IPv4",
|
||||
)
|
||||
prefix_v6 = models.GenericIPAddressField(
|
||||
protocol='IPv6',
|
||||
null=True,
|
||||
blank=True
|
||||
)
|
||||
dnssec_reverse_v6 = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Activer DNSSEC sur le reverse DNS IPv6",
|
||||
)
|
||||
vlan = models.ForeignKey(
|
||||
'Vlan',
|
||||
on_delete=models.PROTECT,
|
||||
|
|
|
@ -35,10 +35,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<th>Nécessite l'autorisation infra</th>
|
||||
<th>Plage ipv4</th>
|
||||
<th>Préfixe v6</th>
|
||||
<th>DNSSEC reverse v4/v6</th>
|
||||
<th>Sur vlan</th>
|
||||
<th>Ouverture ports par défault</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for type in iptype_list %}
|
||||
|
@ -48,6 +48,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<td>{{ type.need_infra|tick }}</td>
|
||||
<td>{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}</td>
|
||||
<td>{{ type.prefix_v6 }}</td>
|
||||
<td>{{ type.dnssec_reverse_v4|tick }}/{{ type.dnssec_reverse_v6|tick }}</td>
|
||||
<td>{{ type.vlan }}</td>
|
||||
<td>{{ type.ouverture_ports }}</td>
|
||||
<td class="text-right">
|
||||
|
|
Loading…
Reference in a new issue