mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Translation of machines/ (front)
This commit is contained in:
parent
af40e3ea4e
commit
34bf50e7a9
41 changed files with 2814 additions and 799 deletions
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
Here are defined some functions to check acl on the application.
|
Here are defined some functions to check acl on the application.
|
||||||
"""
|
"""
|
||||||
|
from django.utils.translation import ugettext as _
|
||||||
|
|
||||||
|
|
||||||
def can_view(user):
|
def can_view(user):
|
||||||
|
@ -38,4 +39,6 @@ def can_view(user):
|
||||||
viewing is granted and msg is a message (can be None).
|
viewing is granted and msg is a message (can be None).
|
||||||
"""
|
"""
|
||||||
can = user.has_module_perms('machines')
|
can = user.has_module_perms('machines')
|
||||||
return can, None if can else "Vous ne pouvez pas voir cette application."
|
return can, None if can else _("You don't have the right to view this"
|
||||||
|
" application.")
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.forms import ModelForm, Form
|
from django.forms import ModelForm, Form
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import ugettext_lazy as _l
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from re2o.field_permissions import FieldPermissionFormMixin
|
from re2o.field_permissions import FieldPermissionFormMixin
|
||||||
from re2o.mixins import FormRevMixin
|
from re2o.mixins import FormRevMixin
|
||||||
|
@ -75,7 +75,7 @@ class EditMachineForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||||
super(EditMachineForm, self).__init__(*args, prefix=prefix, **kwargs)
|
super(EditMachineForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||||
self.fields['name'].label = 'Nom de la machine'
|
self.fields['name'].label = _("Machine name")
|
||||||
|
|
||||||
|
|
||||||
class NewMachineForm(EditMachineForm):
|
class NewMachineForm(EditMachineForm):
|
||||||
|
@ -94,12 +94,11 @@ class EditInterfaceForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
|
||||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||||
user = kwargs.get('user')
|
user = kwargs.get('user')
|
||||||
super(EditInterfaceForm, self).__init__(*args, prefix=prefix, **kwargs)
|
super(EditInterfaceForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||||
self.fields['mac_address'].label = 'Adresse mac'
|
self.fields['mac_address'].label = _("MAC address")
|
||||||
self.fields['type'].label = 'Type de machine'
|
self.fields['type'].label = _("Machine type")
|
||||||
self.fields['type'].empty_label = "Séléctionner un type de machine"
|
self.fields['type'].empty_label = _("Select a machine type")
|
||||||
if "ipv4" in self.fields:
|
if "ipv4" in self.fields:
|
||||||
self.fields['ipv4'].empty_label = ("Assignation automatique de "
|
self.fields['ipv4'].empty_label = _("Automatic IPv4 assignment")
|
||||||
"l'ipv4")
|
|
||||||
self.fields['ipv4'].queryset = IpList.objects.filter(
|
self.fields['ipv4'].queryset = IpList.objects.filter(
|
||||||
interface__isnull=True
|
interface__isnull=True
|
||||||
)
|
)
|
||||||
|
@ -170,7 +169,7 @@ class DelAliasForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs objets alias"""
|
"""Suppression d'un ou plusieurs objets alias"""
|
||||||
alias = forms.ModelMultipleChoiceField(
|
alias = forms.ModelMultipleChoiceField(
|
||||||
queryset=Domain.objects.all(),
|
queryset=Domain.objects.all(),
|
||||||
label="Alias actuels",
|
label=_("Current aliases"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -191,15 +190,15 @@ class MachineTypeForm(FormRevMixin, ModelForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||||
super(MachineTypeForm, self).__init__(*args, prefix=prefix, **kwargs)
|
super(MachineTypeForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||||
self.fields['type'].label = 'Type de machine à ajouter'
|
self.fields['type'].label = _("Machine type to add")
|
||||||
self.fields['ip_type'].label = "Type d'ip relié"
|
self.fields['ip_type'].label = _("Related IP type")
|
||||||
|
|
||||||
|
|
||||||
class DelMachineTypeForm(FormRevMixin, Form):
|
class DelMachineTypeForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs machinetype"""
|
"""Suppression d'un ou plusieurs machinetype"""
|
||||||
machinetypes = forms.ModelMultipleChoiceField(
|
machinetypes = forms.ModelMultipleChoiceField(
|
||||||
queryset=MachineType.objects.none(),
|
queryset=MachineType.objects.none(),
|
||||||
label="Types de machines actuelles",
|
label=_("Current machine types"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -222,7 +221,7 @@ class IpTypeForm(FormRevMixin, ModelForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||||
super(IpTypeForm, self).__init__(*args, prefix=prefix, **kwargs)
|
super(IpTypeForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||||
self.fields['type'].label = 'Type ip à ajouter'
|
self.fields['type'].label = _("IP type to add")
|
||||||
|
|
||||||
|
|
||||||
class EditIpTypeForm(IpTypeForm):
|
class EditIpTypeForm(IpTypeForm):
|
||||||
|
@ -239,7 +238,7 @@ class DelIpTypeForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs iptype"""
|
"""Suppression d'un ou plusieurs iptype"""
|
||||||
iptypes = forms.ModelMultipleChoiceField(
|
iptypes = forms.ModelMultipleChoiceField(
|
||||||
queryset=IpType.objects.none(),
|
queryset=IpType.objects.none(),
|
||||||
label="Types d'ip actuelles",
|
label=_("Current IP types"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -261,17 +260,17 @@ class ExtensionForm(FormRevMixin, ModelForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||||
super(ExtensionForm, self).__init__(*args, prefix=prefix, **kwargs)
|
super(ExtensionForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||||
self.fields['name'].label = 'Extension à ajouter'
|
self.fields['name'].label = _("Extension to add")
|
||||||
self.fields['origin'].label = 'Enregistrement A origin'
|
self.fields['origin'].label = _("A record origin")
|
||||||
self.fields['origin_v6'].label = 'Enregistrement AAAA origin'
|
self.fields['origin_v6'].label = _("AAAA record origin")
|
||||||
self.fields['soa'].label = 'En-tête SOA à utiliser'
|
self.fields['soa'].label = _("SOA record to use")
|
||||||
|
|
||||||
|
|
||||||
class DelExtensionForm(FormRevMixin, Form):
|
class DelExtensionForm(FormRevMixin, Form):
|
||||||
"""Suppression d'une ou plusieurs extensions"""
|
"""Suppression d'une ou plusieurs extensions"""
|
||||||
extensions = forms.ModelMultipleChoiceField(
|
extensions = forms.ModelMultipleChoiceField(
|
||||||
queryset=Extension.objects.none(),
|
queryset=Extension.objects.none(),
|
||||||
label="Extensions actuelles",
|
label=_("Current extensions"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -310,7 +309,7 @@ class DelSOAForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs SOA"""
|
"""Suppression d'un ou plusieurs SOA"""
|
||||||
soa = forms.ModelMultipleChoiceField(
|
soa = forms.ModelMultipleChoiceField(
|
||||||
queryset=SOA.objects.none(),
|
queryset=SOA.objects.none(),
|
||||||
label="SOA actuels",
|
label=_("Current SOA records"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -341,7 +340,7 @@ class DelMxForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs MX"""
|
"""Suppression d'un ou plusieurs MX"""
|
||||||
mx = forms.ModelMultipleChoiceField(
|
mx = forms.ModelMultipleChoiceField(
|
||||||
queryset=Mx.objects.none(),
|
queryset=Mx.objects.none(),
|
||||||
label="MX actuels",
|
label=_("Current MX records"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -374,7 +373,7 @@ class DelNsForm(FormRevMixin, Form):
|
||||||
"""Suppresion d'un ou plusieurs NS"""
|
"""Suppresion d'un ou plusieurs NS"""
|
||||||
ns = forms.ModelMultipleChoiceField(
|
ns = forms.ModelMultipleChoiceField(
|
||||||
queryset=Ns.objects.none(),
|
queryset=Ns.objects.none(),
|
||||||
label="Enregistrements NS actuels",
|
label=_("Current NS records"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -402,7 +401,7 @@ class DelTxtForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs TXT"""
|
"""Suppression d'un ou plusieurs TXT"""
|
||||||
txt = forms.ModelMultipleChoiceField(
|
txt = forms.ModelMultipleChoiceField(
|
||||||
queryset=Txt.objects.none(),
|
queryset=Txt.objects.none(),
|
||||||
label="Enregistrements Txt actuels",
|
label=_("Current TXT records"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -430,7 +429,7 @@ class DelDNameForm(FormRevMixin, Form):
|
||||||
"""Delete a set of DNAME entries"""
|
"""Delete a set of DNAME entries"""
|
||||||
dnames = forms.ModelMultipleChoiceField(
|
dnames = forms.ModelMultipleChoiceField(
|
||||||
queryset=Txt.objects.none(),
|
queryset=Txt.objects.none(),
|
||||||
label="Existing DNAME entries",
|
label=_("Current DNAME records"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -458,7 +457,7 @@ class DelSrvForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs Srv"""
|
"""Suppression d'un ou plusieurs Srv"""
|
||||||
srv = forms.ModelMultipleChoiceField(
|
srv = forms.ModelMultipleChoiceField(
|
||||||
queryset=Srv.objects.none(),
|
queryset=Srv.objects.none(),
|
||||||
label="Enregistrements Srv actuels",
|
label=_("Current SRV records"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -487,7 +486,7 @@ class DelNasForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs nas"""
|
"""Suppression d'un ou plusieurs nas"""
|
||||||
nas = forms.ModelMultipleChoiceField(
|
nas = forms.ModelMultipleChoiceField(
|
||||||
queryset=Nas.objects.none(),
|
queryset=Nas.objects.none(),
|
||||||
label="Enregistrements Nas actuels",
|
label=_("Current NAS devices"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -519,7 +518,7 @@ class DelRoleForm(FormRevMixin, Form):
|
||||||
"""Deletion of one or several roles."""
|
"""Deletion of one or several roles."""
|
||||||
role = forms.ModelMultipleChoiceField(
|
role = forms.ModelMultipleChoiceField(
|
||||||
queryset=Role.objects.none(),
|
queryset=Role.objects.none(),
|
||||||
label=_l("Current roles"),
|
label=_("Current roles"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -560,7 +559,7 @@ class DelServiceForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs service"""
|
"""Suppression d'un ou plusieurs service"""
|
||||||
service = forms.ModelMultipleChoiceField(
|
service = forms.ModelMultipleChoiceField(
|
||||||
queryset=Service.objects.none(),
|
queryset=Service.objects.none(),
|
||||||
label="Services actuels",
|
label=_("Current services"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -588,7 +587,7 @@ class DelVlanForm(FormRevMixin, Form):
|
||||||
"""Suppression d'un ou plusieurs vlans"""
|
"""Suppression d'un ou plusieurs vlans"""
|
||||||
vlan = forms.ModelMultipleChoiceField(
|
vlan = forms.ModelMultipleChoiceField(
|
||||||
queryset=Vlan.objects.none(),
|
queryset=Vlan.objects.none(),
|
||||||
label="Vlan actuels",
|
label=_("Current VLANs"),
|
||||||
widget=forms.CheckboxSelectMultiple
|
widget=forms.CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -646,3 +645,4 @@ class SshFpForm(FormRevMixin, ModelForm):
|
||||||
prefix=prefix,
|
prefix=prefix,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
BIN
machines/locale/fr/LC_MESSAGES/django.mo
Normal file
BIN
machines/locale/fr/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
1748
machines/locale/fr/LC_MESSAGES/django.po
Normal file
1748
machines/locale/fr/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load diff
221
machines/migrations/0094_auto_20180815_1918.py
Normal file
221
machines/migrations/0094_auto_20180815_1918.py
Normal file
|
@ -0,0 +1,221 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.7 on 2018-08-15 17:18
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import datetime
|
||||||
|
import django.core.validators
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('machines', '0093_auto_20180807_1115'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='dname',
|
||||||
|
options={'permissions': (('view_dname', 'Can view a DNAME record object'),), 'verbose_name': 'DNAME record', 'verbose_name_plural': 'DNAME records'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='domain',
|
||||||
|
options={'permissions': (('view_domain', 'Can view a domain object'),), 'verbose_name': 'domain', 'verbose_name_plural': 'domains'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='extension',
|
||||||
|
options={'permissions': (('view_extension', 'Can view an extension object'), ('use_all_extension', 'Can use all extensions')), 'verbose_name': 'DNS extension', 'verbose_name_plural': 'DNS extensions'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='interface',
|
||||||
|
options={'permissions': (('view_interface', 'Can view an interface object'), ('change_interface_machine', 'Can change the owner of an interface')), 'verbose_name': 'interface', 'verbose_name_plural': 'interfaces'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='iplist',
|
||||||
|
options={'permissions': (('view_iplist', 'Can view an IPv4 addresses list object'),), 'verbose_name': 'IPv4 addresses list', 'verbose_name_plural': 'IPv4 addresses lists'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='iptype',
|
||||||
|
options={'permissions': (('view_iptype', 'Can view an IP type object'), ('use_all_iptype', 'Can use all IP types')), 'verbose_name': 'IP type', 'verbose_name_plural': 'IP types'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='ipv6list',
|
||||||
|
options={'permissions': (('view_ipv6list', 'Can view an IPv6 addresses list object'), ('change_ipv6list_slaac_ip', 'Can change the SLAAC value of an IPv6 addresses list')), 'verbose_name': 'IPv6 addresses list', 'verbose_name_plural': 'IPv6 addresses lists'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='machine',
|
||||||
|
options={'permissions': (('view_machine', 'Can view a machine object'), ('change_machine_user', 'Can change the user of a machine')), 'verbose_name': 'machine', 'verbose_name_plural': 'machines'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='machinetype',
|
||||||
|
options={'permissions': (('view_machinetype', 'Can view a machine type object'), ('use_all_machinetype', 'Can use all machine types')), 'verbose_name': 'machine type', 'verbose_name_plural': 'machine types'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='mx',
|
||||||
|
options={'permissions': (('view_mx', 'Can view an MX record object'),), 'verbose_name': 'MX record', 'verbose_name_plural': 'MX records'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='nas',
|
||||||
|
options={'permissions': (('view_nas', 'Can view a NAS device object'),), 'verbose_name': 'NAS device', 'verbose_name_plural': 'NAS devices'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='ns',
|
||||||
|
options={'permissions': (('view_ns', 'Can view an NS record object'),), 'verbose_name': 'NS record', 'verbose_name_plural': 'NS records'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='ouvertureport',
|
||||||
|
options={'verbose_name': 'ports openings'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='ouvertureportlist',
|
||||||
|
options={'permissions': (('view_ouvertureportlist', 'Can view a ports opening list object'),), 'verbose_name': 'ports opening list', 'verbose_name_plural': 'ports opening lists'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='role',
|
||||||
|
options={'permissions': (('view_role', 'Can view a role object'),), 'verbose_name': 'server role', 'verbose_name_plural': 'server roles'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='service',
|
||||||
|
options={'permissions': (('view_service', 'Can view a service object'),), 'verbose_name': 'service to generate (DHCP, DNS, ...)', 'verbose_name_plural': 'services to generate (DHCP, DNS, ...)'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='service_link',
|
||||||
|
options={'permissions': (('view_service_link', 'Can view a service server link object'),), 'verbose_name': 'link between service and server', 'verbose_name_plural': 'links between service and server'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='soa',
|
||||||
|
options={'permissions': (('view_soa', 'Can view an SOA record object'),), 'verbose_name': 'SOA record', 'verbose_name_plural': 'SOA records'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='srv',
|
||||||
|
options={'permissions': (('view_srv', 'Can view an SRV record object'),), 'verbose_name': 'SRV record', 'verbose_name_plural': 'SRV records'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='sshfp',
|
||||||
|
options={'permissions': (('view_sshfp', 'Can view an SSHFP record object'),), 'verbose_name': 'SSHFP record', 'verbose_name_plural': 'SSHFP records'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='txt',
|
||||||
|
options={'permissions': (('view_txt', 'Can view a TXT record object'),), 'verbose_name': 'TXT record', 'verbose_name_plural': 'TXT records'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='vlan',
|
||||||
|
options={'permissions': (('view_vlan', 'Can view a VLAN object'),), 'verbose_name': 'VLAN', 'verbose_name_plural': 'VLANs'},
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='domain',
|
||||||
|
name='name',
|
||||||
|
field=models.CharField(help_text='Mandatory and unique, must not contain dots.', max_length=255),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='extension',
|
||||||
|
name='name',
|
||||||
|
field=models.CharField(help_text='Zone name, must begin with a dot (.example.org)', max_length=255, unique=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='extension',
|
||||||
|
name='origin',
|
||||||
|
field=models.ForeignKey(blank=True, help_text='A record associated with the zone', null=True, on_delete=django.db.models.deletion.PROTECT, to='machines.IpList'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='extension',
|
||||||
|
name='origin_v6',
|
||||||
|
field=models.GenericIPAddressField(blank=True, help_text='AAAA record associated with the zone', null=True, protocol='IPv6'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='iptype',
|
||||||
|
name='domaine_ip_netmask',
|
||||||
|
field=models.IntegerField(default=24, help_text="Netmask for the domain's IPv4 range", validators=[django.core.validators.MaxValueValidator(31), django.core.validators.MinValueValidator(8)]),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='iptype',
|
||||||
|
name='domaine_ip_network',
|
||||||
|
field=models.GenericIPAddressField(blank=True, help_text="Network containing the domain's IPv4 range (optional)", null=True, protocol='IPv4'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='iptype',
|
||||||
|
name='reverse_v4',
|
||||||
|
field=models.BooleanField(default=False, help_text='Enable reverse DNS for IPv4'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='iptype',
|
||||||
|
name='reverse_v6',
|
||||||
|
field=models.BooleanField(default=False, help_text='Enable reverse DNS for IPv6'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='machine',
|
||||||
|
name='name',
|
||||||
|
field=models.CharField(blank=True, help_text='Optional', max_length=255, null=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='ouvertureportlist',
|
||||||
|
name='name',
|
||||||
|
field=models.CharField(help_text='Name of the ports configuration', max_length=255),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='role',
|
||||||
|
name='specific_role',
|
||||||
|
field=models.CharField(blank=True, choices=[('dhcp-server', 'DHCP server'), ('switch-conf-server', 'Switches configuration server'), ('dns-recursif-server', 'Recursive DNS server'), ('ntp-server', 'NTP server'), ('radius-server', 'RADIUS server'), ('log-server', 'Log server'), ('ldap-master-server', 'LDAP master server'), ('ldap-backup-server', 'LDAP backup server'), ('smtp-server', 'SMTP server'), ('postgresql-server', 'postgreSQL server'), ('mysql-server', 'mySQL server'), ('sql-client', 'SQL client'), ('gateway', 'Gateway')], max_length=32, null=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='service',
|
||||||
|
name='min_time_regen',
|
||||||
|
field=models.DurationField(default=datetime.timedelta(0, 60), help_text='Minimal time before regeneration of the service.'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='service',
|
||||||
|
name='regular_time_regen',
|
||||||
|
field=models.DurationField(default=datetime.timedelta(0, 3600), help_text='Maximal time before regeneration of the service.'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soa',
|
||||||
|
name='expire',
|
||||||
|
field=models.PositiveIntegerField(default=3600000, help_text='Seconds before the secondary DNS stop answering requests in case of primary DNS timeout'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soa',
|
||||||
|
name='mail',
|
||||||
|
field=models.EmailField(help_text='Contact email address for the zone', max_length=254),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soa',
|
||||||
|
name='refresh',
|
||||||
|
field=models.PositiveIntegerField(default=86400, help_text='Seconds before the secondary DNS have to ask the primary DNS serial to detect a modification'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soa',
|
||||||
|
name='retry',
|
||||||
|
field=models.PositiveIntegerField(default=7200, help_text='Seconds before the secondary DNS ask the serial again in case of a primary DNS timeout'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soa',
|
||||||
|
name='ttl',
|
||||||
|
field=models.PositiveIntegerField(default=172800, help_text='Time to Live'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='srv',
|
||||||
|
name='port',
|
||||||
|
field=models.PositiveIntegerField(help_text='TCP/UDP port', validators=[django.core.validators.MaxValueValidator(65535)]),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='srv',
|
||||||
|
name='priority',
|
||||||
|
field=models.PositiveIntegerField(default=0, help_text='Priority of the target server (positive integer value, the lower it is, the more the server will be used if available)', validators=[django.core.validators.MaxValueValidator(65535)]),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='srv',
|
||||||
|
name='target',
|
||||||
|
field=models.ForeignKey(help_text='Target server', on_delete=django.db.models.deletion.PROTECT, to='machines.Domain'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='srv',
|
||||||
|
name='ttl',
|
||||||
|
field=models.PositiveIntegerField(default=172800, help_text='Time to Live'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='srv',
|
||||||
|
name='weight',
|
||||||
|
field=models.PositiveIntegerField(default=0, help_text='Relative weight for records with the same priority (integer value between 0 and 65535)', validators=[django.core.validators.MaxValueValidator(65535)]),
|
||||||
|
),
|
||||||
|
]
|
File diff suppressed because it is too large
Load diff
|
@ -23,25 +23,26 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Alias</th>
|
<th>{% trans "Aliases" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for alias in alias_list %}
|
{% for alias in alias_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ alias }}</td>
|
<td>{{ alias }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit alias %}
|
{% can_edit alias %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button alias %}
|
{% history_button alias %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Target zone</th>
|
<th>{% trans "Target zone" %}</th>
|
||||||
<th>Record</th>
|
<th>{% trans "Record" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for dname in dname_list %}
|
{% for dname in dname_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ dname.zone }}</td>
|
<td>{{ dname.zone }}</td>
|
||||||
<td>{{ dname.dns_entry }}</td>
|
<td>{{ dname.dns_entry }}</td>
|
||||||
|
@ -39,10 +40,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% can_edit dname %}
|
{% can_edit dname %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button dname %}
|
{% history_button dname %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,17 +25,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
{% load design %}
|
{% load design %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Extension</th>
|
<th>{% trans "Extension" %}</th>
|
||||||
<th>Droit infra pour utiliser ?</th>
|
<th>{% trans "'infra' right required" %}</th>
|
||||||
<th>Enregistrement SOA</th>
|
<th>{% trans "SOA record" %}</th>
|
||||||
<th>Enregistrement A origin</th>
|
<th>{% trans "A record origin" %}</th>
|
||||||
{% if ipv6_enabled %}
|
{% if ipv6_enabled %}
|
||||||
<th>Enregistrement AAAA origin</th>
|
<th>{% trans "AAAA record origin" %}</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -44,7 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ extension.name }}</td>
|
<td>{{ extension.name }}</td>
|
||||||
<td>{{ extension.need_infra|tick }}</td>
|
<td>{{ extension.need_infra|tick }}</td>
|
||||||
<td>{{ extension.soa}}</td>
|
<td>{{ extension.soa }}</td>
|
||||||
<td>{{ extension.origin }}</td>
|
<td>{{ extension.origin }}</td>
|
||||||
{% if ipv6_enabled %}
|
{% if ipv6_enabled %}
|
||||||
<td>{{ extension.origin_v6 }}</td>
|
<td>{{ extension.origin_v6 }}</td>
|
||||||
|
@ -59,3 +60,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -26,18 +26,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Type d'ip</th>
|
<th>{% trans "IP type" %}</th>
|
||||||
<th>Extension</th>
|
<th>{% trans "Extension" %}</th>
|
||||||
<th>Nécessite l'autorisation infra</th>
|
<th>{% trans "'infra' right required" %}</th>
|
||||||
<th>Plage ipv4</th>
|
<th>{% trans "IPv4 range" %}</th>
|
||||||
<th>Préfixe v6</th>
|
<th>{% trans "v6 prefix" %}</th>
|
||||||
<th>DNSSEC reverse v4/v6</th>
|
<th>{% trans "DNSSEC reverse v4/v6" %}</th>
|
||||||
<th>Sur vlan</th>
|
<th>{% trans "On VLAN(s)" %}</th>
|
||||||
<th>Ouverture ports par défault</th>
|
<th>{% trans "Default ports opening" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -61,3 +63,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -24,29 +24,30 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Ipv6</th>
|
<th>{% trans "IPv6 addresses" %}</th>
|
||||||
<th>Slaac</th>
|
<th>{% trans "SLAAC" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for ipv6 in ipv6_list %}
|
{% for ipv6 in ipv6_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ ipv6.ipv6 }}</td>
|
<td>{{ ipv6.ipv6 }}</td>
|
||||||
<td>{{ ipv6.slaac_ip }}</td>
|
<td>{{ ipv6.slaac_ip }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit ipv6 %}
|
{% can_edit ipv6 %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_delete ipv6 %}
|
{% can_delete ipv6 %}
|
||||||
{% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %}
|
{% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button ipv6 %}
|
{% history_button ipv6 %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
{% if machines_list.paginator %}
|
{% if machines_list.paginator %}
|
||||||
|
@ -39,23 +40,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<col width="144px">
|
<col width="144px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<th>{% include "buttons/sort.html" with prefix='machine' col='name' text='Nom DNS' %}</th>
|
{% trans "DNS name" as tr_dns_name %}
|
||||||
<th>Type</th>
|
<th>{% include "buttons/sort.html" with prefix='machine' col='name' text=tr_dns_name %}</th>
|
||||||
<th>MAC</th>
|
<th>{% trans "Type" %}</th>
|
||||||
<th>IP</th>
|
<th>{% trans "MAC address" %}</th>
|
||||||
<th>Actions</th>
|
<th>{% trans "IP address" %}</th>
|
||||||
|
<th>{% trans "Actions" %}</th>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for machine in machines_list %}
|
{% for machine in machines_list %}
|
||||||
<tr class="info">
|
<tr class="info">
|
||||||
<td colspan="4">
|
<td colspan="4">
|
||||||
<b>{{ machine.name|default:'<i>Pas de nom</i>' }}</b> <i class="fa-angle-right"></i>
|
{% trans "No name" as tr_no_name %}
|
||||||
<a href="{% url 'users:profil' userid=machine.user.id %}" title="Voir le profil">
|
{% trans "View the profile" as tr_view_the_profile %}
|
||||||
|
<b>{{ machine.name|default:'<i>tr_no_name</i>' }}</b> <i class="fa-angle-right"></i>
|
||||||
|
<a href="{% url 'users:profil' userid=machine.user.id %}" title=tr_view_the_profile>
|
||||||
<i class="fa fa-user"></i> {{ machine.user }}
|
<i class="fa fa-user"></i> {{ machine.user }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_create Interface machine.id %}
|
{% can_create Interface machine.id %}
|
||||||
{% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc='Ajouter une interface' %}
|
{% trans "Create an interface" as tr_create_an_interface %}
|
||||||
|
{% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc=tr_create_an_interface %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button machine %}
|
{% history_button machine %}
|
||||||
{% can_delete machine %}
|
{% can_delete machine %}
|
||||||
|
@ -68,8 +73,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<td>
|
<td>
|
||||||
{% if interface.domain.related_domain.all %}
|
{% if interface.domain.related_domain.all %}
|
||||||
{{ interface.domain }}
|
{{ interface.domain }}
|
||||||
<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="#collapseDomain_{{ interface.id }}" aria-expanded="true" aria-controls="collapseDomain_{{ interface.id }}">
|
||||||
Afficher les alias
|
{% trans "Display the aliases" %}
|
||||||
</button>
|
</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ interface.domain }}
|
{{ interface.domain }}
|
||||||
|
@ -77,7 +82,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ interface.type }}
|
{{ interface.type }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ interface.mac_address }}
|
{{ interface.mac_address }}
|
||||||
</td>
|
</td>
|
||||||
|
@ -86,8 +91,8 @@ 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="#collapseIpv6_{{interface.id}}" aria-expanded="true" aria-controls="collapseIpv6_{{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
|
{% trans "Display the IPv6 address" %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
@ -97,39 +102,44 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<button class="btn btn-primary btn-sm 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">
|
||||||
<i class="fa fa-edit"></i> <span class="caret"></span>
|
<i class="fa fa-edit"></i> <span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu pull-right" aria-labelledby="editioninterface">
|
<ul class="dropdown-menu" aria-labelledby="editioninterface">
|
||||||
{% can_edit interface %}
|
{% can_edit interface %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'machines:edit-interface' interface.id %}">
|
<a href="{% url 'machines:edit-interface' interface.id %}">
|
||||||
<i class="fa fa-edit"></i> Editer
|
<i class="fa fa-edit"></i>
|
||||||
|
{% trans " Edit"%}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_create Domain interface.id %}
|
{% can_create Domain interface.id %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'machines:index-alias' interface.id %}">
|
<a href="{% url 'machines:index-alias' interface.id %}">
|
||||||
<i class="fa fa-edit"></i> Gerer les alias
|
<i class="fa fa-edit"></i>
|
||||||
|
{% trans " Manage the aliases" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_create Ipv6List interface.id %}
|
{% can_create Ipv6List interface.id %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'machines:index-ipv6' interface.id %}">
|
<a href="{% url 'machines:index-ipv6' interface.id %}">
|
||||||
<i class="fa fa-edit"></i> Gerer les ipv6
|
<i class="fa fa-edit"></i>
|
||||||
|
{% trans " Manage the IPv6 addresses" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_create SshFp interface.machine.id %}
|
{% can_create SshFp interface.machine.id %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'machines:index-sshfp' interface.machine.id %}">
|
<a href="{% url 'machines:index-sshfp' interface.machine.id %}">
|
||||||
<i class="fa fa-edit"></i> Manage the SSH fingerprints
|
<i class="fa fa-edit"></i>
|
||||||
|
{% trans " Manage the SSH fingerprints" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_create OuverturePortList %}
|
{% can_create OuverturePortList %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'machines:port-config' interface.id%}">
|
<a href="{% url 'machines:port-config' interface.id%}">
|
||||||
<i class="fa fa-edit"></i> Gerer la configuration des ports
|
<i class="fa fa-edit"></i>
|
||||||
|
{% trans " Manage the ports configuration" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
|
@ -142,61 +152,57 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
</div>
|
</div>
|
||||||
</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="collapseIpv6_{{interface.id}}">
|
<div class="collapse in" id="collapseIpv6_{{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;">
|
||||||
{{ipv6}}
|
{{ ipv6 }}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if interface.domain.related_domain.all %}
|
||||||
|
<tr>
|
||||||
{% if interface.domain.related_domain.all %}
|
<td colspan=5 style="border-top: none; padding: 1px;">
|
||||||
<tr>
|
<div class="collapse in" id="collapseDomain_{{interface.id}}">
|
||||||
<td colspan=5 style="border-top: none; padding: 1px;">
|
<ul class="list-group" style="margin-bottom: 0px;">
|
||||||
<div class="collapse in" id="collapseDomain_{{interface.id}}">
|
{% 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 %}
|
<a href="http://{{ al }}">
|
||||||
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;">
|
{{ al }}
|
||||||
<a href="http://{{ al }}">
|
<i class="fa fa-share"></i>
|
||||||
{{ al }}
|
</a>
|
||||||
<i class="fa fa-share"></i>
|
</li>
|
||||||
</a>
|
{% endfor %}
|
||||||
</li>
|
</ul>
|
||||||
{% endfor %}
|
</div>
|
||||||
</ul>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
</td>
|
{% endif %}
|
||||||
<tr>
|
{% endfor %}
|
||||||
{% endif %}
|
<tr>
|
||||||
{% endfor %}
|
<td colspan="8"></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td colspan="8"></td>
|
{% endfor %}
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
</thead>
|
||||||
</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 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 %}];
|
||||||
for (var i=0 ; i<alias_div.length ; i++) {
|
for (var i=0 ; i<alias_div.length ; i++) {
|
||||||
alias_div[i].collapse('hide');
|
alias_div[i].collapse('hide');
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
$("#machines_table").ready( function() {
|
$("#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 %}];
|
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');
|
ipv6_div[i].collapse('hide');
|
||||||
}
|
}
|
||||||
|
@ -207,3 +213,4 @@ $("#machines_table").ready( function() {
|
||||||
{% include "pagination.html" with list=machines_list %}
|
{% include "pagination.html" with list=machines_list %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -24,26 +24,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Type de machine</th>
|
<th>{% trans "Machine type" %}</th>
|
||||||
<th>Type d'ip correspondant</th>
|
<th>{% trans "Matching IP type" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for type in machinetype_list %}
|
{% for type in machinetype_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ type.type }}</td>
|
<td>{{ type.type }}</td>
|
||||||
<td>{{ type.ip_type }}</td>
|
<td>{{ type.ip_type }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit type %}
|
{% can_edit type %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button type %}
|
{% history_button type %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -24,30 +24,29 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Zone concernée</th>
|
<th>{% trans "Concerned zone" %}</th>
|
||||||
<th>Priorité</th>
|
<th>{% trans "Priority" %}</th>
|
||||||
<th>Enregistrement</th>
|
<th>{% trans "Record" %}</th>
|
||||||
<th></th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for mx in mx_list %}
|
{% for mx in mx_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ mx.zone }}</td>
|
<td>{{ mx.zone }}</td>
|
||||||
<td>{{ mx.priority }}</td>
|
<td>{{ mx.priority }}</td>
|
||||||
<td>{{ mx.name }}</td>
|
<td>{{ mx.name }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit mx %}
|
{% can_edit mx %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button mx %}
|
{% history_button mx %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,32 +25,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
{% load design %}
|
{% load design %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Nom</th>
|
<th>{% trans "Name" %}</th>
|
||||||
<th>Type du nas</th>
|
<th>{% trans "NAS device type" %}</th>
|
||||||
<th>Type de machine reliées au nas</th>
|
<th>{% trans "Machine type linked to the NAS device" %}</th>
|
||||||
<th>Mode d'accès</th>
|
<th>{% trans "Access mode" %}</th>
|
||||||
<th>Autocapture mac</th>
|
<th>{% trans "MAC address auto capture" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for nas in nas_list %}
|
{% for nas in nas_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ nas.name }}</td>
|
<td>{{ nas.name }}</td>
|
||||||
<td>{{ nas.nas_type }}</td>
|
<td>{{ nas.nas_type }}</td>
|
||||||
<td>{{ nas.machine_type }}</td>
|
<td>{{ nas.machine_type }}</td>
|
||||||
<td>{{ nas.port_access_mode }}</td>
|
<td>{{ nas.port_access_mode }}</td>
|
||||||
<td>{{ nas.autocapture_mac|tick }}</td>
|
<td>{{ nas.autocapture_mac|tick }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit nas %}
|
{% can_edit nas %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button nas %}
|
{% history_button nas %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -24,28 +24,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Zone concernée</th>
|
<th>{% trans "Concerned zone" %}</th>
|
||||||
<th>Interface autoritaire de la zone</th>
|
<th>{% trans "Authoritarian interface for the concerned zone" %}</th>
|
||||||
<th></th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for ns in ns_list %}
|
{% for ns in ns_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ ns.zone }}</td>
|
<td>{{ ns.zone }}</td>
|
||||||
<td>{{ ns.ns }}</td>
|
<td>{{ ns.ns }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit ns %}
|
{% can_edit ns %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-ns' id=ns.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-ns' id=ns.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button ns %}
|
{% history_button ns %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for role in role_list %}
|
{% for role in role_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ role.role_type }}</td>
|
<td>{{ role.role_type }}</td>
|
||||||
<td>{{ role.specific_role }}</td>
|
<td>{{ role.specific_role }}</td>
|
||||||
<td>{% for serv in role.servers.all %}{{ serv }}, {% endfor %}</td>
|
<td>{% for serv in role.servers.all %}{{ serv }}, {% endfor %}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit role %}
|
{% can_edit role %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-role' id=role.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-role' id=role.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button role %}
|
{% history_button role %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -23,27 +23,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load design %}
|
{% load design %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Nom du service</th>
|
<th>{% trans "Service name" %}</th>
|
||||||
<th>Serveur</th>
|
<th>{% trans "Server" %}</th>
|
||||||
<th>Dernière régénération</th>
|
<th>{% trans "Last regeneration" %}</th>
|
||||||
<th>Régénération nécessaire</th>
|
<th>{% trans "Regeneration required" %}</th>
|
||||||
<th>Régénération activée</th>
|
<th>{% trans "Regeneration activated" %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for server in servers_list %}
|
{% for server in servers_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ server.service }}</td>
|
<td>{{ server.service }}</td>
|
||||||
<td>{{ server.server }}</td>
|
<td>{{ server.server }}</td>
|
||||||
<td>{{ server.last_regen }}</td>
|
<td>{{ server.last_regen }}</td>
|
||||||
<td>{{ server.asked_regen| tick }}</td>
|
<td>{{ server.asked_regen|tick }}</td>
|
||||||
<td>{{ server.need_regen | tick }}</td>
|
<td>{{ server.need_regen|tick }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -24,32 +24,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Nom du service</th>
|
<th>{% trans "Service name" %}</th>
|
||||||
<th>Temps minimum avant nouvelle régénération</th>
|
<th>{% trans "Minimal time before regeneration" %}</th>
|
||||||
<th>Temps avant nouvelle génération obligatoire (max)</th>
|
<th>{% trans "Maximal time before regeneration" %}</th>
|
||||||
<th>Serveurs inclus</th>
|
<th>{% trans "Included servers" %}</th>
|
||||||
<th>Demander la regeneration</th>
|
<th>{% trans "Ask for regeneration" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for service in service_list %}
|
{% for service in service_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ service.service_type }}</td>
|
<td>{{ service.service_type }}</td>
|
||||||
<td>{{ service.min_time_regen }}</td>
|
<td>{{ service.min_time_regen }}</td>
|
||||||
<td>{{ service.regular_time_regen }}</td>
|
<td>{{ service.regular_time_regen }}</td>
|
||||||
<td>{% for serv in service.servers.all %}{{ serv }}, {% endfor %}</td>
|
<td>{% for serv in service.servers.all %}{{ serv }}, {% endfor %}</td>
|
||||||
<td><a role="button" class="btn btn-danger" href="{% url 'machines:regen-service' service.id %}"><i class="fas fa-sync"></i></a></td>
|
<td><a role="button" class="btn btn-danger" href="{% url 'machines:regen-service' service.id %}"><i class="fa fa-sync"></i></a></td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit service %}
|
{% can_edit service %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-service' id=service.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-service' id=service.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button service %}
|
{% history_button service %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -24,36 +24,35 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Nom</th>
|
<th>{% trans "Name" %}</th>
|
||||||
<th>Mail</th>
|
<th>{% trans "Mail" %}</th>
|
||||||
<th>Refresh</th>
|
<th>{% trans "Refresh" %}</th>
|
||||||
<th>Retry</th>
|
<th>{% trans "Retry" %}</th>
|
||||||
<th>Expire</th>
|
<th>{% trans "Expire" %}</th>
|
||||||
<th>TTL</th>
|
<th>{% trans "TTL" %}</th>
|
||||||
<th></th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for soa in soa_list %}
|
{% for soa in soa_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ soa.name }}</td>
|
<td>{{ soa.name }}</td>
|
||||||
<td>{{ soa.mail }}</td>
|
<td>{{ soa.mail }}</td>
|
||||||
<td>{{ soa.refresh }}</td>
|
<td>{{ soa.refresh }}</td>
|
||||||
<td>{{ soa.retry }}</td>
|
<td>{{ soa.retry }}</td>
|
||||||
<td>{{ soa.expire }}</td>
|
<td>{{ soa.expire }}</td>
|
||||||
<td>{{ soa.ttl }}</td>
|
<td>{{ soa.ttl }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit soa %}
|
{% can_edit soa %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-soa' id=soa.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-soa' id=soa.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button soa %}
|
{% history_button soa %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,40 +24,39 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Service</th>
|
<th>{% trans "Service" %}</th>
|
||||||
<th>Protocole</th>
|
<th>{% trans "Protocol" %}</th>
|
||||||
<th>Extension</th>
|
<th>{% trans "Extension" %}</th>
|
||||||
<th>TTL</th>
|
<th>{% trans "TTL" %}</th>
|
||||||
<th>Priorité</th>
|
<th>{% trans "Priority" %}</th>
|
||||||
<th>Poids</th>
|
<th>{% trans "Weight" %}</th>
|
||||||
<th>Port</th>
|
<th>{% trans "Port" %}</th>
|
||||||
<th>Cible</th>
|
<th>{% trans "Target" %}</th>
|
||||||
<th></th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for srv in srv_list %}
|
{% for srv in srv_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ srv.service }}</td>
|
<td>{{ srv.service }}</td>
|
||||||
<td>{{ srv.protocole }}</td>
|
<td>{{ srv.protocole }}</td>
|
||||||
<td>{{ srv.extension }}</td>
|
<td>{{ srv.extension }}</td>
|
||||||
<td>{{ srv.ttl }}</td>
|
<td>{{ srv.ttl }}</td>
|
||||||
<td>{{ srv.priority }}</td>
|
<td>{{ srv.priority }}</td>
|
||||||
<td>{{ srv.weight }}</td>
|
<td>{{ srv.weight }}</td>
|
||||||
<td>{{ srv.port }}</td>
|
<td>{{ srv.port }}</td>
|
||||||
<td>{{ srv.target }}</td>
|
<td>{{ srv.target }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit srv %}
|
{% can_edit srv %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-srv' id=srv.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-srv' id=srv.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button srv %}
|
{% history_button srv %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,33 +21,34 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped long_text">
|
<table class="table table-striped long_text">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="long_text">SSH public key</th>
|
<th class="long_text">{% trans "SSH public key" %}</th>
|
||||||
<th>Algorithm used</th>
|
<th>{% trans "Algorithm used" %}</th>
|
||||||
<th>Comment</th>
|
<th>{% trans "Comment" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for sshfp in sshfp_list %}
|
{% for sshfp in sshfp_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="long_text">{{ sshfp.pub_key_entry }}</td>
|
<td class="long_text">{{ sshfp.pub_key_entry }}</td>
|
||||||
<td>{{ sshfp.algo }}</td>
|
<td>{{ sshfp.algo }}</td>
|
||||||
<td>{{ sshfp.comment }}</td>
|
<td>{{ sshfp.comment }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit sshfp %}
|
{% can_edit sshfp %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-sshfp' id=sshfp.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-sshfp' id=sshfp.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_delete sshfp %}
|
{% history_button sshfp %}
|
||||||
{% include 'buttons/suppr.html' with href='machines:del-sshfp' id=sshfp.id %}
|
{% can_delete sshfp %}
|
||||||
{% acl_end %}
|
{% include 'buttons/suppr.html' with href='machines:del-sshfp' id=sshfp.id %}
|
||||||
{% history_button sshfp %}
|
{% acl_end %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,28 +24,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Zone concernée</th>
|
<th>{% trans "Concerned zone" %}</th>
|
||||||
<th>Enregistrement</th>
|
<th>{% trans "Record" %}</th>
|
||||||
<th></th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for txt in text_list %}
|
{% for txt in txt_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ txt.zone }}</td>
|
<td>{{ txt.zone }}</td>
|
||||||
<td>{{ txt.dns_entry }}</td>
|
<td>{{ txt.dns_entry }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit txt %}
|
{% can_edit txt %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-txt' id=txt.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-txt' id=txt.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button txt %}
|
{% history_button txt %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,31 +24,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load logs_extra %}
|
{% load logs_extra %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Id</th>
|
<th>{% trans "ID" %}</th>
|
||||||
<th>Nom</th>
|
<th>{% trans "Name" %}</th>
|
||||||
<th>Commentaire</th>
|
<th>{% trans "Comment" %}</th>
|
||||||
<th>Ranges ip</th>
|
<th>{% trans "IP ranges" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for vlan in vlan_list %}
|
{% for vlan in vlan_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ vlan.vlan_id }}</td>
|
<td>{{ vlan.vlan_id }}</td>
|
||||||
<td>{{ vlan.name }}</td>
|
<td>{{ vlan.name }}</td>
|
||||||
<td>{{ vlan.comment }}</td>
|
<td>{{ vlan.comment }}</td>
|
||||||
<td>{% for range in vlan.iptype_set.all %}{{ range }}, {% endfor%}</td>
|
<td>{% for range in vlan.iptype_set.all %}{{ range }}, {% endfor%}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_edit vlan %}
|
{% can_edit vlan %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-vlan' id=vlan.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-vlan' id=vlan.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% history_button vlan %}
|
{% history_button vlan %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -24,17 +24,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Création et modification de machines{% endblock %}
|
{% block title %}{% trans "Creation and editing of machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<h4>Attention, voulez-vous vraiment supprimer cet objet {{ objet_name }} ( {{ objet }} ) ?</h4>
|
<h4>{% blocktrans %}Warning: are you sure you want to delete this object {{ objet_name }} ( {{ objet }} )?{% endblocktrans %}</h4>
|
||||||
{% bootstrap_button "Confirmer" button_type="submit" icon="trash" %}
|
{% trans "Confirm" as tr_confirm %}
|
||||||
|
{% bootstrap_button tr_confirm button_type="submit" icon="trash" %}
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Création et modification de machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% bootstrap_form_errors port_list %}
|
{% bootstrap_form_errors port_list %}
|
||||||
|
@ -46,10 +47,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<input class="btn btn-primary btn-sm" role="button" value="Ajouter un port" id="add_one">
|
{% trans "Add a port" as value %}
|
||||||
|
<input class="btn btn-primary btn-sm" role="button" value=value id="add_one">
|
||||||
</p>
|
</p>
|
||||||
|
{% trans "Create or edit" as tr_create_or_edit %}
|
||||||
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %}
|
{% bootstrap_button tr_create_or_edit button_type="submit" icon="star" %}
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var template = `{{ports.empty_form}}`;
|
var template = `{{ports.empty_form}}`;
|
||||||
|
@ -67,3 +69,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Machines</h2>
|
<h2>{% trans "Machines" %}</h2>
|
||||||
{% include "machines/aff_machines.html" with machines_list=machines_list %}
|
{% include "machines/aff_machines.html" with machines_list=machines_list %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -24,16 +24,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des alias de l'interface</h2>
|
<h2>{% trans "List of the aliases of the interface" %}</h2>
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-alias' interface_id %}"><i class="fa fa-plus"></i> Ajouter un alias</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-alias' interface_id %}"><i class="fa fa-plus"></i>{% trans " Add an alias" %}</a>
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-alias' interface_id %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs alias</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-alias' interface_id %}"><i class="fa fa-trash"></i>{% trans " Delete one or several aliases" %}</a>
|
||||||
{% include "machines/aff_alias.html" with alias_list=alias_list %}
|
{% include "machines/aff_alias.html" with alias_list=alias_list %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -28,57 +28,60 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des extensions</h2>
|
<h2>{% trans "List of extensions" %}</h2>
|
||||||
{% can_create Extension %}
|
{% can_create Extension %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-extension' %}"><i class="fa fa-plus"></i> Ajouter une extension</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-extension' %}"><i class="fa fa-plus"></i>{% trans " Add an extension" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-extension' %}"><i class="fa fa-trash"></i> Supprimer une ou plusieurs extensions</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-extension' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several extensions" %}</a>
|
||||||
{% include "machines/aff_extension.html" with extension_list=extension_list %}
|
{% include "machines/aff_extension.html" with extension_list=extension_list %}
|
||||||
|
|
||||||
<h2>Liste des enregistrements SOA</h2>
|
<h2>{% trans "List of SOA records" %}</h2>
|
||||||
{% can_create SOA %}
|
{% can_create SOA %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-soa' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement SOA</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-soa' %}"><i class="fa fa-plus"></i>{% trans " Add an SOA record" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-soa' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement SOA</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-soa' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several SOA records" %}</a>
|
||||||
{% include "machines/aff_soa.html" with soa_list=soa_list %}
|
{% include "machines/aff_soa.html" with soa_list=soa_list %}
|
||||||
<h2>Liste des enregistrements MX</h2>
|
|
||||||
|
<h2>{% trans "List of MX records" %}</h2>
|
||||||
{% can_create Mx %}
|
{% can_create Mx %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-mx' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement MX</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-mx' %}"><i class="fa fa-plus"></i>{% trans " Add an MX record" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-mx' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement MX</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-mx' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several MX records" %}</a>
|
||||||
{% include "machines/aff_mx.html" with mx_list=mx_list %}
|
{% include "machines/aff_mx.html" with mx_list=mx_list %}
|
||||||
<h2>Liste des enregistrements NS</h2>
|
|
||||||
|
<h2>{% trans "List of NS records" %}</h2>
|
||||||
{% can_create Ns %}
|
{% can_create Ns %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-ns' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement NS</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-ns' %}"><i class="fa fa-plus"></i>{% trans " Add an NS record" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-ns' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement NS</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-ns' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several NS records" %}</a>
|
||||||
{% include "machines/aff_ns.html" with ns_list=ns_list %}
|
{% include "machines/aff_ns.html" with ns_list=ns_list %}
|
||||||
<h2>Liste des enregistrements TXT</h2>
|
|
||||||
|
<h2>{% trans "List of TXT records" %}</h2>
|
||||||
{% can_create Txt %}
|
{% can_create Txt %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-txt' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement TXT</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-txt' %}"><i class="fa fa-plus"></i>{% trans " Add a TXT record" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-txt' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement TXT</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-txt' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several TXT records" %}</a>
|
||||||
{% include "machines/aff_txt.html" with txt_list=txt_list %}
|
{% include "machines/aff_txt.html" with txt_list=txt_list %}
|
||||||
|
|
||||||
<h2>DNAME records</h2>
|
<h2>{% trans "List of DNAME records" %}</h2>
|
||||||
{% can_create DName %}
|
{% can_create DName %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-dname' %}">
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-dname' %}">
|
||||||
<i class="fa fa-plus"></i> {% trans "Add a DNAME record" %}
|
<i class="fa fa-plus"></i> {% trans " Add a DNAME record" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-dname' %}">
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-dname' %}">
|
||||||
<i class="fa fa-trash"></i> {% trans "Delete DNAME records" %}
|
<i class="fa fa-trash"></i> {% trans " Delete one or several DNAME records" %}
|
||||||
</a>
|
</a>
|
||||||
{% include "machines/aff_dname.html" with dname_list=dname_list %}
|
{% include "machines/aff_dname.html" with dname_list=dname_list %}
|
||||||
|
|
||||||
<h2>Liste des enregistrements SRV</h2>
|
<h2>{% trans "List of SRV records" %}</h2>
|
||||||
{% can_create Srv %}
|
{% can_create Srv %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-srv' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement SRV</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-srv' %}"><i class="fa fa-plus"></i>{% trans " Add an SRV record" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-srv' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement SRV</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-srv' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several SRV records" %}</a>
|
||||||
{% include "machines/aff_srv.html" with srv_list=srv_list %}
|
{% include "machines/aff_srv.html" with srv_list=srv_list %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -26,15 +26,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Ip{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des types d'ip</h2>
|
<h2>{% trans "List of IP types" %}</h2>
|
||||||
{% can_create IpType %}
|
{% can_create IpType %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-iptype' %}"><i class="fa fa-plus"></i> Ajouter un type d'ip</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-iptype' %}"><i class="fa fa-plus"></i>{% trans " Add an IP type" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-iptype' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types d'ip</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-iptype' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several IP types" %}</a>
|
||||||
{% include "machines/aff_iptype.html" with iptype_list=iptype_list %}
|
{% include "machines/aff_iptype.html" with iptype_list=iptype_list %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -25,13 +25,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des ipv6 de l'interface</h2>
|
<h2>{% trans "List of the IPv6 addresses of the interface" %}</h2>
|
||||||
{% can_create Ipv6List interface_id %}
|
{% can_create Ipv6List interface_id %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-ipv6list' interface_id %}"><i class="fa fa-plus"></i> Ajouter une ipv6</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-ipv6list' interface_id %}"><i class="fa fa-plus"></i>{% trans " Add an IPv6 address" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% include "machines/aff_ipv6.html" with ipv6_list=ipv6_list %}
|
{% include "machines/aff_ipv6.html" with ipv6_list=ipv6_list %}
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -26,15 +26,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des types de machines</h2>
|
<h2>{% trans "List of machine types" %}</h2>
|
||||||
{% can_create MachineType %}
|
{% can_create MachineType %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-machinetype' %}"><i class="fa fa-plus"></i> Ajouter un type de machine</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-machinetype' %}"><i class="fa fa-plus"></i>{% trans " Add a machine type" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-machinetype' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types de machines</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-machinetype' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several machine types" %}</a>
|
||||||
{% include "machines/aff_machinetype.html" with machinetype_list=machinetype_list %}
|
{% include "machines/aff_machinetype.html" with machinetype_list=machinetype_list %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -26,17 +26,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des nas</h2>
|
<h2>{% trans "List of NAS devices" %}</h2>
|
||||||
<h5>La correpondance nas-machinetype relie le type de nas à un type de machine.
|
<h5>{% trans "The NAS device type and machine type are linked. It is useful for MAC address auto capture by RADIUS, and allows to choose the machine type to assign to the machines according to the NAS device type." %}</h5>
|
||||||
Elle est utile pour l'autoenregistrement des macs par radius, et permet de choisir le type de machine à affecter aux machines en fonction du type de nas</h5>
|
|
||||||
{% can_create Nas %}
|
{% can_create Nas %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-nas' %}"><i class="fa fa-plus"></i> Ajouter un type de nas</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-nas' %}"><i class="fa fa-plus"></i>{% trans " Add a NAS device type" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-nas' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types nas</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-nas' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several NAS device types" %}</a>
|
||||||
{% include "machines/aff_nas.html" with nas_list=nas_list %}
|
{% include "machines/aff_nas.html" with nas_list=nas_list %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -3,23 +3,24 @@
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Configuration de ports{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des configurations de ports</h2>
|
<h2>{% trans "List of ports configurations" %}</h2>
|
||||||
{% can_create OuverturePortList %}
|
{% can_create OuverturePortList %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-portlist' %}"><i class="fa fa-plus"></i>Ajouter une configuration</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-portlist' %}"><i class="fa fa-plus"></i>{% trans " Add a configuration" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Nom</th>
|
<th>{% trans "Name" %}</th>
|
||||||
<th>TCP (entrée)</th>
|
<th>{% trans "TCP (input)" %}</th>
|
||||||
<th>TCP (sortie)</th>
|
<th>{% trans "TCP (output)" %}</th>
|
||||||
<th>UDP (entrée)</th>
|
<th>{% trans "UDP (input)" %}</th>
|
||||||
<th>UDP (sortie)</th>
|
<th>{% trans "UDP (output)" %}</th>
|
||||||
<th>Machines</th>
|
<th>{% trans "Machines" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -48,13 +49,13 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% can_delete pl %}
|
|
||||||
{% include 'buttons/suppr.html' with href='machines:del-portlist' id=pl.id %}
|
|
||||||
{% acl_end %}
|
|
||||||
{% can_edit pl %}
|
{% can_edit pl %}
|
||||||
{% include 'buttons/edit.html' with href='machines:edit-portlist' id=pl.id %}
|
{% include 'buttons/edit.html' with href='machines:edit-portlist' id=pl.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
</td>
|
{% can_delete pl %}
|
||||||
|
{% include 'buttons/suppr.html' with href='machines:del-portlist' id=pl.id %}
|
||||||
|
{% acl_end %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{%endfor%}
|
{%endfor%}
|
||||||
</table>
|
</table>
|
||||||
|
@ -63,3 +64,4 @@
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{% trans "Roles list" %}</h2>
|
<h2>{% trans "List of roles" %}</h2>
|
||||||
{% can_create Role %}
|
{% can_create Role %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-role' %}"><i class="fa fa-plus"></i> {% trans "Add role"%}</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-role' %}"><i class="fa fa-plus"></i>{% trans " Add a role"%}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-role' %}"><i class="fa fa-trash"></i> {% trans "Delete one or several roles" %}</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-role' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several roles" %}</a>
|
||||||
{% include "machines/aff_role.html" with role_list=role_list %}
|
{% include "machines/aff_role.html" with role_list=role_list %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -25,17 +25,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des services</h2>
|
<h2>{% trans "List of services" %}</h2>
|
||||||
{% can_create machines.Service %}
|
{% can_create machines.Service %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-service' %}"><i class="fa fa-plus"></i> Ajouter un service</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-service' %}"><i class="fa fa-plus"></i>{% trans " Add a service" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-service' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs service</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-service' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several services" %}</a>
|
||||||
{% include "machines/aff_service.html" with service_list=service_list %}
|
{% include "machines/aff_service.html" with service_list=service_list %}
|
||||||
<h2>Etat des serveurs</h2>
|
<h2>{% trans "States of servers" %}</h2>
|
||||||
{% include "machines/aff_servers.html" with servers_list=servers_list %}
|
{% include "machines/aff_servers.html" with servers_list=servers_list %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -23,16 +23,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>SSH fingerprints</h2>
|
<h2>{% trans "SSH fingerprints" %}</h2>
|
||||||
{% can_create SshFp machine_id %}
|
{% can_create SshFp machine_id %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-sshfp' machine_id %}">
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-sshfp' machine_id %}">
|
||||||
<i class="fa fa-plus"></i> Add an SSH fingerprint
|
<i class="fa fa-plus"></i>{% trans " Add an SSH fingerprint" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% include "machines/aff_sshfp.html" with sshfp_list=sshfp_list %}
|
{% include "machines/aff_sshfp.html" with sshfp_list=sshfp_list %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -26,15 +26,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
|
||||||
{% load acl %}
|
{% load acl %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des vlans</h2>
|
<h2>{% trans "List of VLANs" %}</h2>
|
||||||
{% can_create Vlan %}
|
{% can_create Vlan %}
|
||||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-vlan' %}"><i class="fa fa-plus"></i> Ajouter un vlan</a>
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-vlan' %}"><i class="fa fa-plus"></i>{% trans " Add a VLAN" %}</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-vlan' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs vlan</a>
|
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-vlan' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several VLANs" %}</a>
|
||||||
{% include "machines/aff_vlan.html" with vlan_list=vlan_list %}
|
{% include "machines/aff_vlan.html" with vlan_list=vlan_list %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -26,8 +26,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
{% load massive_bootstrap_form %}
|
{% load massive_bootstrap_form %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Création et modification de machines{% endblock %}
|
{% block title %}{% trans "Machines" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if machineform %}
|
{% if machineform %}
|
||||||
|
@ -88,11 +89,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% if machineform %}
|
{% if machineform %}
|
||||||
<h3>Machine</h3>
|
<h3>{% trans "Machine" %}</h3>
|
||||||
{% massive_bootstrap_form machineform 'user' %}
|
{% massive_bootstrap_form machineform 'user' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if interfaceform %}
|
{% if interfaceform %}
|
||||||
<h3>Interface</h3>
|
<h3>{% trans "Interface" %}</h3>
|
||||||
{% if i_mbf_param %}
|
{% if i_mbf_param %}
|
||||||
{% massive_bootstrap_form interfaceform 'ipv4,machine' mbf_param=i_mbf_param %}
|
{% massive_bootstrap_form interfaceform 'ipv4,machine' mbf_param=i_mbf_param %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -100,55 +101,55 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if domainform %}
|
{% if domainform %}
|
||||||
<h3>Domaine</h3>
|
<h3>{% trans "Domain" %}</h3>
|
||||||
{% bootstrap_form domainform %}
|
{% bootstrap_form domainform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if iptypeform %}
|
{% if iptypeform %}
|
||||||
<h3>Type d'IP</h3>
|
<h3>{% trans "IP type" %}</h3>
|
||||||
{% bootstrap_form iptypeform %}
|
{% bootstrap_form iptypeform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if machinetypeform %}
|
{% if machinetypeform %}
|
||||||
<h3>Type de machine</h3>
|
<h3>{% trans "Machine type" %}</h3>
|
||||||
{% bootstrap_form machinetypeform %}
|
{% bootstrap_form machinetypeform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if extensionform %}
|
{% if extensionform %}
|
||||||
<h3>Extension</h3>
|
<h3>{% trans "Extension" %}</h3>
|
||||||
{% massive_bootstrap_form extensionform 'origin' %}
|
{% massive_bootstrap_form extensionform 'origin' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if soaform %}
|
{% if soaform %}
|
||||||
<h3>Enregistrement SOA</h3>
|
<h3>{% trans "SOA record" %}</h3>
|
||||||
{% bootstrap_form soaform %}
|
{% bootstrap_form soaform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if mxform %}
|
{% if mxform %}
|
||||||
<h3>Enregistrement MX</h3>
|
<h3>{% trans "MX record" %}</h3>
|
||||||
{% massive_bootstrap_form mxform 'name' %}
|
{% massive_bootstrap_form mxform 'name' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if nsform %}
|
{% if nsform %}
|
||||||
<h3>Enregistrement NS</h3>
|
<h3>{% trans "NS record" %}</h3>
|
||||||
{% massive_bootstrap_form nsform 'ns' %}
|
{% massive_bootstrap_form nsform 'ns' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if txtform %}
|
{% if txtform %}
|
||||||
<h3>Enregistrement TXT</h3>
|
<h3>{% trans "TXT record" %}</h3>
|
||||||
{% bootstrap_form txtform %}
|
{% bootstrap_form txtform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if dnameform %}
|
{% if dnameform %}
|
||||||
<h3>DNAME record</h3>
|
<h3>{% trans "DNAME record" %}</h3>
|
||||||
{% bootstrap_form dnameform %}
|
{% bootstrap_form dnameform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if srvform %}
|
{% if srvform %}
|
||||||
<h3>Enregistrement SRV</h3>
|
<h3>{% trans "SRV record" %}</h3>
|
||||||
{% massive_bootstrap_form srvform 'target' %}
|
{% massive_bootstrap_form srvform 'target' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if sshfpform %}
|
{% if sshfpform %}
|
||||||
<h3>SSHFP record</h3>
|
<h3>{% trans "SSHFP record" %}</h3>
|
||||||
{% bootstrap_form sshfpform %}
|
{% bootstrap_form sshfpform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if aliasform %}
|
{% if aliasform %}
|
||||||
<h3>Alias</h3>
|
<h3>{% trans "Alias" %}</h3>
|
||||||
{% bootstrap_form aliasform %}
|
{% bootstrap_form aliasform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if serviceform %}
|
{% if serviceform %}
|
||||||
<h3>Service</h3>
|
<h3>{% trans "Service" %}</h3>
|
||||||
{% massive_bootstrap_form serviceform 'servers' %}
|
{% massive_bootstrap_form serviceform 'servers' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if roleform %}
|
{% if roleform %}
|
||||||
|
@ -156,15 +157,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% massive_bootstrap_form roleform 'servers' %}
|
{% massive_bootstrap_form roleform 'servers' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if vlanform %}
|
{% if vlanform %}
|
||||||
<h3>Vlan</h3>
|
<h3>{% trans "VLAN" %}</h3>
|
||||||
{% bootstrap_form vlanform %}
|
{% bootstrap_form vlanform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if nasform %}
|
{% if nasform %}
|
||||||
<h3>NAS</h3>
|
<h3>{% trans "NAS device" %}</h3>
|
||||||
{% bootstrap_form nasform %}
|
{% bootstrap_form nasform %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if ipv6form %}
|
{% if ipv6form %}
|
||||||
<h3>Ipv6</h3>
|
<h3>{% trans "IPv6 address" %}</h3>
|
||||||
{% bootstrap_form ipv6form %}
|
{% bootstrap_form ipv6form %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% bootstrap_button action_name button_type="submit" icon="star" %}
|
{% bootstrap_button action_name button_type="submit" icon="star" %}
|
||||||
|
@ -173,3 +174,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -30,43 +30,43 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% can_view_all Machine %}
|
{% can_view_all Machine %}
|
||||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index" %}">
|
<a class="list-group-item list-group-item-info" href="{% url "machines:index" %}">
|
||||||
<i class="fa fa-list-ul"></i>
|
<i class="fa fa-list-ul"></i>
|
||||||
Machines
|
{% trans "Machines" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_view_all MachineType %}
|
{% can_view_all MachineType %}
|
||||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-machinetype" %}">
|
<a class="list-group-item list-group-item-info" href="{% url "machines:index-machinetype" %}">
|
||||||
<i class="fa fa-list-ul"></i>
|
<i class="fa fa-list-ul"></i>
|
||||||
Types de machines
|
{% trans "Machine types" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_view_all Extension %}
|
{% can_view_all Extension %}
|
||||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-extension" %}">
|
<a class="list-group-item list-group-item-info" href="{% url "machines:index-extension" %}">
|
||||||
<i class="fa fa-list-ul"></i>
|
<i class="fa fa-list-ul"></i>
|
||||||
Extensions et zones
|
{% trans "Extensions and zones" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_view_all IpType %}
|
{% can_view_all IpType %}
|
||||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-iptype" %}">
|
<a class="list-group-item list-group-item-info" href="{% url "machines:index-iptype" %}">
|
||||||
<i class="fa fa-list-ul"></i>
|
<i class="fa fa-list-ul"></i>
|
||||||
Plages d'IP
|
{% trans "IP ranges" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_view_all Vlan %}
|
{% can_view_all Vlan %}
|
||||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-vlan" %}">
|
<a class="list-group-item list-group-item-info" href="{% url "machines:index-vlan" %}">
|
||||||
<i class="fa fa-list-ul"></i>
|
<i class="fa fa-list-ul"></i>
|
||||||
Vlans
|
{% trans "VLANs" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_view_all Nas %}
|
{% can_view_all Nas %}
|
||||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-nas" %}">
|
<a class="list-group-item list-group-item-info" href="{% url "machines:index-nas" %}">
|
||||||
<i class="fa fa-list-ul"></i>
|
<i class="fa fa-list-ul"></i>
|
||||||
Gestion des nas
|
{% trans "NAS devices" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_view_all machines.Service %}
|
{% can_view_all machines.Service %}
|
||||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-service" %}">
|
<a class="list-group-item list-group-item-info" href="{% url "machines:index-service" %}">
|
||||||
<i class="fa fa-list-ul"></i>
|
<i class="fa fa-list-ul"></i>
|
||||||
Services (dhcp, dns...)
|
{% trans "Services (DHCP, DNS, ...)" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% can_view_all Role %}
|
{% can_view_all Role %}
|
||||||
|
@ -78,7 +78,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% can_view_all OuverturePortList %}
|
{% can_view_all OuverturePortList %}
|
||||||
<a class="list-group-item list-group-item-info" href="{% url "machines:index-portlist" %}">
|
<a class="list-group-item list-group-item-info" href="{% url "machines:index-portlist" %}">
|
||||||
<i class="fa fa-list-ul"></i>
|
<i class="fa fa-list-ul"></i>
|
||||||
Ouverture de ports
|
{% trans "Ports openings" %}
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ def generate_ipv4_choices(form_obj):
|
||||||
"""
|
"""
|
||||||
f_ipv4 = form_obj.fields['ipv4']
|
f_ipv4 = form_obj.fields['ipv4']
|
||||||
used_mtype_id = []
|
used_mtype_id = []
|
||||||
choices = '{"":[{key:"",value:"Choisissez d\'abord un type de machine"},'
|
choices = '{"":[{key:"",value:'+_("Select a machine type first.},")
|
||||||
mtype_id = -1
|
mtype_id = -1
|
||||||
|
|
||||||
for ip in (f_ipv4.queryset
|
for ip in (f_ipv4.queryset
|
||||||
|
@ -255,7 +255,7 @@ def new_machine(request, user, **_kwargs):
|
||||||
new_interface_obj.save()
|
new_interface_obj.save()
|
||||||
new_domain.interface_parent = new_interface_obj
|
new_domain.interface_parent = new_interface_obj
|
||||||
new_domain.save()
|
new_domain.save()
|
||||||
messages.success(request, "La machine a été créée")
|
messages.success(request, _("The machine was created."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'users:profil',
|
'users:profil',
|
||||||
kwargs={'userid': str(user.id)}
|
kwargs={'userid': str(user.id)}
|
||||||
|
@ -267,7 +267,7 @@ def new_machine(request, user, **_kwargs):
|
||||||
'interfaceform': interface,
|
'interfaceform': interface,
|
||||||
'domainform': domain,
|
'domainform': domain,
|
||||||
'i_mbf_param': i_mbf_param,
|
'i_mbf_param': i_mbf_param,
|
||||||
'action_name': 'Créer une machine'
|
'action_name': _("Create a machine")
|
||||||
},
|
},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
|
@ -307,7 +307,7 @@ def edit_interface(request, interface_instance, **_kwargs):
|
||||||
new_interface_obj.save()
|
new_interface_obj.save()
|
||||||
if domain_form.changed_data:
|
if domain_form.changed_data:
|
||||||
new_domain_obj.save()
|
new_domain_obj.save()
|
||||||
messages.success(request, "La machine a été modifiée")
|
messages.success(request, _("The machine was edited."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'users:profil',
|
'users:profil',
|
||||||
kwargs={'userid': str(interface_instance.machine.user.id)}
|
kwargs={'userid': str(interface_instance.machine.user.id)}
|
||||||
|
@ -319,7 +319,7 @@ def edit_interface(request, interface_instance, **_kwargs):
|
||||||
'interfaceform': interface_form,
|
'interfaceform': interface_form,
|
||||||
'domainform': domain_form,
|
'domainform': domain_form,
|
||||||
'i_mbf_param': i_mbf_param,
|
'i_mbf_param': i_mbf_param,
|
||||||
'action_name': 'Editer une interface'
|
'action_name': _("Edit")
|
||||||
},
|
},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
|
@ -332,7 +332,7 @@ def del_machine(request, machine, **_kwargs):
|
||||||
""" Supprime une machine, interfaces en mode cascade"""
|
""" Supprime une machine, interfaces en mode cascade"""
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
machine.delete()
|
machine.delete()
|
||||||
messages.success(request, "La machine a été détruite")
|
messages.success(request, _("The machine was deleted."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'users:profil',
|
'users:profil',
|
||||||
kwargs={'userid': str(machine.user.id)}
|
kwargs={'userid': str(machine.user.id)}
|
||||||
|
@ -361,7 +361,7 @@ def new_interface(request, machine, **_kwargs):
|
||||||
new_interface_obj.save()
|
new_interface_obj.save()
|
||||||
new_domain_obj.interface_parent = new_interface_obj
|
new_domain_obj.interface_parent = new_interface_obj
|
||||||
new_domain_obj.save()
|
new_domain_obj.save()
|
||||||
messages.success(request, "L'interface a été ajoutée")
|
messages.success(request, _("The interface was created."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'users:profil',
|
'users:profil',
|
||||||
kwargs={'userid': str(machine.user.id)}
|
kwargs={'userid': str(machine.user.id)}
|
||||||
|
@ -372,7 +372,7 @@ def new_interface(request, machine, **_kwargs):
|
||||||
'interfaceform': interface_form,
|
'interfaceform': interface_form,
|
||||||
'domainform': domain_form,
|
'domainform': domain_form,
|
||||||
'i_mbf_param': i_mbf_param,
|
'i_mbf_param': i_mbf_param,
|
||||||
'action_name': 'Créer une interface'
|
'action_name': _("Create an interface")
|
||||||
},
|
},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
|
@ -388,7 +388,7 @@ def del_interface(request, interface, **_kwargs):
|
||||||
interface.delete()
|
interface.delete()
|
||||||
if not machine.interface_set.all():
|
if not machine.interface_set.all():
|
||||||
machine.delete()
|
machine.delete()
|
||||||
messages.success(request, "L'interface a été détruite")
|
messages.success(request, _("The interface was deleted."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'users:profil',
|
'users:profil',
|
||||||
kwargs={'userid': str(request.user.id)}
|
kwargs={'userid': str(request.user.id)}
|
||||||
|
@ -413,13 +413,13 @@ def new_ipv6list(request, interface, **_kwargs):
|
||||||
)
|
)
|
||||||
if ipv6.is_valid():
|
if ipv6.is_valid():
|
||||||
ipv6.save()
|
ipv6.save()
|
||||||
messages.success(request, "Ipv6 ajoutée")
|
messages.success(request, _("The IPv6 addresses list was created."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'machines:index-ipv6',
|
'machines:index-ipv6',
|
||||||
kwargs={'interfaceid': str(interface.id)}
|
kwargs={'interfaceid': str(interface.id)}
|
||||||
))
|
))
|
||||||
return form(
|
return form(
|
||||||
{'ipv6form': ipv6, 'action_name': 'Créer'},
|
{'ipv6form': ipv6, 'action_name': _("Create an IPv6 addresses list")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -437,13 +437,13 @@ def edit_ipv6list(request, ipv6list_instance, **_kwargs):
|
||||||
if ipv6.is_valid():
|
if ipv6.is_valid():
|
||||||
if ipv6.changed_data:
|
if ipv6.changed_data:
|
||||||
ipv6.save()
|
ipv6.save()
|
||||||
messages.success(request, "Ipv6 modifiée")
|
messages.success(request, _("The IPv6 addresses list was edited."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'machines:index-ipv6',
|
'machines:index-ipv6',
|
||||||
kwargs={'interfaceid': str(ipv6list_instance.interface.id)}
|
kwargs={'interfaceid': str(ipv6list_instance.interface.id)}
|
||||||
))
|
))
|
||||||
return form(
|
return form(
|
||||||
{'ipv6form': ipv6, 'action_name': 'Editer'},
|
{'ipv6form': ipv6, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -456,7 +456,7 @@ def del_ipv6list(request, ipv6list, **_kwargs):
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
interfaceid = ipv6list.interface.id
|
interfaceid = ipv6list.interface.id
|
||||||
ipv6list.delete()
|
ipv6list.delete()
|
||||||
messages.success(request, "L'ipv6 a été détruite")
|
messages.success(request, _("The IPv6 addresses list was deleted."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'machines:index-ipv6',
|
'machines:index-ipv6',
|
||||||
kwargs={'interfaceid': str(interfaceid)}
|
kwargs={'interfaceid': str(interfaceid)}
|
||||||
|
@ -480,13 +480,13 @@ def new_sshfp(request, machine, **_kwargs):
|
||||||
)
|
)
|
||||||
if sshfp.is_valid():
|
if sshfp.is_valid():
|
||||||
sshfp.save()
|
sshfp.save()
|
||||||
messages.success(request, "The SSHFP record was added")
|
messages.success(request, _("The SSHFP record was created."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'machines:index-sshfp',
|
'machines:index-sshfp',
|
||||||
kwargs={'machineid': str(machine.id)}
|
kwargs={'machineid': str(machine.id)}
|
||||||
))
|
))
|
||||||
return form(
|
return form(
|
||||||
{'sshfpform': sshfp, 'action_name': 'Create'},
|
{'sshfpform': sshfp, 'action_name': _("Create a SSHFP record")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -503,13 +503,13 @@ def edit_sshfp(request, sshfp_instance, **_kwargs):
|
||||||
if sshfp.is_valid():
|
if sshfp.is_valid():
|
||||||
if sshfp.changed_data:
|
if sshfp.changed_data:
|
||||||
sshfp.save()
|
sshfp.save()
|
||||||
messages.success(request, "The SSHFP record was edited")
|
messages.success(request, _("The SSHFP record was edited."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'machines:index-sshfp',
|
'machines:index-sshfp',
|
||||||
kwargs={'machineid': str(sshfp_instance.machine.id)}
|
kwargs={'machineid': str(sshfp_instance.machine.id)}
|
||||||
))
|
))
|
||||||
return form(
|
return form(
|
||||||
{'sshfpform': sshfp, 'action_name': 'Edit'},
|
{'sshfpform': sshfp, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -522,7 +522,7 @@ def del_sshfp(request, sshfp, **_kwargs):
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
machineid = sshfp.machine.id
|
machineid = sshfp.machine.id
|
||||||
sshfp.delete()
|
sshfp.delete()
|
||||||
messages.success(request, "The SSHFP record was deleted")
|
messages.success(request, _("The SSHFP record was deleted."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'machines:index-sshfp',
|
'machines:index-sshfp',
|
||||||
kwargs={'machineid': str(machineid)}
|
kwargs={'machineid': str(machineid)}
|
||||||
|
@ -543,10 +543,10 @@ def add_iptype(request):
|
||||||
iptype = IpTypeForm(request.POST or None)
|
iptype = IpTypeForm(request.POST or None)
|
||||||
if iptype.is_valid():
|
if iptype.is_valid():
|
||||||
iptype.save()
|
iptype.save()
|
||||||
messages.success(request, "Ce type d'ip a été ajouté")
|
messages.success(request, _("The IP type was created."))
|
||||||
return redirect(reverse('machines:index-iptype'))
|
return redirect(reverse('machines:index-iptype'))
|
||||||
return form(
|
return form(
|
||||||
{'iptypeform': iptype, 'action_name': 'Créer'},
|
{'iptypeform': iptype, 'action_name': _("Create an IP type")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -562,10 +562,10 @@ def edit_iptype(request, iptype_instance, **_kwargs):
|
||||||
if iptype.is_valid():
|
if iptype.is_valid():
|
||||||
if iptype.changed_data:
|
if iptype.changed_data:
|
||||||
iptype.save()
|
iptype.save()
|
||||||
messages.success(request, "Type d'ip modifié")
|
messages.success(request, _("The IP type was edited."))
|
||||||
return redirect(reverse('machines:index-iptype'))
|
return redirect(reverse('machines:index-iptype'))
|
||||||
return form(
|
return form(
|
||||||
{'iptypeform': iptype, 'action_name': 'Editer'},
|
{'iptypeform': iptype, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -581,16 +581,16 @@ def del_iptype(request, instances):
|
||||||
for iptype_del in iptype_dels:
|
for iptype_del in iptype_dels:
|
||||||
try:
|
try:
|
||||||
iptype_del.delete()
|
iptype_del.delete()
|
||||||
messages.success(request, "Le type d'ip a été supprimé")
|
messages.success(request, _("The IP type was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Le type d'ip %s est affectée à au moins une machine, "
|
(_("The IP type %s is assigned to at least one machine,"
|
||||||
"vous ne pouvez pas le supprimer" % iptype_del)
|
" you can't delete it.") % iptype_del)
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-iptype'))
|
return redirect(reverse('machines:index-iptype'))
|
||||||
return form(
|
return form(
|
||||||
{'iptypeform': iptype, 'action_name': 'Supprimer'},
|
{'iptypeform': iptype, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -603,10 +603,11 @@ def add_machinetype(request):
|
||||||
machinetype = MachineTypeForm(request.POST or None)
|
machinetype = MachineTypeForm(request.POST or None)
|
||||||
if machinetype.is_valid():
|
if machinetype.is_valid():
|
||||||
machinetype.save()
|
machinetype.save()
|
||||||
messages.success(request, "Ce type de machine a été ajouté")
|
messages.success(request, _("The machine type was created."))
|
||||||
return redirect(reverse('machines:index-machinetype'))
|
return redirect(reverse('machines:index-machinetype'))
|
||||||
return form(
|
return form(
|
||||||
{'machinetypeform': machinetype, 'action_name': 'Créer'},
|
{'machinetypeform': machinetype, 'action_name': _("Create a machine"
|
||||||
|
" type")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -623,10 +624,10 @@ def edit_machinetype(request, machinetype_instance, **_kwargs):
|
||||||
if machinetype.is_valid():
|
if machinetype.is_valid():
|
||||||
if machinetype.changed_data:
|
if machinetype.changed_data:
|
||||||
machinetype.save()
|
machinetype.save()
|
||||||
messages.success(request, "Type de machine modifié")
|
messages.success(request, _("The machine type was edited."))
|
||||||
return redirect(reverse('machines:index-machinetype'))
|
return redirect(reverse('machines:index-machinetype'))
|
||||||
return form(
|
return form(
|
||||||
{'machinetypeform': machinetype, 'action_name': 'Editer'},
|
{'machinetypeform': machinetype, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -642,17 +643,16 @@ def del_machinetype(request, instances):
|
||||||
for machinetype_del in machinetype_dels:
|
for machinetype_del in machinetype_dels:
|
||||||
try:
|
try:
|
||||||
machinetype_del.delete()
|
machinetype_del.delete()
|
||||||
messages.success(request, "Le type de machine a été supprimé")
|
messages.success(request, _("The machine type was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Le type de machine %s est affectée à au moins une "
|
(_("The machine type %s is assigned to at least one"
|
||||||
"machine, vous ne pouvez pas le supprimer"
|
" machine, you can't delete it.") % machinetype_del)
|
||||||
% machinetype_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-machinetype'))
|
return redirect(reverse('machines:index-machinetype'))
|
||||||
return form(
|
return form(
|
||||||
{'machinetypeform': machinetype, 'action_name': 'Supprimer'},
|
{'machinetypeform': machinetype, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -665,10 +665,10 @@ def add_extension(request):
|
||||||
extension = ExtensionForm(request.POST or None)
|
extension = ExtensionForm(request.POST or None)
|
||||||
if extension.is_valid():
|
if extension.is_valid():
|
||||||
extension.save()
|
extension.save()
|
||||||
messages.success(request, "Cette extension a été ajoutée")
|
messages.success(request, _("The extension was created."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'extensionform': extension, 'action_name': 'Créer'},
|
{'extensionform': extension, 'action_name': _("Create an extension")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -685,10 +685,10 @@ def edit_extension(request, extension_instance, **_kwargs):
|
||||||
if extension.is_valid():
|
if extension.is_valid():
|
||||||
if extension.changed_data:
|
if extension.changed_data:
|
||||||
extension.save()
|
extension.save()
|
||||||
messages.success(request, "Extension modifiée")
|
messages.success(request, _("The extension was edited."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'extensionform': extension, 'action_name': 'Editer'},
|
{'extensionform': extension, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -704,17 +704,16 @@ def del_extension(request, instances):
|
||||||
for extension_del in extension_dels:
|
for extension_del in extension_dels:
|
||||||
try:
|
try:
|
||||||
extension_del.delete()
|
extension_del.delete()
|
||||||
messages.success(request, "L'extension a été supprimée")
|
messages.success(request, _("The extension was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("L'extension %s est affectée à au moins un type de "
|
(_("The extension %s is assigned to at least one machine"
|
||||||
"machine, vous ne pouvez pas la supprimer"
|
" type, you can't delete it." % extension_del))
|
||||||
% extension_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'extensionform': extension, 'action_name': 'Supprimer'},
|
{'extensionform': extension, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -727,10 +726,10 @@ def add_soa(request):
|
||||||
soa = SOAForm(request.POST or None)
|
soa = SOAForm(request.POST or None)
|
||||||
if soa.is_valid():
|
if soa.is_valid():
|
||||||
soa.save()
|
soa.save()
|
||||||
messages.success(request, "Cet enregistrement SOA a été ajouté")
|
messages.success(request, _("The SOA record was created."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'soaform': soa, 'action_name': 'Créer'},
|
{'soaform': soa, 'action_name': _("Create an SOA record")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -744,10 +743,10 @@ def edit_soa(request, soa_instance, **_kwargs):
|
||||||
if soa.is_valid():
|
if soa.is_valid():
|
||||||
if soa.changed_data:
|
if soa.changed_data:
|
||||||
soa.save()
|
soa.save()
|
||||||
messages.success(request, "SOA modifié")
|
messages.success(request, _("The SOA record was edited."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'soaform': soa, 'action_name': 'Editer'},
|
{'soaform': soa, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -763,16 +762,15 @@ def del_soa(request, instances):
|
||||||
for soa_del in soa_dels:
|
for soa_del in soa_dels:
|
||||||
try:
|
try:
|
||||||
soa_del.delete()
|
soa_del.delete()
|
||||||
messages.success(request, "Le SOA a été supprimée")
|
messages.success(request, _("The SOA record was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Erreur le SOA suivant %s ne peut être supprimé"
|
(_("Error: the SOA record %s can't be deleted.") % soa_del)
|
||||||
% soa_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'soaform': soa, 'action_name': 'Supprimer'},
|
{'soaform': soa, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -785,10 +783,10 @@ def add_mx(request):
|
||||||
mx = MxForm(request.POST or None)
|
mx = MxForm(request.POST or None)
|
||||||
if mx.is_valid():
|
if mx.is_valid():
|
||||||
mx.save()
|
mx.save()
|
||||||
messages.success(request, "Cet enregistrement mx a été ajouté")
|
messages.success(request, _("The MX record was created."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'mxform': mx, 'action_name': 'Créer'},
|
{'mxform': mx, 'action_name': _("Create an MX record")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -802,10 +800,10 @@ def edit_mx(request, mx_instance, **_kwargs):
|
||||||
if mx.is_valid():
|
if mx.is_valid():
|
||||||
if mx.changed_data:
|
if mx.changed_data:
|
||||||
mx.save()
|
mx.save()
|
||||||
messages.success(request, "Mx modifié")
|
messages.success(request, _("The MX record was edited."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'mxform': mx, 'action_name': 'Editer'},
|
{'mxform': mx, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -821,16 +819,15 @@ def del_mx(request, instances):
|
||||||
for mx_del in mx_dels:
|
for mx_del in mx_dels:
|
||||||
try:
|
try:
|
||||||
mx_del.delete()
|
mx_del.delete()
|
||||||
messages.success(request, "L'mx a été supprimée")
|
messages.success(request, _("The MX record was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Erreur le Mx suivant %s ne peut être supprimé"
|
(_("Error: the MX record %s can't be deleted.") % mx_del)
|
||||||
% mx_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'mxform': mx, 'action_name': 'Supprimer'},
|
{'mxform': mx, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -843,10 +840,10 @@ def add_ns(request):
|
||||||
ns = NsForm(request.POST or None)
|
ns = NsForm(request.POST or None)
|
||||||
if ns.is_valid():
|
if ns.is_valid():
|
||||||
ns.save()
|
ns.save()
|
||||||
messages.success(request, "Cet enregistrement ns a été ajouté")
|
messages.success(request, _("The NS record was created."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'nsform': ns, 'action_name': 'Créer'},
|
{'nsform': ns, 'action_name': _("Create an NS record")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -860,10 +857,10 @@ def edit_ns(request, ns_instance, **_kwargs):
|
||||||
if ns.is_valid():
|
if ns.is_valid():
|
||||||
if ns.changed_data:
|
if ns.changed_data:
|
||||||
ns.save()
|
ns.save()
|
||||||
messages.success(request, "Ns modifié")
|
messages.success(request, _("The NS record was edited."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'nsform': ns, 'action_name': 'Editer'},
|
{'nsform': ns, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -879,16 +876,15 @@ def del_ns(request, instances):
|
||||||
for ns_del in ns_dels:
|
for ns_del in ns_dels:
|
||||||
try:
|
try:
|
||||||
ns_del.delete()
|
ns_del.delete()
|
||||||
messages.success(request, "Le ns a été supprimée")
|
messages.success(request, _("The NS record was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Erreur le Ns suivant %s ne peut être supprimé"
|
(_("Error: the NS record %s can't be deleted.") % ns_del)
|
||||||
% ns_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'nsform': ns, 'action_name': 'Supprimer'},
|
{'nsform': ns, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -900,10 +896,10 @@ def add_dname(request):
|
||||||
dname = DNameForm(request.POST or None)
|
dname = DNameForm(request.POST or None)
|
||||||
if dname.is_valid():
|
if dname.is_valid():
|
||||||
dname.save()
|
dname.save()
|
||||||
messages.success(request, "This DNAME record has been added")
|
messages.success(request, _("The DNAME record was created."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'dnameform': dname, 'action_name': "Create"},
|
{'dnameform': dname, 'action_name': _("Create a DNAME record")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -917,10 +913,10 @@ def edit_dname(request, dname_instance, **_kwargs):
|
||||||
if dname.is_valid():
|
if dname.is_valid():
|
||||||
if dname.changed_data:
|
if dname.changed_data:
|
||||||
dname.save()
|
dname.save()
|
||||||
messages.success(request, "DName successfully edited")
|
messages.success(request, _("The DNAME record was edited."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'dnameform': dname, 'action_name': "Edit"},
|
{'dnameform': dname, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -936,16 +932,16 @@ def del_dname(request, instances):
|
||||||
for dname_del in dname_dels:
|
for dname_del in dname_dels:
|
||||||
try:
|
try:
|
||||||
dname_del.delete()
|
dname_del.delete()
|
||||||
messages.success(request,
|
messages.success(request, _("The DNAME record was deleted."))
|
||||||
"The DNAME %s has been deleted" % dname_del)
|
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
"The DNAME %s can not be deleted" % dname_del
|
_("Error: the DNAME record %s can't be deleted.")
|
||||||
|
% dname_del
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'dnameform': dname, 'action_name': 'Delete'},
|
{'dnameform': dname, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -958,10 +954,10 @@ def add_txt(request):
|
||||||
txt = TxtForm(request.POST or None)
|
txt = TxtForm(request.POST or None)
|
||||||
if txt.is_valid():
|
if txt.is_valid():
|
||||||
txt.save()
|
txt.save()
|
||||||
messages.success(request, "Cet enregistrement text a été ajouté")
|
messages.success(request, _("The TXT record was created."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'txtform': txt, 'action_name': 'Créer'},
|
{'txtform': txt, 'action_name': _("Create a TXT record")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -975,10 +971,10 @@ def edit_txt(request, txt_instance, **_kwargs):
|
||||||
if txt.is_valid():
|
if txt.is_valid():
|
||||||
if txt.changed_data:
|
if txt.changed_data:
|
||||||
txt.save()
|
txt.save()
|
||||||
messages.success(request, "Txt modifié")
|
messages.success(request, _("The TXT record was edited."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'txtform': txt, 'action_name': 'Editer'},
|
{'txtform': txt, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -994,16 +990,15 @@ def del_txt(request, instances):
|
||||||
for txt_del in txt_dels:
|
for txt_del in txt_dels:
|
||||||
try:
|
try:
|
||||||
txt_del.delete()
|
txt_del.delete()
|
||||||
messages.success(request, "Le txt a été supprimé")
|
messages.success(request, _("The TXT record was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Erreur le Txt suivant %s ne peut être supprimé"
|
(_("Error: the TXT record %s can't be deleted.") % txt_del)
|
||||||
% txt_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'txtform': txt, 'action_name': 'Supprimer'},
|
{'txtform': txt, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1016,10 +1011,10 @@ def add_srv(request):
|
||||||
srv = SrvForm(request.POST or None)
|
srv = SrvForm(request.POST or None)
|
||||||
if srv.is_valid():
|
if srv.is_valid():
|
||||||
srv.save()
|
srv.save()
|
||||||
messages.success(request, "Cet enregistrement srv a été ajouté")
|
messages.success(request, _("The SRV record was created."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'srvform': srv, 'action_name': 'Créer'},
|
{'srvform': srv, 'action_name': _("Create an SRV record")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1033,10 +1028,10 @@ def edit_srv(request, srv_instance, **_kwargs):
|
||||||
if srv.is_valid():
|
if srv.is_valid():
|
||||||
if srv.changed_data:
|
if srv.changed_data:
|
||||||
srv.save()
|
srv.save()
|
||||||
messages.success(request, "Srv modifié")
|
messages.success(request, _("The SRV record was edited."))
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:1index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'srvform': srv, 'action_name': 'Editer'},
|
{'srvform': srv, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1052,16 +1047,15 @@ def del_srv(request, instances):
|
||||||
for srv_del in srv_dels:
|
for srv_del in srv_dels:
|
||||||
try:
|
try:
|
||||||
srv_del.delete()
|
srv_del.delete()
|
||||||
messages.success(request, "L'srv a été supprimée")
|
messages.success(request, _("The SRV record was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Erreur le Srv suivant %s ne peut être supprimé"
|
(_("Error: the SRV record %s can't be deleted.") % srv_del)
|
||||||
% srv_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-extension'))
|
return redirect(reverse('machines:index-extension'))
|
||||||
return form(
|
return form(
|
||||||
{'srvform': srv, 'action_name': 'Supprimer'},
|
{'srvform': srv, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1077,13 +1071,13 @@ def add_alias(request, interface, interfaceid):
|
||||||
alias = alias.save(commit=False)
|
alias = alias.save(commit=False)
|
||||||
alias.cname = interface.domain
|
alias.cname = interface.domain
|
||||||
alias.save()
|
alias.save()
|
||||||
messages.success(request, "Cet alias a été ajouté")
|
messages.success(request, _("The alias was created."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'machines:index-alias',
|
'machines:index-alias',
|
||||||
kwargs={'interfaceid': str(interfaceid)}
|
kwargs={'interfaceid': str(interfaceid)}
|
||||||
))
|
))
|
||||||
return form(
|
return form(
|
||||||
{'aliasform': alias, 'action_name': 'Créer'},
|
{'aliasform': alias, 'action_name': _("Create an alias")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1101,7 +1095,7 @@ def edit_alias(request, domain_instance, **_kwargs):
|
||||||
if alias.is_valid():
|
if alias.is_valid():
|
||||||
if alias.changed_data:
|
if alias.changed_data:
|
||||||
domain_instance = alias.save()
|
domain_instance = alias.save()
|
||||||
messages.success(request, "Alias modifié")
|
messages.success(request, _("The alias was edited."))
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'machines:index-alias',
|
'machines:index-alias',
|
||||||
kwargs={
|
kwargs={
|
||||||
|
@ -1109,7 +1103,7 @@ def edit_alias(request, domain_instance, **_kwargs):
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
return form(
|
return form(
|
||||||
{'aliasform': alias, 'action_name': 'Editer'},
|
{'aliasform': alias, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1127,20 +1121,19 @@ def del_alias(request, interface, interfaceid):
|
||||||
alias_del.delete()
|
alias_del.delete()
|
||||||
messages.success(
|
messages.success(
|
||||||
request,
|
request,
|
||||||
"L'alias %s a été supprimé" % alias_del
|
_("The alias %s was deleted.") % alias_del
|
||||||
)
|
)
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Erreur l'alias suivant %s ne peut être supprimé"
|
(_("Error: the alias %s can't be deleted.") % alias_del)
|
||||||
% alias_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'machines:index-alias',
|
'machines:index-alias',
|
||||||
kwargs={'interfaceid': str(interfaceid)}
|
kwargs={'interfaceid': str(interfaceid)}
|
||||||
))
|
))
|
||||||
return form(
|
return form(
|
||||||
{'aliasform': alias, 'action_name': 'Supprimer'},
|
{'aliasform': alias, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1153,10 +1146,10 @@ def add_role(request):
|
||||||
role = RoleForm(request.POST or None)
|
role = RoleForm(request.POST or None)
|
||||||
if role.is_valid():
|
if role.is_valid():
|
||||||
role.save()
|
role.save()
|
||||||
messages.success(request, "Cet enregistrement role a été ajouté")
|
messages.success(request, _("The role was created."))
|
||||||
return redirect(reverse('machines:index-role'))
|
return redirect(reverse('machines:index-role'))
|
||||||
return form(
|
return form(
|
||||||
{'roleform': role, 'action_name': 'Créer'},
|
{'roleform': role, 'action_name': _("Create a role")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1170,10 +1163,10 @@ def edit_role(request, role_instance, **_kwargs):
|
||||||
if role.is_valid():
|
if role.is_valid():
|
||||||
if role.changed_data:
|
if role.changed_data:
|
||||||
role.save()
|
role.save()
|
||||||
messages.success(request, _("Role updated"))
|
messages.success(request, _("The role was edited."))
|
||||||
return redirect(reverse('machines:index-role'))
|
return redirect(reverse('machines:index-role'))
|
||||||
return form(
|
return form(
|
||||||
{'roleform': role, 'action_name': _('Edit')},
|
{'roleform': role, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1189,17 +1182,15 @@ def del_role(request, instances):
|
||||||
for role_del in role_dels:
|
for role_del in role_dels:
|
||||||
try:
|
try:
|
||||||
role_del.delete()
|
role_del.delete()
|
||||||
messages.success(request, _("The role has been deleted."))
|
messages.success(request, _("The role was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
(_("Error: The following role cannot be deleted: %(role)")
|
(_("Error: the role %s can't be deleted.") % role_del)
|
||||||
% {'role': role_del}
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-role'))
|
return redirect(reverse('machines:index-role'))
|
||||||
return form(
|
return form(
|
||||||
{'roleform': role, 'action_name': _('Delete')},
|
{'roleform': role, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1212,10 +1203,10 @@ def add_service(request):
|
||||||
service = ServiceForm(request.POST or None)
|
service = ServiceForm(request.POST or None)
|
||||||
if service.is_valid():
|
if service.is_valid():
|
||||||
service.save()
|
service.save()
|
||||||
messages.success(request, "Cet enregistrement service a été ajouté")
|
messages.success(request, _("The service was created."))
|
||||||
return redirect(reverse('machines:index-service'))
|
return redirect(reverse('machines:index-service'))
|
||||||
return form(
|
return form(
|
||||||
{'serviceform': service, 'action_name': 'Créer'},
|
{'serviceform': service, 'action_name': _("Create a service")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1229,10 +1220,10 @@ def edit_service(request, service_instance, **_kwargs):
|
||||||
if service.is_valid():
|
if service.is_valid():
|
||||||
if service.changed_data:
|
if service.changed_data:
|
||||||
service.save()
|
service.save()
|
||||||
messages.success(request, "Service modifié")
|
messages.success(request, _("The service was edited."))
|
||||||
return redirect(reverse('machines:index-service'))
|
return redirect(reverse('machines:index-service'))
|
||||||
return form(
|
return form(
|
||||||
{'serviceform': service, 'action_name': 'Editer'},
|
{'serviceform': service, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1248,16 +1239,15 @@ def del_service(request, instances):
|
||||||
for service_del in service_dels:
|
for service_del in service_dels:
|
||||||
try:
|
try:
|
||||||
service_del.delete()
|
service_del.delete()
|
||||||
messages.success(request, "Le service a été supprimée")
|
messages.success(request, _("The service was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Erreur le service suivant %s ne peut être supprimé"
|
(_("Error: the service %s can't be deleted.") % service_del)
|
||||||
% service_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-service'))
|
return redirect(reverse('machines:index-service'))
|
||||||
return form(
|
return form(
|
||||||
{'serviceform': service, 'action_name': 'Supprimer'},
|
{'serviceform': service, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1279,10 +1269,10 @@ def add_vlan(request):
|
||||||
vlan = VlanForm(request.POST or None)
|
vlan = VlanForm(request.POST or None)
|
||||||
if vlan.is_valid():
|
if vlan.is_valid():
|
||||||
vlan.save()
|
vlan.save()
|
||||||
messages.success(request, "Cet enregistrement vlan a été ajouté")
|
messages.success(request, _("The VLAN was created."))
|
||||||
return redirect(reverse('machines:index-vlan'))
|
return redirect(reverse('machines:index-vlan'))
|
||||||
return form(
|
return form(
|
||||||
{'vlanform': vlan, 'action_name': 'Créer'},
|
{'vlanform': vlan, 'action_name': _("Create a VLAN")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1296,10 +1286,10 @@ def edit_vlan(request, vlan_instance, **_kwargs):
|
||||||
if vlan.is_valid():
|
if vlan.is_valid():
|
||||||
if vlan.changed_data:
|
if vlan.changed_data:
|
||||||
vlan.save()
|
vlan.save()
|
||||||
messages.success(request, "Vlan modifié")
|
messages.success(request, _("The VLAN was edited."))
|
||||||
return redirect(reverse('machines:index-vlan'))
|
return redirect(reverse('machines:index-vlan'))
|
||||||
return form(
|
return form(
|
||||||
{'vlanform': vlan, 'action_name': 'Editer'},
|
{'vlanform': vlan, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1315,16 +1305,15 @@ def del_vlan(request, instances):
|
||||||
for vlan_del in vlan_dels:
|
for vlan_del in vlan_dels:
|
||||||
try:
|
try:
|
||||||
vlan_del.delete()
|
vlan_del.delete()
|
||||||
messages.success(request, "Le vlan a été supprimée")
|
messages.success(request, _("The VLAN was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Erreur le Vlan suivant %s ne peut être supprimé"
|
(_("Error: the VLAN %s can't be deleted.") % vlan_del)
|
||||||
% vlan_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-vlan'))
|
return redirect(reverse('machines:index-vlan'))
|
||||||
return form(
|
return form(
|
||||||
{'vlanform': vlan, 'action_name': 'Supprimer'},
|
{'vlanform': vlan, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1337,10 +1326,10 @@ def add_nas(request):
|
||||||
nas = NasForm(request.POST or None)
|
nas = NasForm(request.POST or None)
|
||||||
if nas.is_valid():
|
if nas.is_valid():
|
||||||
nas.save()
|
nas.save()
|
||||||
messages.success(request, "Cet enregistrement nas a été ajouté")
|
messages.success(request, _("The NAS device was created."))
|
||||||
return redirect(reverse('machines:index-nas'))
|
return redirect(reverse('machines:index-nas'))
|
||||||
return form(
|
return form(
|
||||||
{'nasform': nas, 'action_name': 'Créer'},
|
{'nasform': nas, 'action_name': _("Create a NAS device")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1354,10 +1343,10 @@ def edit_nas(request, nas_instance, **_kwargs):
|
||||||
if nas.is_valid():
|
if nas.is_valid():
|
||||||
if nas.changed_data:
|
if nas.changed_data:
|
||||||
nas.save()
|
nas.save()
|
||||||
messages.success(request, "Nas modifié")
|
messages.success(request, _("The NAS device was edited."))
|
||||||
return redirect(reverse('machines:index-nas'))
|
return redirect(reverse('machines:index-nas'))
|
||||||
return form(
|
return form(
|
||||||
{'nasform': nas, 'action_name': 'Editer'},
|
{'nasform': nas, 'action_name': _("Edit")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1373,16 +1362,15 @@ def del_nas(request, instances):
|
||||||
for nas_del in nas_dels:
|
for nas_del in nas_dels:
|
||||||
try:
|
try:
|
||||||
nas_del.delete()
|
nas_del.delete()
|
||||||
messages.success(request, "Le nas a été supprimé")
|
messages.success(request, _("The NAS device was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Erreur le Nas suivant %s ne peut être supprimé"
|
(_("Error: the NAS device %s can't be deleted.") % nas_del)
|
||||||
% nas_del)
|
|
||||||
)
|
)
|
||||||
return redirect(reverse('machines:index-nas'))
|
return redirect(reverse('machines:index-nas'))
|
||||||
return form(
|
return form(
|
||||||
{'nasform': nas, 'action_name': 'Supprimer'},
|
{'nasform': nas, 'action_name': _("Delete")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1634,7 +1622,7 @@ def edit_portlist(request, ouvertureportlist_instance, **_kwargs):
|
||||||
for port in instances:
|
for port in instances:
|
||||||
port.port_list = pl
|
port.port_list = pl
|
||||||
port.save()
|
port.save()
|
||||||
messages.success(request, "Liste de ports modifiée")
|
messages.success(request, _("The ports list was edited."))
|
||||||
return redirect(reverse('machines:index-portlist'))
|
return redirect(reverse('machines:index-portlist'))
|
||||||
return form(
|
return form(
|
||||||
{'port_list': port_list, 'ports': port_formset},
|
{'port_list': port_list, 'ports': port_formset},
|
||||||
|
@ -1648,7 +1636,7 @@ def edit_portlist(request, ouvertureportlist_instance, **_kwargs):
|
||||||
def del_portlist(request, port_list_instance, **_kwargs):
|
def del_portlist(request, port_list_instance, **_kwargs):
|
||||||
""" View used to delete a port policy """
|
""" View used to delete a port policy """
|
||||||
port_list_instance.delete()
|
port_list_instance.delete()
|
||||||
messages.success(request, "La liste de ports a été supprimée")
|
messages.success(request, _("The ports list was deleted."))
|
||||||
return redirect(reverse('machines:index-portlist'))
|
return redirect(reverse('machines:index-portlist'))
|
||||||
|
|
||||||
|
|
||||||
|
@ -1673,7 +1661,7 @@ def add_portlist(request):
|
||||||
for port in instances:
|
for port in instances:
|
||||||
port.port_list = pl
|
port.port_list = pl
|
||||||
port.save()
|
port.save()
|
||||||
messages.success(request, "Liste de ports créée")
|
messages.success(request, _("The ports list was created."))
|
||||||
return redirect(reverse('machines:index-portlist'))
|
return redirect(reverse('machines:index-portlist'))
|
||||||
return form(
|
return form(
|
||||||
{'port_list': port_list, 'ports': port_formset},
|
{'port_list': port_list, 'ports': port_formset},
|
||||||
|
@ -1691,8 +1679,8 @@ def configure_ports(request, interface_instance, **_kwargs):
|
||||||
if not interface_instance.may_have_port_open():
|
if not interface_instance.may_have_port_open():
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
("Attention, l'ipv4 n'est pas publique, l'ouverture n'aura pas "
|
(_("Warning: the IPv4 isn't public, the opening won't have effect"
|
||||||
"d'effet en v4")
|
" in v4."))
|
||||||
)
|
)
|
||||||
interface = EditOuverturePortConfigForm(
|
interface = EditOuverturePortConfigForm(
|
||||||
request.POST or None,
|
request.POST or None,
|
||||||
|
@ -1701,10 +1689,11 @@ def configure_ports(request, interface_instance, **_kwargs):
|
||||||
if interface.is_valid():
|
if interface.is_valid():
|
||||||
if interface.changed_data:
|
if interface.changed_data:
|
||||||
interface.save()
|
interface.save()
|
||||||
messages.success(request, "Configuration des ports mise à jour.")
|
messages.success(request, _("The ports configuration was edited."))
|
||||||
return redirect(reverse('machines:index'))
|
return redirect(reverse('machines:index'))
|
||||||
return form(
|
return form(
|
||||||
{'interfaceform': interface, 'action_name': 'Editer la configuration'},
|
{'interfaceform': interface, 'action_name': _("Edit the"
|
||||||
|
" configuration")},
|
||||||
'machines/machine.html',
|
'machines/machine.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
@ -1950,3 +1939,4 @@ def regen_achieved(request):
|
||||||
if obj:
|
if obj:
|
||||||
obj.first().done_regen()
|
obj.first().done_regen()
|
||||||
return HttpResponse("Ok")
|
return HttpResponse("Ok")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue