mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 03:13:12 +00:00
Translation of topologie/ (front)
This commit is contained in:
parent
e27625dd80
commit
2ecf6b86f1
30 changed files with 1507 additions and 410 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
Here are defined some functions to check acl on the application.
|
||||
"""
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
|
||||
def can_view(user):
|
||||
|
@ -38,4 +39,6 @@ def can_view(user):
|
|||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
can = user.has_module_perms('topologie')
|
||||
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.")
|
||||
|
||||
|
|
|
@ -176,8 +176,8 @@ class EditRoomForm(FormRevMixin, ModelForm):
|
|||
|
||||
class CreatePortsForm(forms.Form):
|
||||
"""Permet de créer une liste de ports pour un switch."""
|
||||
begin = forms.IntegerField(label="Début :", min_value=0)
|
||||
end = forms.IntegerField(label="Fin :", min_value=0)
|
||||
begin = forms.IntegerField(label=_("Start:"), min_value=0)
|
||||
end = forms.IntegerField(label=_("End:"), min_value=0)
|
||||
|
||||
|
||||
class EditModelSwitchForm(FormRevMixin, ModelForm):
|
||||
|
|
BIN
topologie/locale/fr/LC_MESSAGES/django.mo
Normal file
BIN
topologie/locale/fr/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
842
topologie/locale/fr/LC_MESSAGES/django.po
Normal file
842
topologie/locale/fr/LC_MESSAGES/django.po
Normal file
|
@ -0,0 +1,842 @@
|
|||
# Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
||||
# se veut agnostique au réseau considéré, de manière à être installable en
|
||||
# quelques clics.
|
||||
#
|
||||
# Copyright © 2018 Maël Kervella
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 2.5\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-08-15 20:00+0200\n"
|
||||
"PO-Revision-Date: 2018-06-25 14:53+0200\n"
|
||||
"Last-Translator: Laouen Fernet <laouen.fernet@supelec.fr>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: acl.py:42
|
||||
msgid "You don't have the right to view this application."
|
||||
msgstr "Vous n'avez pas le droit de voir cette application."
|
||||
|
||||
#: forms.py:179
|
||||
msgid "Start:"
|
||||
msgstr "Début :"
|
||||
|
||||
#: forms.py:180
|
||||
msgid "End:"
|
||||
msgstr "Fin :"
|
||||
|
||||
#: models.py:69
|
||||
msgid "Can view a stack object"
|
||||
msgstr "Peut voir un objet pile"
|
||||
|
||||
#: models.py:71
|
||||
msgid "switches stack"
|
||||
msgstr "pile de commutateurs réseau"
|
||||
|
||||
#: models.py:72
|
||||
msgid "switches stacks"
|
||||
msgstr "piles de commutateurs réseau"
|
||||
|
||||
#: models.py:87
|
||||
msgid "The maximum ID is less than the minimum ID."
|
||||
msgstr "L'ID maximum est inférieur l'ID minimum."
|
||||
|
||||
#: models.py:100
|
||||
msgid "Details about the AP's location"
|
||||
msgstr "Détails sur l'emplacement du point d'accès sans fil"
|
||||
|
||||
#: models.py:107
|
||||
msgid "Can view an access point object"
|
||||
msgstr "Peut voir un objet point d'accès sans fil"
|
||||
|
||||
#: models.py:109
|
||||
msgid "access point"
|
||||
msgstr "point d'accès sans fil"
|
||||
|
||||
#: models.py:110
|
||||
msgid "access points"
|
||||
msgstr "points d'accès sans fil"
|
||||
|
||||
#: models.py:206
|
||||
msgid "Number of ports"
|
||||
msgstr "Nombre de ports"
|
||||
|
||||
#: models.py:223 templates/topologie/aff_switch.html:48 views.py:803
|
||||
msgid "Switch model"
|
||||
msgstr "Modèle de commutateur réseau"
|
||||
|
||||
#: models.py:235
|
||||
msgid "Can view a switch object"
|
||||
msgstr "Peut voir un objet commutateur réseau"
|
||||
|
||||
#: models.py:237
|
||||
msgid "switch"
|
||||
msgstr "commutateur réseau"
|
||||
|
||||
#: models.py:238
|
||||
msgid "switches"
|
||||
msgstr "commutateurs réseau"
|
||||
|
||||
#: models.py:249
|
||||
msgid "The switch ID exceeds the limits allowed by the stack."
|
||||
msgstr "L'ID du commutateur réseau dépasse les bornes autorisées par la pile."
|
||||
|
||||
#: models.py:254
|
||||
msgid "The stack member ID can't be void."
|
||||
msgstr "L'ID de membre dans la pile ne peut-être vide."
|
||||
|
||||
#: models.py:270
|
||||
msgid "The end port is less than the start port."
|
||||
msgstr "Le port de fin est inférieur au port de début."
|
||||
|
||||
#: models.py:273
|
||||
msgid "This switch can't have that many ports."
|
||||
msgstr "Ce commutateur réseau ne peut pas avoir autant de ports."
|
||||
|
||||
#: models.py:283
|
||||
msgid "Creation"
|
||||
msgstr "Création"
|
||||
|
||||
#: models.py:285
|
||||
msgid "Creation of an existing port."
|
||||
msgstr "Création d'un port existant."
|
||||
|
||||
#: models.py:310
|
||||
msgid "Can view a switch model object"
|
||||
msgstr "Peut voir un objet modèle de commutateur réseau"
|
||||
|
||||
#: models.py:312
|
||||
msgid "switch model"
|
||||
msgstr "modèle de commutateur réseau"
|
||||
|
||||
#: models.py:313
|
||||
msgid "switch models"
|
||||
msgstr "modèles de commutateur réseau"
|
||||
|
||||
#: models.py:326
|
||||
msgid "Can view a switch constructor object"
|
||||
msgstr "Peut voir un objet constructeur de commutateur réseau"
|
||||
|
||||
#: models.py:329
|
||||
msgid "switch constructor"
|
||||
msgstr "constructeur de commutateur réseau"
|
||||
|
||||
#: models.py:352
|
||||
msgid "Can view a switch bay object"
|
||||
msgstr "Peut voir un objet baie de brassage"
|
||||
|
||||
#: models.py:354
|
||||
msgid "switch bay"
|
||||
msgstr "baie de brassage"
|
||||
|
||||
#: models.py:355
|
||||
msgid "switch bays"
|
||||
msgstr "baies de brassage"
|
||||
|
||||
#: models.py:368
|
||||
msgid "Can view a building object"
|
||||
msgstr "Peut voir un objet bâtiment"
|
||||
|
||||
#: models.py:370
|
||||
msgid "building"
|
||||
msgstr "bâtiment"
|
||||
|
||||
#: models.py:371
|
||||
msgid "buildings"
|
||||
msgstr "bâtiments"
|
||||
|
||||
#: models.py:427
|
||||
msgid "Port state Active"
|
||||
msgstr "État du port Actif"
|
||||
|
||||
#: models.py:434
|
||||
msgid "Can view a port object"
|
||||
msgstr "Peut voir un objet port"
|
||||
|
||||
#: models.py:436
|
||||
msgid "port"
|
||||
msgstr "port"
|
||||
|
||||
#: models.py:437
|
||||
msgid "ports"
|
||||
msgstr "ports"
|
||||
|
||||
#: models.py:504
|
||||
msgid "The port can't exist, its number is too great."
|
||||
msgstr "Le port ne peut pas exister, son numéro est trop grand."
|
||||
|
||||
#: models.py:510
|
||||
msgid "Room, interface and related port are mutually exclusive."
|
||||
msgstr "Chambre, interface et port relié sont mutuellement exclusifs."
|
||||
|
||||
#: models.py:513
|
||||
msgid "A port can't be related to itself."
|
||||
msgstr "Un port ne peut être relié à lui-même."
|
||||
|
||||
#: models.py:517
|
||||
msgid ""
|
||||
"The related port is already used, please clear it before creating the "
|
||||
"relation."
|
||||
msgstr ""
|
||||
"Le port relié est déjà utilisé, veuillez le modifier avant de créer la "
|
||||
"relation."
|
||||
|
||||
#: models.py:538
|
||||
msgid "Can view a room object"
|
||||
msgstr "Peut voir un objet chambre"
|
||||
|
||||
#: models.py:540
|
||||
msgid "room"
|
||||
msgstr "chambre"
|
||||
|
||||
#: models.py:541
|
||||
msgid "rooms"
|
||||
msgstr "chambres"
|
||||
|
||||
#: models.py:575 templates/topologie/aff_port_profile.html:37
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: models.py:582
|
||||
msgid "Default profile"
|
||||
msgstr "Profil par défaut"
|
||||
|
||||
#: models.py:590
|
||||
msgid "VLAN untagged"
|
||||
msgstr "VLAN untagged"
|
||||
|
||||
#: models.py:596
|
||||
msgid "VLAN(s) tagged"
|
||||
msgstr "VLAN(s) tagged"
|
||||
|
||||
#: models.py:601
|
||||
msgid "Type of RADIUS authentication : inactive, MAC-address or 802.1X"
|
||||
msgstr "Type d'authentification RADIUS : inactive, MAC-address ou 802.1X"
|
||||
|
||||
#: models.py:603
|
||||
msgid "RADIUS type"
|
||||
msgstr "Type de RADIUS"
|
||||
|
||||
#: models.py:609
|
||||
msgid "In case of MAC-authentication : mode COMMON or STRICT on this port"
|
||||
msgstr ""
|
||||
"Dans le cas d'authentification par adresse MAC : mode COMMON ou STRICT sur "
|
||||
"ce port"
|
||||
|
||||
#: models.py:611
|
||||
msgid "RADIUS mode"
|
||||
msgstr "Mode de RADIUS"
|
||||
|
||||
#: models.py:617
|
||||
msgid "Port speed limit"
|
||||
msgstr "Limite de vitesse du port"
|
||||
|
||||
#: models.py:622
|
||||
msgid "Limit of MAC-address on this port"
|
||||
msgstr "Limite de MAC-address sur ce port"
|
||||
|
||||
#: models.py:623
|
||||
msgid "MAC limit"
|
||||
msgstr "Limite MAC"
|
||||
|
||||
#: models.py:627
|
||||
msgid "Flow control"
|
||||
msgstr "Contrôle du flux"
|
||||
|
||||
#: models.py:631
|
||||
msgid "Protect against rogue DHCP"
|
||||
msgstr "Protège contre les DHCP pirates"
|
||||
|
||||
#: models.py:632
|
||||
msgid "DHCP snooping"
|
||||
msgstr "DHCP snooping"
|
||||
|
||||
#: models.py:636
|
||||
msgid "Protect against rogue DHCPv6"
|
||||
msgstr "Protège contre les DHCPv6 pirates"
|
||||
|
||||
#: models.py:637
|
||||
msgid "DHCPv6 snooping"
|
||||
msgstr "DHCPv6 snooping"
|
||||
|
||||
#: models.py:641
|
||||
msgid "Check if IP adress is DHCP assigned"
|
||||
msgstr "Vérifie si l'adresse IP est attribuée par DHCP"
|
||||
|
||||
#: models.py:642
|
||||
msgid "ARP protection"
|
||||
msgstr "Protection ARP"
|
||||
|
||||
#: models.py:646
|
||||
msgid "Protect against rogue RA"
|
||||
msgstr "Protège contre les RA pirates"
|
||||
|
||||
#: models.py:647
|
||||
msgid "RA guard"
|
||||
msgstr "RA guard"
|
||||
|
||||
#: models.py:651
|
||||
msgid "Protect against loop"
|
||||
msgstr "Protège contre un boucle"
|
||||
|
||||
#: models.py:652
|
||||
msgid "Loop protection"
|
||||
msgstr "Protection contre une boucle"
|
||||
|
||||
#: models.py:657
|
||||
msgid "Can view a port profile object"
|
||||
msgstr "Peut voir un objet profil de port"
|
||||
|
||||
#: models.py:659
|
||||
msgid "port profile"
|
||||
msgstr "profil de port"
|
||||
|
||||
#: models.py:660
|
||||
msgid "port profiles"
|
||||
msgstr "profils de port"
|
||||
|
||||
#: templates/topologie/aff_ap.html:36
|
||||
msgid "Access point"
|
||||
msgstr "Point d'accès sans fil"
|
||||
|
||||
#: templates/topologie/aff_ap.html:38
|
||||
msgid "MAC address"
|
||||
msgstr "Adresse MAC"
|
||||
|
||||
#: templates/topologie/aff_ap.html:40 templates/topologie/aff_switch.html:39
|
||||
msgid "IPv4 address"
|
||||
msgstr "Adresse IPv4"
|
||||
|
||||
#: templates/topologie/aff_ap.html:42 templates/topologie/aff_chambres.html:38
|
||||
#: templates/topologie/aff_port.html:43 templates/topologie/aff_stacks.html:36
|
||||
#: templates/topologie/aff_switch.html:49
|
||||
#: templates/topologie/edit_stack_sw.html:34
|
||||
msgid "Details"
|
||||
msgstr "Détails"
|
||||
|
||||
#: templates/topologie/aff_ap.html:43
|
||||
msgid "Location"
|
||||
msgstr "Emplacement"
|
||||
|
||||
#: templates/topologie/aff_ap.html:56 templates/topologie/aff_building.html:46
|
||||
#: templates/topologie/aff_chambres.html:48
|
||||
#: templates/topologie/aff_constructor_switch.html:46
|
||||
#: templates/topologie/aff_model_switch.html:49
|
||||
#: templates/topologie/aff_port.html:91 templates/topologie/aff_stacks.html:55
|
||||
#: templates/topologie/aff_switch_bay.html:59
|
||||
#: templates/topologie/edit_stack_sw.html:44 views.py:357 views.py:411
|
||||
#: views.py:722 views.py:781 views.py:836 views.py:891 views.py:950
|
||||
#: views.py:1005
|
||||
msgid "Edit"
|
||||
msgstr "Modifier"
|
||||
|
||||
#: templates/topologie/aff_ap.html:62 templates/topologie/aff_building.html:52
|
||||
#: templates/topologie/aff_chambres.html:54
|
||||
#: templates/topologie/aff_constructor_switch.html:52
|
||||
#: templates/topologie/aff_model_switch.html:55
|
||||
#: templates/topologie/aff_port.html:97 templates/topologie/aff_stacks.html:61
|
||||
#: templates/topologie/aff_switch_bay.html:65
|
||||
#: templates/topologie/edit_stack_sw.html:50
|
||||
msgid "Delete"
|
||||
msgstr "Supprimer"
|
||||
|
||||
#: templates/topologie/aff_building.html:36
|
||||
#: templates/topologie/aff_switch_bay.html:38 views.py:913
|
||||
msgid "Building"
|
||||
msgstr "Bâtiment"
|
||||
|
||||
#: templates/topologie/aff_chambres.html:36
|
||||
#: templates/topologie/aff_port.html:35 views.py:744
|
||||
msgid "Room"
|
||||
msgstr "Chambre"
|
||||
|
||||
#: templates/topologie/aff_constructor_switch.html:36
|
||||
#: templates/topologie/aff_model_switch.html:38 views.py:973
|
||||
msgid "Switch constructor"
|
||||
msgstr "Constructeur de commutateur réseau"
|
||||
|
||||
#: templates/topologie/aff_model_switch.html:36
|
||||
msgid "Reference"
|
||||
msgstr "Référence"
|
||||
|
||||
#: templates/topologie/aff_port.html:33
|
||||
msgid "Port"
|
||||
msgstr "Port"
|
||||
|
||||
#: templates/topologie/aff_port.html:37
|
||||
msgid "Interface"
|
||||
msgstr "Interface"
|
||||
|
||||
#: templates/topologie/aff_port.html:39
|
||||
msgid "Related port"
|
||||
msgstr "Port relié"
|
||||
|
||||
#: templates/topologie/aff_port.html:41
|
||||
msgid "Port state"
|
||||
msgstr "État du port"
|
||||
|
||||
#: templates/topologie/aff_port.html:42 views.py:1025
|
||||
msgid "Port profile"
|
||||
msgstr "Profil de port"
|
||||
|
||||
#: templates/topologie/aff_port.html:77
|
||||
msgid "Active"
|
||||
msgstr "Actif"
|
||||
|
||||
#: templates/topologie/aff_port.html:79
|
||||
msgid "Disabled"
|
||||
msgstr "Désactivé"
|
||||
|
||||
#: templates/topologie/aff_port.html:84
|
||||
msgid "Default: "
|
||||
msgstr "Par défaut : "
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:38
|
||||
msgid "Default for"
|
||||
msgstr "Par défaut pour"
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:39
|
||||
msgid "VLANs"
|
||||
msgstr "VLANs"
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:40
|
||||
msgid "RADIUS settings"
|
||||
msgstr "Paramètres RADIUS"
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:41
|
||||
msgid "Speed limit"
|
||||
msgstr "Limite de vitesse"
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:42
|
||||
msgid "MAC address limit"
|
||||
msgstr "Limite d'adresse MAC"
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:43
|
||||
msgid "Security"
|
||||
msgstr "Sécurité"
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:53
|
||||
msgid "Untagged: "
|
||||
msgstr "Untagged :"
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:57
|
||||
msgid "Tagged: "
|
||||
msgstr "Tagged : "
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:61
|
||||
msgid "RADIUS type: "
|
||||
msgstr "Type de RADIUS : "
|
||||
|
||||
#: templates/topologie/aff_port_profile.html:64
|
||||
msgid "RADIUS mode: "
|
||||
msgstr "Mode de RADIUS : "
|
||||
|
||||
#: templates/topologie/aff_stacks.html:32
|
||||
#: templates/topologie/aff_switch.html:45
|
||||
#: templates/topologie/edit_stack_sw.html:32
|
||||
msgid "Stack"
|
||||
msgstr "Pile"
|
||||
|
||||
#: templates/topologie/aff_stacks.html:34
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#: templates/topologie/aff_stacks.html:37
|
||||
msgid "Members"
|
||||
msgstr "Membres"
|
||||
|
||||
#: templates/topologie/aff_switch.html:37 templates/topologie/topo_more.html:56
|
||||
msgid "DNS name"
|
||||
msgstr "Nom DNS"
|
||||
|
||||
#: templates/topologie/aff_switch.html:41
|
||||
#: templates/topologie/aff_switch_bay.html:36 views.py:858
|
||||
msgid "Switch bay"
|
||||
msgstr "Baie de brassage"
|
||||
|
||||
#: templates/topologie/aff_switch.html:43
|
||||
msgid "Ports"
|
||||
msgstr "Ports"
|
||||
|
||||
#: templates/topologie/aff_switch.html:47
|
||||
#: templates/topologie/edit_stack_sw.html:33
|
||||
msgid "Stack ID"
|
||||
msgstr "ID de la pile"
|
||||
|
||||
#: templates/topologie/aff_switch.html:76
|
||||
msgid "Creation of ports"
|
||||
msgstr "Création de ports"
|
||||
|
||||
#: templates/topologie/aff_switch_bay.html:40
|
||||
msgid "Information"
|
||||
msgstr "Informations"
|
||||
|
||||
#: templates/topologie/aff_switch_bay.html:41
|
||||
msgid "Switches of the bay"
|
||||
msgstr "Commutateurs réseau de la baie"
|
||||
|
||||
#: templates/topologie/delete.html:29 templates/topologie/index.html:30
|
||||
#: templates/topologie/index_ap.html:30
|
||||
#: templates/topologie/index_model_switch.html:30
|
||||
#: templates/topologie/index_p.html:30
|
||||
#: templates/topologie/index_physical_grouping.html:30
|
||||
#: templates/topologie/index_portprofile.html:29
|
||||
#: templates/topologie/index_room.html:30 templates/topologie/switch.html:30
|
||||
#: templates/topologie/topo.html:30 templates/topologie/topo_more.html:30
|
||||
msgid "Topology"
|
||||
msgstr "Topologie"
|
||||
|
||||
#: templates/topologie/delete.html:35
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Warning: are you sure you want to delete this %(objet_name)s object "
|
||||
"( %(objet)s )?"
|
||||
msgstr ""
|
||||
"Attention : voulez-vous vraiment supprimer cet objet %(objet_name)s "
|
||||
"( %(objet)s ) ?"
|
||||
|
||||
#: templates/topologie/delete.html:36
|
||||
msgid "Confirm"
|
||||
msgstr "Confirmer"
|
||||
|
||||
#: templates/topologie/index.html:55
|
||||
msgid "Topology of the switches"
|
||||
msgstr "Topologie des commutateurs réseau"
|
||||
|
||||
#: templates/topologie/index.html:66 templates/topologie/sidebar.html:35
|
||||
msgid "Switches"
|
||||
msgstr "Commutateurs réseau"
|
||||
|
||||
#: templates/topologie/index.html:68
|
||||
msgid " Add a switch"
|
||||
msgstr " Ajouter un commutateur réseau"
|
||||
|
||||
#: templates/topologie/index_ap.html:33 templates/topologie/sidebar.html:43
|
||||
msgid "Access points"
|
||||
msgstr "Points d'accès sans fil"
|
||||
|
||||
#: templates/topologie/index_ap.html:35
|
||||
msgid " Add an access point"
|
||||
msgstr " Ajouter un point d'accès sans fil"
|
||||
|
||||
#: templates/topologie/index_model_switch.html:33
|
||||
msgid "Switch models"
|
||||
msgstr "Modèles de commutateur réseau"
|
||||
|
||||
#: templates/topologie/index_model_switch.html:36
|
||||
msgid " Add a switch model"
|
||||
msgstr " Ajouter un modèle de commutateur réseau"
|
||||
|
||||
#: templates/topologie/index_model_switch.html:42
|
||||
msgid "Switch constructors"
|
||||
msgstr "Constructeurs de commutateur réseau"
|
||||
|
||||
#: templates/topologie/index_model_switch.html:45
|
||||
msgid " Add a switch constructor"
|
||||
msgstr " Ajouter un constructeur de commutateur réseau"
|
||||
|
||||
#: templates/topologie/index_p.html:33
|
||||
msgid "Switch:"
|
||||
msgstr "Commutateur réseau :"
|
||||
|
||||
#: templates/topologie/index_p.html:34
|
||||
msgid " Edit"
|
||||
msgstr " Modifier"
|
||||
|
||||
#: templates/topologie/index_p.html:36
|
||||
msgid " Add a port"
|
||||
msgstr " Ajouter un port"
|
||||
|
||||
#: templates/topologie/index_p.html:37
|
||||
msgid " Add ports"
|
||||
msgstr " Ajouter des ports"
|
||||
|
||||
#: templates/topologie/index_physical_grouping.html:33
|
||||
msgid "Stacks"
|
||||
msgstr "Piles"
|
||||
|
||||
#: templates/topologie/index_physical_grouping.html:36
|
||||
msgid " Add a stack"
|
||||
msgstr " Ajouter une pile"
|
||||
|
||||
#: templates/topologie/index_physical_grouping.html:41
|
||||
msgid "Switch bays"
|
||||
msgstr "Baies de brassage"
|
||||
|
||||
#: templates/topologie/index_physical_grouping.html:44
|
||||
msgid " Add a switch bay"
|
||||
msgstr " Ajouter une baie de brassage"
|
||||
|
||||
#: templates/topologie/index_physical_grouping.html:50
|
||||
msgid "Buildings"
|
||||
msgstr "Bâtiments"
|
||||
|
||||
#: templates/topologie/index_physical_grouping.html:53
|
||||
msgid " Add a building"
|
||||
msgstr " Ajouter un bâtiment"
|
||||
|
||||
#: templates/topologie/index_portprofile.html:33
|
||||
#: templates/topologie/sidebar.html:39
|
||||
msgid "Port profiles"
|
||||
msgstr "Profils de port"
|
||||
|
||||
#: templates/topologie/index_portprofile.html:35
|
||||
msgid " Add a port profile"
|
||||
msgstr " Ajouter un profil de port"
|
||||
|
||||
#: templates/topologie/index_room.html:33
|
||||
msgid "Rooms"
|
||||
msgstr "Chambres"
|
||||
|
||||
#: templates/topologie/index_room.html:35
|
||||
msgid " Add a room"
|
||||
msgstr " Ajouter une chambre"
|
||||
|
||||
#: templates/topologie/sidebar.html:31
|
||||
msgid "Rooms and premises"
|
||||
msgstr "Chambres et locaux"
|
||||
|
||||
#: templates/topologie/sidebar.html:47
|
||||
msgid "Physical grouping"
|
||||
msgstr "Groupements physiques"
|
||||
|
||||
#: templates/topologie/sidebar.html:51
|
||||
msgid "Switch models and constructors"
|
||||
msgstr "Modèles et constructeurs de commutateur réseau"
|
||||
|
||||
#: templates/topologie/switch.html:39 templates/topologie/topo.html:36
|
||||
msgid " Go to the ports list"
|
||||
msgstr " Aller à la liste des ports"
|
||||
|
||||
#: templates/topologie/switch.html:43
|
||||
msgid "Specific settings for the switch"
|
||||
msgstr "Réglages spécifiques pour le commutateur réseau"
|
||||
|
||||
#: templates/topologie/switch.html:46 views.py:395 views.py:987
|
||||
msgid "Create"
|
||||
msgstr "Créer"
|
||||
|
||||
#: templates/topologie/topo_more.html:48
|
||||
#, python-format
|
||||
msgid "Specific settings for the %(device)s object"
|
||||
msgstr "Réglages spécifiques pour l'objet %(device)s"
|
||||
|
||||
#: templates/topologie/topo_more.html:52
|
||||
#, python-format
|
||||
msgid "General settings for the machine linked to the %(device)s object"
|
||||
msgstr "Réglages généraux pour la machine liée à l'objet %(device)s"
|
||||
|
||||
#: templates/topologie/topo_more.html:59
|
||||
msgid "Create or edit"
|
||||
msgstr "Créer ou modifier"
|
||||
|
||||
#: views.py:317
|
||||
msgid "Nonexistent switch."
|
||||
msgstr "Commutateur réseau inexistant."
|
||||
|
||||
#: views.py:325
|
||||
msgid "The port was added."
|
||||
msgstr "Le port a été ajouté."
|
||||
|
||||
#: views.py:327
|
||||
msgid "The port already exists."
|
||||
msgstr "Le port existe déjà."
|
||||
|
||||
#: views.py:333 views.py:705 views.py:760 views.py:819 views.py:874
|
||||
#: views.py:929
|
||||
msgid "Add"
|
||||
msgstr "Ajouter"
|
||||
|
||||
#: views.py:348
|
||||
msgid "The port was edited."
|
||||
msgstr "Le port a été modifié."
|
||||
|
||||
#: views.py:371
|
||||
msgid "The port was deleted."
|
||||
msgstr "Le port a été supprimé."
|
||||
|
||||
#: views.py:375
|
||||
#, python-format
|
||||
msgid "The port %s is used by another object, impossible to delete it."
|
||||
msgstr "Le port %s est utilisé par un autre objet, impossible de le supprimer."
|
||||
|
||||
#: views.py:392
|
||||
msgid "The stack was created."
|
||||
msgstr "La pile a été créée."
|
||||
|
||||
#: views.py:424
|
||||
msgid "The stack was deleted."
|
||||
msgstr "La pile a été supprimée."
|
||||
|
||||
#: views.py:428
|
||||
#, python-format
|
||||
msgid "The stack %s is used by another object, impossible to deleted it."
|
||||
msgstr ""
|
||||
"La pile %s est utilisée par un autre objet, impossible de la supprimer."
|
||||
|
||||
#: views.py:470 views.py:611 views.py:666
|
||||
msgid ""
|
||||
"The organisation's user doesn't exist yet, please create or link it in the "
|
||||
"preferences."
|
||||
msgstr ""
|
||||
"L'utilisateur de l'association n'existe pas encore, veuillez le créer ou le "
|
||||
"relier dans les préférences."
|
||||
|
||||
#: views.py:485
|
||||
msgid "The switch was created."
|
||||
msgstr "Le commutateur réseau a été créé."
|
||||
|
||||
#: views.py:508
|
||||
msgid "Nonexistent switch"
|
||||
msgstr "Commutateur réseau inexistant."
|
||||
|
||||
#: views.py:528
|
||||
msgid "The ports were created."
|
||||
msgstr "Les ports ont été créés."
|
||||
|
||||
#: views.py:572
|
||||
msgid "The switch was edited."
|
||||
msgstr "Le commutateur réseau a été modifié."
|
||||
|
||||
#: views.py:626
|
||||
msgid "The access point was created."
|
||||
msgstr "Le point d'accès sans fil a été créé."
|
||||
|
||||
#: views.py:679
|
||||
msgid "The access point was edited."
|
||||
msgstr "Le point d'accès sans fil a été modifié."
|
||||
|
||||
#: views.py:702
|
||||
msgid "The room was created."
|
||||
msgstr "La chambre a été créée."
|
||||
|
||||
#: views.py:719
|
||||
msgid "The room was edited."
|
||||
msgstr "La chambre a été modifiée."
|
||||
|
||||
#: views.py:735
|
||||
msgid "The room was deleted."
|
||||
msgstr "La chambre a été supprimée."
|
||||
|
||||
#: views.py:739
|
||||
#, python-format
|
||||
msgid "The room %s is used by another object, impossible to deleted it."
|
||||
msgstr ""
|
||||
"La chambre %s est utilisée par un autre objet, impossible de la supprimer."
|
||||
|
||||
#: views.py:757
|
||||
msgid "The swich model was created."
|
||||
msgstr "Le modèle de commutateur réseau a été créé."
|
||||
|
||||
#: views.py:778
|
||||
msgid "The switch model was edited."
|
||||
msgstr "Le modèle de commutateur réseau a été modifié."
|
||||
|
||||
#: views.py:794
|
||||
msgid "The switch model was deleted."
|
||||
msgstr "Le modèle de commutateur réseau a été supprimé."
|
||||
|
||||
#: views.py:798
|
||||
#, python-format
|
||||
msgid "The switch model %s is used by another object, impossible to delete it."
|
||||
msgstr ""
|
||||
"Le modèle de commutateur réseau %s est utilisé par un autre objet, "
|
||||
"impossible de le supprimer."
|
||||
|
||||
#: views.py:816
|
||||
msgid "The switch bay was created."
|
||||
msgstr "La baie de brassage a été créée."
|
||||
|
||||
#: views.py:833
|
||||
msgid "The switch bay was edited."
|
||||
msgstr "La baie de brassage a été modifiée."
|
||||
|
||||
#: views.py:849
|
||||
msgid "The switch bay was deleted."
|
||||
msgstr "La baie de brassage a été supprimée."
|
||||
|
||||
#: views.py:853
|
||||
#, python-format
|
||||
msgid "The switch bay %s is used by another object, impossible to delete it."
|
||||
msgstr ""
|
||||
"La baie de brassage %s est utilisée par un autre objet, impossible de la "
|
||||
"supprimer."
|
||||
|
||||
#: views.py:871
|
||||
msgid "The building was created."
|
||||
msgstr "Le bâtiment a été créé."
|
||||
|
||||
#: views.py:888
|
||||
msgid "The building was edited."
|
||||
msgstr "Le bâtiment a été modifié."
|
||||
|
||||
#: views.py:904
|
||||
msgid "The building was deleted."
|
||||
msgstr "Le bâtiment a été supprimé."
|
||||
|
||||
#: views.py:908
|
||||
#, python-format
|
||||
msgid "The building %s is used by another object, impossible to delete it."
|
||||
msgstr ""
|
||||
"Le bâtiment %s est utilisé par un autre objet, impossible de le supprimer."
|
||||
|
||||
#: views.py:926
|
||||
msgid "The switch constructor was created."
|
||||
msgstr "Le constructeur de commutateur réseau a été créé."
|
||||
|
||||
#: views.py:947
|
||||
msgid "The switch constructor was edited."
|
||||
msgstr "Le constructeur de commutateur réseau a été modifié."
|
||||
|
||||
#: views.py:963
|
||||
msgid "The switch constructor was deleted."
|
||||
msgstr "Le constructeur de commutateur réseau a été supprimé."
|
||||
|
||||
#: views.py:967
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The switch constructor %s is used by another object, impossible to delete it."
|
||||
msgstr ""
|
||||
"Le constructeur de commutateur réseau %s est utilisé par un autre objet, "
|
||||
"impossible de le supprimer."
|
||||
|
||||
#: views.py:984
|
||||
msgid "The port profile was created."
|
||||
msgstr "Le profil de port a été créé."
|
||||
|
||||
#: views.py:1002
|
||||
msgid "The port profile was edited."
|
||||
msgstr "Le profil de port a été modifié."
|
||||
|
||||
#: views.py:1019
|
||||
msgid "The port profile was deleted."
|
||||
msgstr "Le profil de port a été supprimé."
|
||||
|
||||
#: views.py:1022
|
||||
msgid "Impossible to delete the port profile."
|
||||
msgstr "Impossible de supprimer le profil de port."
|
||||
|
||||
#: views.py:1142
|
||||
msgid ""
|
||||
"The default Django template isn't used. This can lead to rendering errors. "
|
||||
"Check the parameters."
|
||||
msgstr ""
|
||||
"Le gabarit par défaut de Django n'est pas utilisé. Cela peut entraîner des "
|
||||
"erreurs de rendu. Vérifiez les paramètres."
|
146
topologie/migrations/0062_auto_20180815_1918.py
Normal file
146
topologie/migrations/0062_auto_20180815_1918.py
Normal file
|
@ -0,0 +1,146 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2018-08-15 17:18
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('topologie', '0061_portprofile'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='accesspoint',
|
||||
options={'permissions': (('view_accesspoint', 'Can view an access point object'),), 'verbose_name': 'access point', 'verbose_name_plural': 'access points'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='building',
|
||||
options={'permissions': (('view_building', 'Can view a building object'),), 'verbose_name': 'building', 'verbose_name_plural': 'buildings'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='constructorswitch',
|
||||
options={'permissions': (('view_constructorswitch', 'Can view a switch constructor object'),), 'verbose_name': 'switch constructor', 'verbose_name_plural': 'switch constructors'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='modelswitch',
|
||||
options={'permissions': (('view_modelswitch', 'Can view a switch model object'),), 'verbose_name': 'switch model', 'verbose_name_plural': 'switch models'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='port',
|
||||
options={'permissions': (('view_port', 'Can view a port object'),), 'verbose_name': 'port', 'verbose_name_plural': 'ports'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='portprofile',
|
||||
options={'permissions': (('view_port_profile', 'Can view a port profile object'),), 'verbose_name': 'port profile', 'verbose_name_plural': 'port profiles'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='room',
|
||||
options={'ordering': ['name'], 'permissions': (('view_room', 'Can view a room object'),), 'verbose_name': 'room', 'verbose_name_plural': 'rooms'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='stack',
|
||||
options={'permissions': (('view_stack', 'Can view a stack object'),), 'verbose_name': 'switches stack', 'verbose_name_plural': 'switches stacks'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='switch',
|
||||
options={'permissions': (('view_switch', 'Can view a switch object'),), 'verbose_name': 'switch', 'verbose_name_plural': 'switches'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='switchbay',
|
||||
options={'permissions': (('view_switchbay', 'Can view a switch bay object'),), 'verbose_name': 'switch bay', 'verbose_name_plural': 'switch bays'},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='accesspoint',
|
||||
name='location',
|
||||
field=models.CharField(blank=True, help_text="Details about the AP's location", max_length=255, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='port',
|
||||
name='state',
|
||||
field=models.BooleanField(default=True, help_text='Port state Active', verbose_name='Port state Active'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='arp_protect',
|
||||
field=models.BooleanField(default=False, help_text='Check if IP adress is DHCP assigned', verbose_name='ARP protection'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='dhcp_snooping',
|
||||
field=models.BooleanField(default=False, help_text='Protect against rogue DHCP', verbose_name='DHCP snooping'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='dhcpv6_snooping',
|
||||
field=models.BooleanField(default=False, help_text='Protect against rogue DHCPv6', verbose_name='DHCPv6 snooping'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='flow_control',
|
||||
field=models.BooleanField(default=False, help_text='Flow control'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='loop_protect',
|
||||
field=models.BooleanField(default=False, help_text='Protect against loop', verbose_name='Loop protection'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='mac_limit',
|
||||
field=models.IntegerField(blank=True, help_text='Limit of MAC-address on this port', null=True, verbose_name='MAC limit'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='profil_default',
|
||||
field=models.CharField(blank=True, choices=[('room', 'room'), ('accespoint', 'accesspoint'), ('uplink', 'uplink'), ('asso_machine', 'asso_machine'), ('nothing', 'nothing')], max_length=32, null=True, unique=True, verbose_name='Default profile'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='ra_guard',
|
||||
field=models.BooleanField(default=False, help_text='Protect against rogue RA', verbose_name='RA guard'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='radius_mode',
|
||||
field=models.CharField(choices=[('STRICT', 'STRICT'), ('COMMON', 'COMMON')], default='COMMON', help_text='In case of MAC-authentication : mode COMMON or STRICT on this port', max_length=32, verbose_name='RADIUS mode'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='radius_type',
|
||||
field=models.CharField(choices=[('NO', 'NO'), ('802.1X', '802.1X'), ('MAC-radius', 'MAC-radius')], help_text='Type of RADIUS authentication : inactive, MAC-address or 802.1X', max_length=32, verbose_name='RADIUS type'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='portprofile',
|
||||
name='speed',
|
||||
field=models.CharField(choices=[('10-half', '10-half'), ('100-half', '100-half'), ('10-full', '10-full'), ('100-full', '100-full'), ('1000-full', '1000-full'), ('auto', 'auto'), ('auto-10', 'auto-10'), ('auto-100', 'auto-100')], default='auto', help_text='Port speed limit', max_length=32),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='switch',
|
||||
name='model',
|
||||
field=models.ForeignKey(blank=True, help_text='Switch model', null=True, on_delete=django.db.models.deletion.SET_NULL, to='topologie.ModelSwitch'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='switch',
|
||||
name='number',
|
||||
field=models.PositiveIntegerField(help_text='Number of ports'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='switch',
|
||||
name='stack_member_id',
|
||||
field=models.PositiveIntegerField(blank=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='switch',
|
||||
name='switchbay',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='topologie.SwitchBay'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='switchbay',
|
||||
name='info',
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
]
|
|
@ -57,7 +57,6 @@ class Stack(AclMixin, RevMixin, models.Model):
|
|||
"""Un objet stack. Regrouppe des switchs en foreign key
|
||||
,contient une id de stack, un switch id min et max dans
|
||||
le stack"""
|
||||
PRETTY_NAME = "Stack de switchs"
|
||||
|
||||
name = models.CharField(max_length=32, blank=True, null=True)
|
||||
stack_id = models.CharField(max_length=32, unique=True)
|
||||
|
@ -67,8 +66,10 @@ class Stack(AclMixin, RevMixin, models.Model):
|
|||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_stack", "Peut voir un objet stack"),
|
||||
("view_stack", _("Can view a stack object")),
|
||||
)
|
||||
verbose_name = _("switches stack")
|
||||
verbose_name_plural = _("switches stacks")
|
||||
|
||||
def __str__(self):
|
||||
return " ".join([self.name, self.stack_id])
|
||||
|
@ -82,8 +83,10 @@ class Stack(AclMixin, RevMixin, models.Model):
|
|||
def clean(self):
|
||||
""" Verification que l'id_max < id_min"""
|
||||
if self.member_id_max < self.member_id_min:
|
||||
raise ValidationError({'member_id_max': "L'id maximale est\
|
||||
inférieure à l'id minimale"})
|
||||
raise ValidationError(
|
||||
{'member_id_max': _("The maximum ID is less than the"
|
||||
" minimum ID.")}
|
||||
)
|
||||
|
||||
|
||||
class AccessPoint(AclMixin, Machine):
|
||||
|
@ -91,19 +94,20 @@ class AccessPoint(AclMixin, Machine):
|
|||
|
||||
Definition pour une borne wifi , hérite de machines.interfaces
|
||||
"""
|
||||
PRETTY_NAME = "Borne WiFi"
|
||||
|
||||
location = models.CharField(
|
||||
max_length=255,
|
||||
help_text="Détails sur la localisation de l'AP",
|
||||
help_text=_("Details about the AP's location"),
|
||||
blank=True,
|
||||
null=True
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_accesspoint", "Peut voir une borne"),
|
||||
("view_accesspoint", _("Can view an access point object")),
|
||||
)
|
||||
verbose_name = _("access point")
|
||||
verbose_name_plural = _("access points")
|
||||
|
||||
def port(self):
|
||||
"""Return the queryset of ports for this device"""
|
||||
|
@ -197,10 +201,9 @@ class Switch(AclMixin, Machine):
|
|||
|
||||
Validation au save que l'id du stack est bien dans le range id_min
|
||||
id_max de la stack parente"""
|
||||
PRETTY_NAME = "Switch / Commutateur"
|
||||
|
||||
number = models.PositiveIntegerField(
|
||||
help_text="Nombre de ports"
|
||||
help_text=_("Number of ports")
|
||||
)
|
||||
stack = models.ForeignKey(
|
||||
'topologie.Stack',
|
||||
|
@ -210,29 +213,29 @@ class Switch(AclMixin, Machine):
|
|||
)
|
||||
stack_member_id = models.PositiveIntegerField(
|
||||
blank=True,
|
||||
null=True,
|
||||
help_text="Baie de brassage du switch"
|
||||
null=True
|
||||
)
|
||||
model = models.ForeignKey(
|
||||
'topologie.ModelSwitch',
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=models.SET_NULL,
|
||||
help_text="Modèle du switch"
|
||||
help_text=_("Switch model")
|
||||
)
|
||||
switchbay = models.ForeignKey(
|
||||
'topologie.SwitchBay',
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=models.SET_NULL,
|
||||
help_text="Baie de brassage du switch"
|
||||
)
|
||||
|
||||
class Meta:
|
||||
unique_together = ('stack', 'stack_member_id')
|
||||
permissions = (
|
||||
("view_switch", "Peut voir un objet switch"),
|
||||
("view_switch", _("Can view a switch object")),
|
||||
)
|
||||
verbose_name = _("switch")
|
||||
verbose_name_plural = _("switches")
|
||||
|
||||
def clean(self):
|
||||
""" Verifie que l'id stack est dans le bon range
|
||||
|
@ -243,12 +246,14 @@ class Switch(AclMixin, Machine):
|
|||
if (self.stack_member_id > self.stack.member_id_max) or\
|
||||
(self.stack_member_id < self.stack.member_id_min):
|
||||
raise ValidationError(
|
||||
{'stack_member_id': "L'id de ce switch est en\
|
||||
dehors des bornes permises pas la stack"}
|
||||
)
|
||||
{'stack_member_id': _("The switch ID exceeds the"
|
||||
" limits allowed by the stack.")}
|
||||
)
|
||||
else:
|
||||
raise ValidationError({'stack_member_id': "L'id dans la stack\
|
||||
ne peut être nul"})
|
||||
raise ValidationError(
|
||||
{'stack_member_id': _("The stack member ID can't be"
|
||||
" void.")}
|
||||
)
|
||||
|
||||
def create_ports(self, begin, end):
|
||||
""" Crée les ports de begin à end si les valeurs données
|
||||
|
@ -262,9 +267,10 @@ class Switch(AclMixin, Machine):
|
|||
s_end = ports.last().get('port')
|
||||
|
||||
if end < begin:
|
||||
raise ValidationError("Port de fin inférieur au port de début !")
|
||||
raise ValidationError(_("The end port is less than the start"
|
||||
" port."))
|
||||
if end - begin > self.number:
|
||||
raise ValidationError("Ce switch ne peut avoir autant de ports.")
|
||||
raise ValidationError(_("This switch can't have that many ports."))
|
||||
begin_range = range(begin, s_begin)
|
||||
end_range = range(s_end+1, end+1)
|
||||
for i in itertools.chain(begin_range, end_range):
|
||||
|
@ -274,9 +280,9 @@ class Switch(AclMixin, Machine):
|
|||
try:
|
||||
with transaction.atomic(), reversion.create_revision():
|
||||
port.save()
|
||||
reversion.set_comment("Création")
|
||||
reversion.set_comment(_("Creation"))
|
||||
except IntegrityError:
|
||||
ValidationError("Création d'un port existant.")
|
||||
ValidationError(_("Creation of an existing port."))
|
||||
|
||||
def main_interface(self):
|
||||
""" Returns the 'main' interface of the switch """
|
||||
|
@ -292,7 +298,7 @@ class Switch(AclMixin, Machine):
|
|||
|
||||
class ModelSwitch(AclMixin, RevMixin, models.Model):
|
||||
"""Un modèle (au sens constructeur) de switch"""
|
||||
PRETTY_NAME = "Modèle de switch"
|
||||
|
||||
reference = models.CharField(max_length=255)
|
||||
constructor = models.ForeignKey(
|
||||
'topologie.ConstructorSwitch',
|
||||
|
@ -301,8 +307,10 @@ class ModelSwitch(AclMixin, RevMixin, models.Model):
|
|||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_modelswitch", "Peut voir un objet modelswitch"),
|
||||
("view_modelswitch", _("Can view a switch model object")),
|
||||
)
|
||||
verbose_name = _("switch model")
|
||||
verbose_name_plural = _("switch models")
|
||||
|
||||
def __str__(self):
|
||||
return str(self.constructor) + ' ' + self.reference
|
||||
|
@ -310,13 +318,16 @@ class ModelSwitch(AclMixin, RevMixin, models.Model):
|
|||
|
||||
class ConstructorSwitch(AclMixin, RevMixin, models.Model):
|
||||
"""Un constructeur de switch"""
|
||||
PRETTY_NAME = "Constructeur de switch"
|
||||
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_constructorswitch", "Peut voir un objet constructorswitch"),
|
||||
("view_constructorswitch", _("Can view a switch constructor"
|
||||
" object")),
|
||||
)
|
||||
verbose_name = _("switch constructor")
|
||||
verbose_name_plural = ("switch constructors")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
@ -324,7 +335,7 @@ class ConstructorSwitch(AclMixin, RevMixin, models.Model):
|
|||
|
||||
class SwitchBay(AclMixin, RevMixin, models.Model):
|
||||
"""Une baie de brassage"""
|
||||
PRETTY_NAME = "Baie de brassage"
|
||||
|
||||
name = models.CharField(max_length=255)
|
||||
building = models.ForeignKey(
|
||||
'Building',
|
||||
|
@ -333,14 +344,15 @@ class SwitchBay(AclMixin, RevMixin, models.Model):
|
|||
info = models.CharField(
|
||||
max_length=255,
|
||||
blank=True,
|
||||
null=True,
|
||||
help_text="Informations particulières"
|
||||
null=True
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_switchbay", "Peut voir un objet baie de brassage"),
|
||||
("view_switchbay", _("Can view a switch bay object")),
|
||||
)
|
||||
verbose_name = _("switch bay")
|
||||
verbose_name_plural = _("switch bays")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
@ -348,13 +360,15 @@ class SwitchBay(AclMixin, RevMixin, models.Model):
|
|||
|
||||
class Building(AclMixin, RevMixin, models.Model):
|
||||
"""Un batiment"""
|
||||
PRETTY_NAME = "Batiment"
|
||||
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_building", "Peut voir un objet batiment"),
|
||||
("view_building", _("Can view a building object")),
|
||||
)
|
||||
verbose_name = _("building")
|
||||
verbose_name_plural = _("buildings")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
@ -376,7 +390,6 @@ class Port(AclMixin, RevMixin, models.Model):
|
|||
- vlan_force : override la politique générale de placement vlan, permet
|
||||
de forcer un port sur un vlan particulier. S'additionne à la politique
|
||||
RADIUS"""
|
||||
PRETTY_NAME = "Port de switch"
|
||||
|
||||
switch = models.ForeignKey(
|
||||
'Switch',
|
||||
|
@ -411,15 +424,17 @@ class Port(AclMixin, RevMixin, models.Model):
|
|||
state = models.BooleanField(
|
||||
default=True,
|
||||
help_text='Port state Active',
|
||||
verbose_name=_("Port State Active")
|
||||
verbose_name=_("Port state Active")
|
||||
)
|
||||
details = models.CharField(max_length=255, blank=True)
|
||||
|
||||
class Meta:
|
||||
unique_together = ('switch', 'port')
|
||||
permissions = (
|
||||
("view_port", "Peut voir un objet port"),
|
||||
("view_port", _("Can view a port object")),
|
||||
)
|
||||
verbose_name = _("port")
|
||||
verbose_name_plural = _("ports")
|
||||
|
||||
@cached_property
|
||||
def get_port_profile(self):
|
||||
|
@ -486,22 +501,21 @@ class Port(AclMixin, RevMixin, models.Model):
|
|||
if hasattr(self, 'switch'):
|
||||
if self.port > self.switch.number:
|
||||
raise ValidationError(
|
||||
"Ce port ne peut exister, numero trop élevé"
|
||||
_("The port can't exist, its number is too great.")
|
||||
)
|
||||
if (self.room and self.machine_interface or
|
||||
self.room and self.related or
|
||||
self.machine_interface and self.related):
|
||||
raise ValidationError(
|
||||
"Chambre, interface et related_port sont mutuellement "
|
||||
"exclusifs"
|
||||
_("Room, interface and related port are mutually exclusive.")
|
||||
)
|
||||
if self.related == self:
|
||||
raise ValidationError("On ne peut relier un port à lui même")
|
||||
raise ValidationError(_("A port can't be related to itself."))
|
||||
if self.related and not self.related.related:
|
||||
if self.related.machine_interface or self.related.room:
|
||||
raise ValidationError(
|
||||
"Le port relié est déjà occupé, veuillez le libérer "
|
||||
"avant de créer une relation"
|
||||
_("The related port is already used, please clear it"
|
||||
" before creating the relation.")
|
||||
)
|
||||
else:
|
||||
self.make_port_related()
|
||||
|
@ -514,7 +528,6 @@ class Port(AclMixin, RevMixin, models.Model):
|
|||
|
||||
class Room(AclMixin, RevMixin, models.Model):
|
||||
"""Une chambre/local contenant une prise murale"""
|
||||
PRETTY_NAME = "Chambre/ Prise murale"
|
||||
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
details = models.CharField(max_length=255, blank=True)
|
||||
|
@ -522,8 +535,10 @@ class Room(AclMixin, RevMixin, models.Model):
|
|||
class Meta:
|
||||
ordering = ['name']
|
||||
permissions = (
|
||||
("view_room", "Peut voir un objet chambre"),
|
||||
("view_room", _("Can view a room object")),
|
||||
)
|
||||
verbose_name = _("room")
|
||||
verbose_name_plural = _("rooms")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
@ -564,7 +579,7 @@ class PortProfile(AclMixin, RevMixin, models.Model):
|
|||
blank=True,
|
||||
null=True,
|
||||
unique=True,
|
||||
verbose_name=_("profil default")
|
||||
verbose_name=_("Default profile")
|
||||
)
|
||||
vlan_untagged = models.ForeignKey(
|
||||
'machines.Vlan',
|
||||
|
@ -583,66 +598,66 @@ class PortProfile(AclMixin, RevMixin, models.Model):
|
|||
radius_type = models.CharField(
|
||||
max_length=32,
|
||||
choices=TYPES,
|
||||
help_text="Type of radius auth : inactive, mac-address or 802.1X",
|
||||
help_text=_("Type of RADIUS authentication : inactive, MAC-address or"
|
||||
" 802.1X"),
|
||||
verbose_name=_("RADIUS type")
|
||||
)
|
||||
radius_mode = models.CharField(
|
||||
max_length=32,
|
||||
choices=MODES,
|
||||
default='COMMON',
|
||||
help_text="In case of mac-auth : mode common or strict on this port",
|
||||
help_text=_("In case of MAC-authentication : mode COMMON or STRICT on"
|
||||
" this port"),
|
||||
verbose_name=_("RADIUS mode")
|
||||
)
|
||||
speed = models.CharField(
|
||||
max_length=32,
|
||||
choices=SPEED,
|
||||
default='auto',
|
||||
help_text='Port speed limit',
|
||||
verbose_name=_("Speed")
|
||||
help_text=_("Port speed limit"),
|
||||
)
|
||||
mac_limit = models.IntegerField(
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text='Limit of mac-address on this port',
|
||||
verbose_name=_("Mac limit")
|
||||
help_text=_("Limit of MAC-address on this port"),
|
||||
verbose_name=_("MAC limit")
|
||||
)
|
||||
flow_control = models.BooleanField(
|
||||
default=False,
|
||||
help_text='Flow control',
|
||||
verbose_name=_("Flow control")
|
||||
help_text=_("Flow control"),
|
||||
)
|
||||
dhcp_snooping = models.BooleanField(
|
||||
default=False,
|
||||
help_text='Protect against rogue dhcp',
|
||||
verbose_name=_("Dhcp snooping")
|
||||
help_text=_("Protect against rogue DHCP"),
|
||||
verbose_name=_("DHCP snooping")
|
||||
)
|
||||
dhcpv6_snooping = models.BooleanField(
|
||||
default=False,
|
||||
help_text='Protect against rogue dhcpv6',
|
||||
verbose_name=_("Dhcpv6 snooping")
|
||||
help_text=_("Protect against rogue DHCPv6"),
|
||||
verbose_name=_("DHCPv6 snooping")
|
||||
)
|
||||
arp_protect = models.BooleanField(
|
||||
default=False,
|
||||
help_text='Check if ip is dhcp assigned',
|
||||
verbose_name=_("Arp protect")
|
||||
help_text=_("Check if IP adress is DHCP assigned"),
|
||||
verbose_name=_("ARP protection")
|
||||
)
|
||||
ra_guard = models.BooleanField(
|
||||
default=False,
|
||||
help_text='Protect against rogue ra',
|
||||
verbose_name=_("Ra guard")
|
||||
help_text=_("Protect against rogue RA"),
|
||||
verbose_name=_("RA guard")
|
||||
)
|
||||
loop_protect = models.BooleanField(
|
||||
default=False,
|
||||
help_text='Protect again loop',
|
||||
verbose_name=_("Loop Protect")
|
||||
help_text=_("Protect against loop"),
|
||||
verbose_name=_("Loop protection")
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("view_port_profile", _("Can view a port profile object")),
|
||||
)
|
||||
verbose_name = _("Port profile")
|
||||
verbose_name_plural = _("Port profiles")
|
||||
verbose_name = _("port profile")
|
||||
verbose_name_plural = _("port profiles")
|
||||
|
||||
security_parameters_fields = [
|
||||
'loop_protect',
|
||||
|
@ -727,3 +742,4 @@ def switch_post_save(**_kwargs):
|
|||
@receiver(post_delete, sender=Switch)
|
||||
def switch_post_delete(**_kwargs):
|
||||
regen("graph_topo")
|
||||
|
||||
|
|
|
@ -24,50 +24,52 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="table-responsive">
|
||||
{% if ap_list.paginator %}
|
||||
{% include "pagination.html" with list=ap_list %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with prefix='ap' col='name' text='Borne' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='ap' col='mac' text='Addresse mac' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='ap' col='ip' text='Ipv4' %}</th>
|
||||
<th>Commentaire</th>
|
||||
<th>Localisation</th>
|
||||
{% trans "Access point" as tr_ap %}
|
||||
<th>{% include "buttons/sort.html" with prefix='ap' col='name' text=tr_ap %}</th>
|
||||
{% trans "MAC address" as tr_mac %}
|
||||
<th>{% include "buttons/sort.html" with prefix='ap' col='mac' text=tr_mac %}</th>
|
||||
{% trans "IPv4 address" as tr_ip %}
|
||||
<th>{% include "buttons/sort.html" with prefix='ap' col='ip' text=tr_ip %}</th>
|
||||
<th>{% trans "Details" %}</th>
|
||||
<th>{% trans "Location" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for ap in ap_list %}
|
||||
<tr>
|
||||
<td>{{ap.interface_set.first}}</td>
|
||||
<td>{{ap.interface_set.first.mac_address}}</td>
|
||||
<td>{{ap.interface_set.first.ipv4}}</td>
|
||||
<td>{{ap.interface_set.first.details}}</td>
|
||||
<td>{{ap.location}}</td>
|
||||
<td class="text-right">
|
||||
{% history_button ap %}
|
||||
{% can_edit ap %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-ap' ap.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_delete ap %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'machines:del-machine' ap.id %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ ap.interface_set.first }}</td>
|
||||
<td>{{ ap.interface_set.first.mac_address }}</td>
|
||||
<td>{{ ap.interface_set.first.ipv4 }}</td>
|
||||
<td>{{ ap.interface_set.first.details }}</td>
|
||||
<td>{{ ap.location }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit ap %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-ap' ap.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button ap %}
|
||||
{% can_delete ap %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'machines:del-machine' ap.id %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
{% if ap_list.paginator %}
|
||||
{% include "pagination.html" with list=ap_list %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if building_list.paginator %}
|
||||
{% include "pagination.html" with list=building_list %}
|
||||
|
@ -32,22 +33,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with prefix='building' col='name' text='Bâtiment' %}</th>
|
||||
{% trans "Building" as tr_building %}
|
||||
<th>{% include "buttons/sort.html" with prefix='building' col='name' text=tr_building %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for building in building_list %}
|
||||
<tr>
|
||||
<td>{{building.name}}</td>
|
||||
<td>{{ building.name }}</td>
|
||||
<td class="text-right">
|
||||
{% history_button building %}
|
||||
{% can_edit building %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-building' building.id %}">
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-building' building.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button building %}
|
||||
{% can_delete building %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-building' building.id %}">
|
||||
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-building' building.id %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
|
@ -59,3 +61,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% if building_list.paginator %}
|
||||
{% include "pagination.html" with list=building_list %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if room_list.paginator %}
|
||||
{% include "pagination.html" with list=room_list %}
|
||||
|
@ -32,24 +33,25 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with prefix='room' col='name' text='Chambre' %}</th>
|
||||
<th>Commentaire</th>
|
||||
{% trans "Room" as tr_room %}
|
||||
<th>{% include "buttons/sort.html" with prefix='room' col='name' text=tr_room %}</th>
|
||||
<th>{% trans "Details" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for room in room_list %}
|
||||
<tr>
|
||||
<td>{{room.name}}</td>
|
||||
<td>{{room.details}}</td>
|
||||
<td>{{ room.name }}</td>
|
||||
<td>{{ room.details }}</td>
|
||||
<td class="text-right">
|
||||
{% history_button room %}
|
||||
{% can_edit room %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-room' room.id %}">
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-room' room.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button room %}
|
||||
{% can_delete room %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-room' room.id %}">
|
||||
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-room' room.id %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
|
@ -61,3 +63,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% if room_list.paginator %}
|
||||
{% include "pagination.html" with list=room_list %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if constructor_switch_list.paginator %}
|
||||
{% include "pagination.html" with list=constructor_switch_list %}
|
||||
|
@ -32,22 +33,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with prefix='constructor-switch' col='name' text='Constructeur' %}</th>
|
||||
{% trans "Switch constructor" as tr_constructor %}
|
||||
<th>{% include "buttons/sort.html" with prefix='constructor-switch' col='name' text=tr_constructor %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for constructor_switch in constructor_switch_list %}
|
||||
<tr>
|
||||
<td>{{constructor_switch}}</td>
|
||||
<td>{{ constructor_switch }}</td>
|
||||
<td class="text-right">
|
||||
{% history_button constructor_switch %}
|
||||
{% can_edit constructor_switch %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-constructor-switch' constructor_switch.id %}">
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-constructor-switch' constructor_switch.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button constructor_switch %}
|
||||
{% can_delete constructor_switch %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-constructor-switch' constructor_switch.id %}">
|
||||
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-constructor-switch' constructor_switch.id %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
|
@ -59,3 +61,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% if constructor_switch_list.paginator %}
|
||||
{% include "pagination.html" with list=constructor_switch_list %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if model_switch_list.paginator %}
|
||||
{% include "pagination.html" with list=model_switch_list %}
|
||||
|
@ -32,24 +33,26 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with prefix='model-switch' col='reference' text='Référence' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='model-switch' col='constructor' text='Constructeur' %}</th>
|
||||
{% trans "Reference" as tr_ref %}
|
||||
<th>{% include "buttons/sort.html" with prefix='model-switch' col='reference' text=tr_ref %}</th>
|
||||
{% trans "Switch constructor" as tr_constructor %}
|
||||
<th>{% include "buttons/sort.html" with prefix='model-switch' col='constructor' text=tr_constructor %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for model_switch in model_switch_list %}
|
||||
<tr>
|
||||
<td>{{model_switch.reference}}</td>
|
||||
<td>{{model_switch.constructor}}</td>
|
||||
<td>{{ model_switch.reference }}</td>
|
||||
<td>{{ model_switch.constructor }}</td>
|
||||
<td class="text-right">
|
||||
{% history_button model_switch %}
|
||||
{% can_edit model_switch %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-model-switch' model_switch.id %}">
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-model-switch' model_switch.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button model_switch %}
|
||||
{% can_delete model_switch %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-model-switch' model_switch.id %}">
|
||||
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-model-switch' model_switch.id %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
|
@ -61,3 +64,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% if model_switch_list.paginator %}
|
||||
{% include "pagination.html" with list=model_switch_list %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -24,62 +24,83 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='port' text='Port' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='room' text='Room' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='interface' text='Interface machine' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='related' text='Related' %}</th>
|
||||
<th>Etat du port</th>
|
||||
<th>Profil du port</th>
|
||||
<th>Détails</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for port in port_list %}
|
||||
<tr>
|
||||
<td>{{ port.port }}</td>
|
||||
<td>
|
||||
{% if port.room %}{{ port.room }}{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if port.machine_interface %}
|
||||
{% can_view port.machine_interface.machine.user %}
|
||||
<a href="{% url 'users:profil' userid=port.machine_interface.machine.user.id %}">
|
||||
{{ port.machine_interface }}
|
||||
{% acl_end %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if port.related %}
|
||||
{% can_view port.related.switch %}
|
||||
<a href="{% url 'topologie:index-port' switchid=port.related.switch.id %}">
|
||||
<tr>
|
||||
{% trans "Port" as tr_port %}
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='port' text=tr_port %}</th>
|
||||
{% trans "Room" as tr_room %}
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='room' text=tr_room %}</th>
|
||||
{% trans "Interface" as tr_interface %}
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='interface' text=tr_interface %}</th>
|
||||
{% trans "Related port" as tr_related_port %}
|
||||
<th>{% include "buttons/sort.html" with prefix='port' col='related' text=tr_related_port %}</th>
|
||||
<th>{% trans "Port state" %}</th>
|
||||
<th>{% trans "Port profile" %}</th>
|
||||
<th>{% trans "Details" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for port in port_list %}
|
||||
<tr>
|
||||
<td>{{ port.port }}</td>
|
||||
<td>
|
||||
{% if port.room %}
|
||||
{{ port.room }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if port.machine_interface %}
|
||||
{% can_view port.machine_interface.machine.user %}
|
||||
<a href="{% url 'users:profil' userid=port.machine_interface.machine.user.id %}">
|
||||
{{ port.machine_interface }}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if port.related %}
|
||||
{% can_view port.related.switch %}
|
||||
<a href="{% url 'topologie:index-port' switchid=port.related.switch.id %}">
|
||||
{{ port.related }}
|
||||
</a>
|
||||
{% acl_else %}
|
||||
{{ port.related }}
|
||||
</a>
|
||||
{% acl_else %}
|
||||
{{ port.related }}
|
||||
{% acl_end %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{% if port.state %} <i class="text-success">Actif</i>{% else %}<i class="text-danger">Désactivé</i>{% endif %}</td>
|
||||
<td>{% if not port.custom_profil %}<u>Par défaut</u> : {% endif %}{{port.get_port_profil}}</td>
|
||||
<td>{{ port.details }}</td>
|
||||
<td class="text-right">
|
||||
{% history_button port %}
|
||||
{% can_edit port %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-port' port.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_delete port %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-port' port.pk %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% acl_end %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if port.state %}
|
||||
<i class="text-success">{% trans "Active" %}</i>
|
||||
{% else %}
|
||||
<i class="text-danger">{% trans "Disabled" %}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if not port.custom_profil %}
|
||||
<u>{% trans "Default: " %}</u>
|
||||
{% endif %}
|
||||
{{ port.get_port_profil }}
|
||||
</td>
|
||||
<td>{{ port.details }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit port %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-port' port.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button port %}
|
||||
{% can_delete port %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-port' port.pk %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -38,39 +38,39 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<th>{% trans "Default for" %}</th>
|
||||
<th>{% trans "VLANs" %}</th>
|
||||
<th>{% trans "RADIUS settings" %}</th>
|
||||
<th>{% trans "Speed" %}</th>
|
||||
<th>{% trans "Mac address limit" %}</th>
|
||||
<th>{% trans "Speed limit" %}</th>
|
||||
<th>{% trans "MAC address limit" %}</th>
|
||||
<th>{% trans "Security" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for port_profile in port_profile_list %}
|
||||
<tr>
|
||||
<td>{{port_profile.name}}</td>
|
||||
<td>{{port_profile.profil_default}}</td>
|
||||
<td>{{ port_profile.name }}</td>
|
||||
<td>{{ port_profile.profil_default }}</td>
|
||||
<td>
|
||||
{% if port_profile.vlan_untagged %}
|
||||
<b>Untagged : </b>{{port_profile.vlan_untagged}}
|
||||
<b>{% trans "Untagged: " %}</b>{{ port_profile.vlan_untagged }}
|
||||
<br>
|
||||
{% endif %}
|
||||
{% if port_profile.vlan_tagged.all %}
|
||||
<b>Tagged : </b>{{port_profile.vlan_tagged.all|join:", "}}
|
||||
<b>{% trans "Tagged: " %}</b>{{ port_profile.vlan_tagged.all|join:", " }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<b>Type : </b>{{port_profile.radius_type}}
|
||||
<b>{% trans "RADIUS type: " %}</b>{{ port_profile.radius_type }}
|
||||
{% if port_profile.radius_type == "MAC-radius" %}
|
||||
<br>
|
||||
<b>Mode : </b>{{port_profile.radius_mode}}</td>
|
||||
<b>{% trans "RADIUS mode: " %}</b>{{ port_profile.radius_mode }}</td>
|
||||
{% endif %}
|
||||
<td>{{port_profile.speed}}</td>
|
||||
<td>{{port_profile.mac_limit}}</td>
|
||||
<td>{{port_profile.security_parameters_enabled|join:"<br>"}}</td>
|
||||
<td>{{ port_profile.speed }}</td>
|
||||
<td>{{ port_profile.mac_limit }}</td>
|
||||
<td>{{ port_profile.security_parameters_enabled|join:"<br>" }}</td>
|
||||
<td class="text-right">
|
||||
{% history_button port_profile %}
|
||||
{% can_edit port_profile %}
|
||||
{% include 'buttons/edit.html' with href='topologie:edit-port-profile' id=port_profile.pk %}
|
||||
{% acl_end %}
|
||||
{% history_button port_profile %}
|
||||
{% can_delete port_profile %}
|
||||
{% include 'buttons/suppr.html' with href='topologie:del-port-profile' id=port_profile.pk %}
|
||||
{% acl_end %}
|
||||
|
@ -84,3 +84,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -24,37 +24,46 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with prefix='stack' col='name' text='Stack' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='stack' col='id' text='ID' %}</th>
|
||||
<th>Détails</th>
|
||||
<th>Membres</th>
|
||||
{% trans "Stack" as tr_stack %}
|
||||
<th>{% include "buttons/sort.html" with prefix='stack' col='name' text=tr_stack %}</th>
|
||||
{% trans "ID" as tr_id %}
|
||||
<th>{% include "buttons/sort.html" with prefix='stack' col='id' text=id %}</th>
|
||||
<th>{% trans "Details" %}</th>
|
||||
<th>{% trans "Members" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for stack in stack_list %}
|
||||
<tr>
|
||||
<td>{{ stack.name }}</td>
|
||||
<td>{{stack.stack_id}}</td>
|
||||
<td>{{stack.details}}</td>
|
||||
<td>{% for switch in stack.switch_set.all %}<a href="{% url 'topologie:index-port' switch.pk %}">{{switch }} </a>{% endfor %}</td>
|
||||
<td class="text-right">
|
||||
{% history_button stack %}
|
||||
{% can_edit stack %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-stack' stack.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_delete stack %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-stack' stack.pk %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ stack.name }}</td>
|
||||
<td>{{ stack.stack_id }}</td>
|
||||
<td>{{ stack.details }}</td>
|
||||
<td>
|
||||
{% for switch in stack.switch_set.all %}
|
||||
<a href="{% url 'topologie:index-port' switch.pk %}">
|
||||
{{ switch }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% can_edit stack %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-stack' stack.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button stack %}
|
||||
{% can_delete stack %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-stack' stack.pk %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -24,59 +24,65 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="table-responsive">
|
||||
{% if switch_list.paginator %}
|
||||
{% include "pagination.html" with list=switch_list %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='dns' text='Dns' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='ip' text='Ipv4' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='loc' text='Emplacement' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='ports' text='Ports' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='stack' text='Stack' %}</th>
|
||||
<th>Id stack</th>
|
||||
<th>Modèle</th>
|
||||
<th>Détails</th>
|
||||
{% trans "DNS name" as tr_dns %}
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='dns' text=tr_dns %}</th>
|
||||
{% trans "IPv4 address" as tr_ip %}
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='ip' text=tr_ip %}</th>
|
||||
{% trans "Switch bay" as tr_bay %}
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='loc' text=tr_bay %}</th>
|
||||
{% trans "Ports" as tr_ports %}
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='ports' text=tr_ports %}</th>
|
||||
{% trans "Stack" as tr_stack %}
|
||||
<th>{% include "buttons/sort.html" with prefix='switch' col='stack' text=tr_stack %}</th>
|
||||
<th>{% trans "Stack ID" %}</th>
|
||||
<th>{% trans "Switch model" %}</th>
|
||||
<th>{% trans "Details" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for switch in switch_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<a title="Configuer" href="{% url 'topologie:index-port' switch.pk %}">
|
||||
{{switch}}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{switch.interface_set.first.ipv4}}</td>
|
||||
<td>{{switch.switchbay}}</td>
|
||||
<td>{{switch.number}}</td>
|
||||
<td>{{switch.stack.name}}</td>
|
||||
<td>{{switch.stack_member_id}}</td>
|
||||
<td>{{switch.model}}</td>
|
||||
<td>{{switch.interface_set.first.details}}</td>
|
||||
<td class="text-right">
|
||||
{% history_button switch %}
|
||||
{% can_edit switch %}
|
||||
{% include 'buttons/edit.html' with href='topologie:edit-switch' id=switch.pk %}
|
||||
{% acl_end %}
|
||||
{% can_delete switch %}
|
||||
{% include 'buttons/suppr.html' with href='machines:del-machine' id=switch.id %}
|
||||
{% acl_end %}
|
||||
{% can_create Port %}
|
||||
{% include 'buttons/add.html' with href='topologie:create-ports' id=switch.pk desc='Création de ports'%}
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{% url 'topologie:index-port' switch.pk %}">
|
||||
{{ switch }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ switch.interface_set.first.ipv4 }}</td>
|
||||
<td>{{ switch.switchbay }}</td>
|
||||
<td>{{ switch.number }}</td>
|
||||
<td>{{ switch.stack.name }}</td>
|
||||
<td>{{ switch.stack_member_id }}</td>
|
||||
<td>{{ switch.model }}</td>
|
||||
<td>{{ switch.interface_set.first.details }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit switch %}
|
||||
{% include 'buttons/edit.html' with href='topologie:edit-switch' id=switch.pk %}
|
||||
{% acl_end %}
|
||||
{% history_button switch %}
|
||||
{% can_delete switch %}
|
||||
{% include 'buttons/suppr.html' with href='machines:del-machine' id=switch.id %}
|
||||
{% acl_end %}
|
||||
{% can_create Port %}
|
||||
{% trans "Creation of ports" as tr_creation %}
|
||||
{% include 'buttons/add.html' with href='topologie:create-ports' id=switch.pk desc=tr_creation %}
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% if switch_list.paginator %}
|
||||
{% include "pagination.html" with list=switch_list %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if switch_bay_list.paginator %}
|
||||
{% include "pagination.html" with list=switch_bay_list %}
|
||||
|
@ -32,36 +33,45 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch-bay' col='name' text='Baie' %}</th>
|
||||
<th>{% include "buttons/sort.html" with prefix='switch-bay' col='building' text='Bâtiment' %}</th>
|
||||
<th>Info particulières</th>
|
||||
<th>Switchs de la baie</th>
|
||||
{% trans "Switch bay" as tr_bay %}
|
||||
<th>{% include "buttons/sort.html" with prefix='switch-bay' col='name' text=tr_bay %}</th>
|
||||
{% trans "Building" as tr_building %}
|
||||
<th>{% include "buttons/sort.html" with prefix='switch-bay' col='building' text=tr_building %}</th>
|
||||
<th>{% trans "Information" %}</th>
|
||||
<th>{% trans "Switches of the bay" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for switch_bay in switch_bay_list %}
|
||||
<tr>
|
||||
<td>{{switch_bay.name}}</td>
|
||||
<td>{{switch_bay.building}}</td>
|
||||
<td>{{switch_bay.info}}</td>
|
||||
<td>{% for switch in switch_bay.switch_set.all %}<a href="{% url 'topologie:index-port' switch.pk %}">{{switch }} </a>{% endfor %}</td>
|
||||
<td class="text-right">
|
||||
{% history_button switch_bay %}
|
||||
{% can_edit switch_bay %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-switch-bay' switch_bay.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_delete switch_bay %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-switch-bay' switch_bay.id %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ switch_bay.name }}</td>
|
||||
<td>{{ switch_bay.building }}</td>
|
||||
<td>{{ switch_bay.info }}</td>
|
||||
<td>
|
||||
{% for switch in switch_bay.switch_set.all %}
|
||||
<a href="{% url 'topologie:index-port' switch.pk %}">
|
||||
{{ switch }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% can_edit switch_bay %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-switch-bay' switch_bay.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button switch_bay %}
|
||||
{% can_delete switch_bay %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-switch-bay' switch_bay.id %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% if switch_bay_list.paginator %}
|
||||
{% include "pagination.html" with list=switch_bay_list %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -24,17 +24,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Création et modification de machines{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
<h4>Attention, voulez-vous vraiment supprimer cet objet {{ objet_name }} ( {{ objet }} ) ?</h4>
|
||||
{% bootstrap_button "Confirmer" button_type="submit" icon="trash" %}
|
||||
<h4>{% blocktrans %}Warning: are you sure you want to delete this {{ objet_name }} object ( {{ objet }} )?{% endblocktrans %}</h4>
|
||||
{% trans "Confirm" as tr_confirm %}
|
||||
{% bootstrap_button tr_confirm button_type="submit" icon="trash" %}
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -24,33 +24,35 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load acl %}
|
||||
{% load logs_extra %}
|
||||
{% load i18n %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Stack</th>
|
||||
<th>ID</th>
|
||||
<th>Details</th>
|
||||
<th>{% trans "Stack" %}</th>
|
||||
<th>{% trans "Stack ID" %}</th>
|
||||
<th>{% trans "Details" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for stack in stack_list %}
|
||||
<tr>
|
||||
<td>{{ stack.name }}</td>
|
||||
<td>{{ stack.stack_id }}</td>
|
||||
<td>{{ stack.details }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit stack %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-stack' stack.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% history_button stack %}
|
||||
{% can_delete stack %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title={% trans "Delete" %} href="{% url 'topologie:del-stack' stack.pk %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for stack in stack_list %}
|
||||
<tr>
|
||||
<td>{{stack.name}}</td>
|
||||
<td>{{stack.stack_id}}</td>
|
||||
<td>{{stack.details}}</td>
|
||||
<td class="text-right">
|
||||
{% history_button stack %}
|
||||
{% can_edit stack %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-stack' stack.id %}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% can_delete stack %}
|
||||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-stack' stack.pk %}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
{% acl_end %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -25,8 +25,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Switchs{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
@ -51,7 +52,7 @@ function toggle_graph() {
|
|||
|
||||
|
||||
<button class="btn btn-primary" type="button" onclick="toggle_graph()">
|
||||
Topologie des Switchs
|
||||
{% trans "Topology of the switches" %}
|
||||
</button>
|
||||
|
||||
<a target="_blank" href="/media/images/switchs.png" class="btn btn-primary">
|
||||
|
@ -62,9 +63,9 @@ Topologie des Switchs
|
|||
<img id="zoom_01" src="/media/images/switchs.png" href="/media/images/switchs.png" target="_blank" data-zoom-image="/media/images/switchs.png" width=100% />
|
||||
</div>
|
||||
|
||||
<h2>Switchs</h2>
|
||||
<h2>{% trans "Switches" %}</h2>
|
||||
{% can_create Switch %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-switch' %}"><i class="fa fa-plus"></i> Ajouter un switch</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-switch' %}"><i class="fa fa-plus"></i>{% trans " Add a switch" %}</a>
|
||||
<hr>
|
||||
{% acl_end %}
|
||||
{% include "topologie/aff_switch.html" with switch_list=switch_list %}
|
||||
|
@ -73,3 +74,4 @@ Topologie des Switchs
|
|||
<br />
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -25,13 +25,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Bornes WiFi{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Points d'accès WiFi</h2>
|
||||
<h2>{% trans "Access points" %}</h2>
|
||||
{% can_create AccessPoint %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-ap' %}"><i class="fa fa-plus"></i> Ajouter une borne</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-ap' %}"><i class="fa fa-plus"></i>{% trans " Add an access point" %}</a>
|
||||
<hr>
|
||||
{% acl_end %}
|
||||
{% include "topologie/aff_ap.html" with ap_list=ap_list %}
|
||||
|
@ -39,3 +40,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -25,25 +25,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Modèles de switches{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Modèles de switches</h2>
|
||||
<h2>{% trans "Switch models" %}</h2>
|
||||
{% can_create ModelSwitch %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-model-switch' %}">
|
||||
<i class="fa fa-plus"></i> Ajouter un modèle
|
||||
<i class="fa fa-plus"></i>{% trans " Add a switch model" %}
|
||||
</a>
|
||||
<hr>
|
||||
{% acl_end %}
|
||||
{% include "topologie/aff_model_switch.html" with model_switch_list=model_switch_list %}
|
||||
|
||||
<h2>Constructeurs de switches</h2>
|
||||
<h2>{% trans "Switch constructors" %}</h2>
|
||||
{% can_create ConstructorSwitch %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-constructor-switch' %}">
|
||||
<i class="fa fa-plus"></i> Ajouter un constructeur
|
||||
<i class="fa fa-plus"></i>{% trans " Add a switch constructor" %}
|
||||
</a>
|
||||
<hr>
|
||||
{% acl_end %}
|
||||
{% include "topologie/aff_constructor_switch.html" with constructor_switch_list=constructor_switch_list %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -25,15 +25,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Ports du switch{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Switch {{ nom_switch }}</h2>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:edit-switch' id_switch %}"><i class="fa fa-edit"></i> Editer</a>
|
||||
<h2>{% trans "Switch:"%} {{ nom_switch }}</h2>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:edit-switch' id_switch %}"><i class="fa fa-edit"></i>{% trans " Edit" %}</a>
|
||||
{% can_create Port %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-port' id_switch %}"><i class="fa fa-plus"></i> Ajouter un port</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:create-ports' id_switch %}"><i class="fa fa-plus"></i> Ajouter des ports</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-port' id_switch %}"><i class="fa fa-plus"></i>{% trans " Add a port" %}</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:create-ports' id_switch %}"><i class="fa fa-plus"></i>{% trans " Add ports" %}</a>
|
||||
{% acl_end %}
|
||||
<hr>
|
||||
{% include "topologie/aff_repr_switch.html" with port_list=port_list %}
|
||||
|
@ -42,3 +43,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -25,33 +25,35 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Stacks{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Stacks</h2>
|
||||
<h2>{% trans "Stacks" %}</h2>
|
||||
{% can_create Stack %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-stack' %}">
|
||||
<i class="fa fa-plus"></i> Ajouter une stack
|
||||
<i class="fa fa-plus"></i>{% trans " Add a stack" %}
|
||||
</a>
|
||||
{% acl_end %}
|
||||
{% include "topologie/aff_stacks.html" with stack_list=stack_list %}
|
||||
|
||||
<h2>Baie de brassage</h2>
|
||||
<h2>{% trans "Switch bays" %}</h2>
|
||||
{% can_create SwitchBay %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-switch-bay' %}">
|
||||
<i class="fa fa-plus"></i> Ajouter une baie de brassage
|
||||
<i class="fa fa-plus"></i>{% trans " Add a switch bay" %}
|
||||
</a>
|
||||
<hr>
|
||||
{% acl_end %}
|
||||
{% include "topologie/aff_switch_bay.html" with switch_bay_list=switch_bay_list %}
|
||||
|
||||
<h2>Batiment</h2>
|
||||
<h2>{% trans "Buildings" %}</h2>
|
||||
{% can_create Building %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-building' %}">
|
||||
<i class="fa fa-plus"></i> Ajouter un bâtiment
|
||||
<i class="fa fa-plus"></i>{% trans " Add a building" %}
|
||||
</a>
|
||||
<hr>
|
||||
{% acl_end %}
|
||||
{% include "topologie/aff_building.html" with building_list=building_list %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Switchs{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
@ -41,3 +41,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<br />
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -25,13 +25,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load acl %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Chambres{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Chambres</h2>
|
||||
<h2>{% trans "Rooms" %}</h2>
|
||||
{% can_create Room %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-room' %}"><i class="fa fa-plus"></i> Ajouter une chambre</a>
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-room' %}"><i class="fa fa-plus"></i>{% trans " Add a room" %}</a>
|
||||
<hr>
|
||||
{% acl_end %}
|
||||
{% include "topologie/aff_chambres.html" with room_list=room_list %}
|
||||
|
@ -39,3 +40,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -23,30 +23,32 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
{% endcomment %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block sidebar %}
|
||||
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-room" %}">
|
||||
<i class="fa fa-home"></i>
|
||||
Chambres et locaux
|
||||
{% trans "Rooms and premises" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "topologie:index" %}">
|
||||
<i class="fa fa-microchip"></i>
|
||||
Switchs
|
||||
{% trans "Switches" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-port-profile" %}">
|
||||
<i class="fa fa-cogs"></i>
|
||||
Config des ports switchs
|
||||
{% trans "Port profiles" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-ap" %}">
|
||||
<i class="fa fa-wifi"></i>
|
||||
Bornes WiFi
|
||||
{% trans "Access points" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-physical-grouping" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Groupements physiques
|
||||
{% trans "Physical grouping" %}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-model-switch" %}">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
Modèles switches et constructeurs
|
||||
{% trans "Switch models and constructors" %}
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -25,8 +25,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load massive_bootstrap_form %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Création et modification d'un switch{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if topoform %}
|
||||
|
@ -35,16 +36,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
|
||||
|
||||
<a class="btn btn-primary" href="{% url "topologie:index-port" id_switch %}" role="button">{% bootstrap_icon "list" %} Aller à la liste des ports</a>
|
||||
<a class="btn btn-primary" href="{% url "topologie:index-port" id_switch %}" role="button">{% bootstrap_icon "list" %}{% trans " Go to the ports list" %}</a>
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% if topoform %}
|
||||
<h3>Réglage spécifiques du switch</h3>
|
||||
<h3>{% trans "Specific settings for the switch" %}</h3>
|
||||
{% massive_bootstrap_form topoform 'switch_interface' %}
|
||||
{% endif %}
|
||||
{% bootstrap_button "Créer" button_type="submit" icon="ok" %}
|
||||
{% trans "Create" as tr_create %}
|
||||
{% bootstrap_button tr_create button_type="submit" icon="ok" %}
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -25,14 +25,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load massive_bootstrap_form %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Modification de la topologie{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% bootstrap_form_errors topoform %}
|
||||
|
||||
{% if id_switch %}
|
||||
<a class="btn btn-primary" href="{% url "topologie:index-port" id_switch %}" role="button">{% bootstrap_icon "list" %} Aller à la liste des ports</a>
|
||||
<a class="btn btn-primary" href="{% url "topologie:index-port" id_switch %}" role="button">{% bootstrap_icon "list" %}{% trans " Go to the ports list" %}</a>
|
||||
{% endif %}
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
|
@ -43,3 +44,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -25,8 +25,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
{% load bootstrap3 %}
|
||||
{% load massive_bootstrap_form %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Création et modification d'un objet topologie{% endblock %}
|
||||
{% block title %}{% trans "Topology" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if topoform %}
|
||||
|
@ -44,20 +45,22 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
{% if topoform %}
|
||||
<h3>Réglage spécifiques du {{ device }}</h3>
|
||||
<h3>{% blocktrans %}Specific settings for the {{ device }} object{% endblocktrans %}</h3>
|
||||
{% massive_bootstrap_form topoform 'ipv4,machine' mbf_param=i_mbf_param%}
|
||||
{% endif %}
|
||||
{% if machineform %}
|
||||
<h3>Réglages généraux de la machine associée au {{ device }}</h3>
|
||||
<h3>{% blocktrans %}General settings for the machine linked to the {{ device }} object{% endblocktrans %}</h3>
|
||||
{% massive_bootstrap_form machineform 'user' %}
|
||||
{% endif %}
|
||||
{% if domainform %}
|
||||
<h3>Nom de la machine</h3>
|
||||
<h3>{% trans "DNS name" %}</h3>
|
||||
{% bootstrap_form domainform %}
|
||||
{% endif %}
|
||||
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="ok" %}
|
||||
{% trans "Create or edit" as tr_create_or_edit %}
|
||||
{% bootstrap_button tr_create_or_edit button_type="submit" icon="ok" %}
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -314,7 +314,7 @@ def new_port(request, switchid):
|
|||
try:
|
||||
switch = Switch.objects.get(pk=switchid)
|
||||
except Switch.DoesNotExist:
|
||||
messages.error(request, u"Switch inexistant")
|
||||
messages.error(request, _("Nonexistent switch."))
|
||||
return redirect(reverse('topologie:index'))
|
||||
port = AddPortForm(request.POST or None)
|
||||
if port.is_valid():
|
||||
|
@ -322,15 +322,15 @@ def new_port(request, switchid):
|
|||
port.switch = switch
|
||||
try:
|
||||
port.save()
|
||||
messages.success(request, "Port ajouté")
|
||||
messages.success(request, _("The port was added."))
|
||||
except IntegrityError:
|
||||
messages.error(request, "Ce port existe déjà")
|
||||
messages.error(request, _("The port already exists."))
|
||||
return redirect(reverse(
|
||||
'topologie:index-port',
|
||||
kwargs={'switchid': switchid}
|
||||
))
|
||||
return form(
|
||||
{'id_switch': switchid, 'topoform': port, 'action_name': 'Ajouter'},
|
||||
{'id_switch': switchid, 'topoform': port, 'action_name': _("Add")},
|
||||
'topologie/topo.html',
|
||||
request)
|
||||
|
||||
|
@ -345,7 +345,7 @@ def edit_port(request, port_object, **_kwargs):
|
|||
if port.is_valid():
|
||||
if port.changed_data:
|
||||
port.save()
|
||||
messages.success(request, "Le port a bien été modifié")
|
||||
messages.success(request, _("The port was edited."))
|
||||
return redirect(reverse(
|
||||
'topologie:index-port',
|
||||
kwargs={'switchid': str(port_object.switch.id)}
|
||||
|
@ -354,7 +354,7 @@ def edit_port(request, port_object, **_kwargs):
|
|||
{
|
||||
'id_switch': str(port_object.switch.id),
|
||||
'topoform': port,
|
||||
'action_name': 'Editer'
|
||||
'action_name': _("Edit")
|
||||
},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
|
@ -368,12 +368,12 @@ def del_port(request, port, **_kwargs):
|
|||
if request.method == "POST":
|
||||
try:
|
||||
port.delete()
|
||||
messages.success(request, "Le port a été détruit")
|
||||
messages.success(request, _("The port was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Le port %s est affecté à un autre objet, impossible "
|
||||
"de le supprimer" % port)
|
||||
(_("The port %s is used by another object, impossible to"
|
||||
" delete it.") % port)
|
||||
)
|
||||
return redirect(reverse(
|
||||
'topologie:index-port',
|
||||
|
@ -389,10 +389,10 @@ def new_stack(request):
|
|||
stack = StackForm(request.POST or None)
|
||||
if stack.is_valid():
|
||||
stack.save()
|
||||
messages.success(request, "Stack crée")
|
||||
messages.success(request, _("The stack was created."))
|
||||
return redirect(reverse('topologie:index-physical-grouping'))
|
||||
return form(
|
||||
{'topoform': stack, 'action_name': 'Créer'},
|
||||
{'topoform': stack, 'action_name': _("Create")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -408,7 +408,7 @@ def edit_stack(request, stack, **_kwargs):
|
|||
stack.save()
|
||||
return redirect(reverse('topologie:index-physical-grouping'))
|
||||
return form(
|
||||
{'topoform': stack, 'action_name': 'Editer'},
|
||||
{'topoform': stack, 'action_name': _("Edit")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -421,12 +421,12 @@ def del_stack(request, stack, **_kwargs):
|
|||
if request.method == "POST":
|
||||
try:
|
||||
stack.delete()
|
||||
messages.success(request, "La stack a eté détruite")
|
||||
messages.success(request, _("The stack was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("La stack %s est affectée à un autre objet, impossible "
|
||||
"de la supprimer" % stack)
|
||||
(_("The stack %s is used by another object, impossible to"
|
||||
" deleted it.") % stack)
|
||||
)
|
||||
return redirect(reverse('topologie:index-physical-grouping'))
|
||||
return form({'objet': stack}, 'topologie/delete.html', request)
|
||||
|
@ -467,8 +467,8 @@ def new_switch(request):
|
|||
if not user:
|
||||
messages.error(
|
||||
request,
|
||||
("L'user association n'existe pas encore, veuillez le "
|
||||
"créer ou le linker dans preferences")
|
||||
(_("The organisation's user doesn't exist yet, please create"
|
||||
" or link it in the preferences."))
|
||||
)
|
||||
return redirect(reverse('topologie:index'))
|
||||
new_switch_obj = switch.save(commit=False)
|
||||
|
@ -482,7 +482,7 @@ def new_switch(request):
|
|||
new_interface_obj.save()
|
||||
new_domain_obj.interface_parent = new_interface_obj
|
||||
new_domain_obj.save()
|
||||
messages.success(request, "Le switch a été créé")
|
||||
messages.success(request, _("The switch was created."))
|
||||
return redirect(reverse('topologie:index'))
|
||||
i_mbf_param = generate_ipv4_mbf_param(interface, False)
|
||||
return form(
|
||||
|
@ -505,7 +505,7 @@ def create_ports(request, switchid):
|
|||
try:
|
||||
switch = Switch.objects.get(pk=switchid)
|
||||
except Switch.DoesNotExist:
|
||||
messages.error(request, u"Switch inexistant")
|
||||
messages.error(request, _("Nonexistent switch"))
|
||||
return redirect(reverse('topologie:index'))
|
||||
|
||||
s_begin = s_end = 0
|
||||
|
@ -525,7 +525,7 @@ def create_ports(request, switchid):
|
|||
end = port_form.cleaned_data['end']
|
||||
try:
|
||||
switch.create_ports(begin, end)
|
||||
messages.success(request, "Ports créés.")
|
||||
messages.success(request, _("The ports were created."))
|
||||
except ValidationError as e:
|
||||
messages.error(request, ''.join(e))
|
||||
return redirect(reverse(
|
||||
|
@ -569,7 +569,7 @@ def edit_switch(request, switch, switchid):
|
|||
new_interface_obj.save()
|
||||
if domain_form.changed_data:
|
||||
new_domain_obj.save()
|
||||
messages.success(request, "Le switch a bien été modifié")
|
||||
messages.success(request, _("The switch was edited."))
|
||||
return redirect(reverse('topologie:index'))
|
||||
i_mbf_param = generate_ipv4_mbf_param(interface_form, False)
|
||||
return form(
|
||||
|
@ -608,8 +608,8 @@ def new_ap(request):
|
|||
if not user:
|
||||
messages.error(
|
||||
request,
|
||||
("L'user association n'existe pas encore, veuillez le "
|
||||
"créer ou le linker dans preferences")
|
||||
(_("The organisation's user doesn't exist yet, please create"
|
||||
" or link it in the preferences."))
|
||||
)
|
||||
return redirect(reverse('topologie:index'))
|
||||
new_ap_obj = ap.save(commit=False)
|
||||
|
@ -623,7 +623,7 @@ def new_ap(request):
|
|||
new_interface_obj.save()
|
||||
new_domain_obj.interface_parent = new_interface_obj
|
||||
new_domain_obj.save()
|
||||
messages.success(request, "La borne a été créé")
|
||||
messages.success(request, _("The access point was created."))
|
||||
return redirect(reverse('topologie:index-ap'))
|
||||
i_mbf_param = generate_ipv4_mbf_param(interface, False)
|
||||
return form(
|
||||
|
@ -663,8 +663,8 @@ def edit_ap(request, ap, **_kwargs):
|
|||
if not user:
|
||||
messages.error(
|
||||
request,
|
||||
("L'user association n'existe pas encore, veuillez le "
|
||||
"créer ou le linker dans preferences")
|
||||
(_("The organisation's user doesn't exist yet, please create"
|
||||
" or link it in the preferences."))
|
||||
)
|
||||
return redirect(reverse('topologie:index-ap'))
|
||||
new_ap_obj = ap_form.save(commit=False)
|
||||
|
@ -676,7 +676,7 @@ def edit_ap(request, ap, **_kwargs):
|
|||
new_interface_obj.save()
|
||||
if domain_form.changed_data:
|
||||
new_domain_obj.save()
|
||||
messages.success(request, "La borne a été modifiée")
|
||||
messages.success(request, _("The access point was edited."))
|
||||
return redirect(reverse('topologie:index-ap'))
|
||||
i_mbf_param = generate_ipv4_mbf_param(interface_form, False)
|
||||
return form(
|
||||
|
@ -699,10 +699,10 @@ def new_room(request):
|
|||
room = EditRoomForm(request.POST or None)
|
||||
if room.is_valid():
|
||||
room.save()
|
||||
messages.success(request, "La chambre a été créé")
|
||||
messages.success(request, _("The room was created."))
|
||||
return redirect(reverse('topologie:index-room'))
|
||||
return form(
|
||||
{'topoform': room, 'action_name': 'Ajouter'},
|
||||
{'topoform': room, 'action_name': _("Add")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -716,10 +716,10 @@ def edit_room(request, room, **_kwargs):
|
|||
if room.is_valid():
|
||||
if room.changed_data:
|
||||
room.save()
|
||||
messages.success(request, "La chambre a bien été modifiée")
|
||||
messages.success(request, _("The room was edited."))
|
||||
return redirect(reverse('topologie:index-room'))
|
||||
return form(
|
||||
{'topoform': room, 'action_name': 'Editer'},
|
||||
{'topoform': room, 'action_name': _("Edit")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -732,16 +732,16 @@ def del_room(request, room, **_kwargs):
|
|||
if request.method == "POST":
|
||||
try:
|
||||
room.delete()
|
||||
messages.success(request, "La chambre/prise a été détruite")
|
||||
messages.success(request, _("The room was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("La chambre %s est affectée à un autre objet, impossible "
|
||||
"de la supprimer (switch ou user)" % room)
|
||||
(_("The room %s is used by another object, impossible to"
|
||||
" deleted it.") % room)
|
||||
)
|
||||
return redirect(reverse('topologie:index-room'))
|
||||
return form(
|
||||
{'objet': room, 'objet_name': 'Chambre'},
|
||||
{'objet': room, 'objet_name': _("Room")},
|
||||
'topologie/delete.html',
|
||||
request
|
||||
)
|
||||
|
@ -754,10 +754,10 @@ def new_model_switch(request):
|
|||
model_switch = EditModelSwitchForm(request.POST or None)
|
||||
if model_switch.is_valid():
|
||||
model_switch.save()
|
||||
messages.success(request, "Le modèle a été créé")
|
||||
messages.success(request, _("The swich model was created."))
|
||||
return redirect(reverse('topologie:index-model-switch'))
|
||||
return form(
|
||||
{'topoform': model_switch, 'action_name': 'Ajouter'},
|
||||
{'topoform': model_switch, 'action_name': _("Add")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -775,10 +775,10 @@ def edit_model_switch(request, model_switch, **_kwargs):
|
|||
if model_switch.is_valid():
|
||||
if model_switch.changed_data:
|
||||
model_switch.save()
|
||||
messages.success(request, "Le modèle a bien été modifié")
|
||||
messages.success(request, _("The switch model was edited."))
|
||||
return redirect(reverse('topologie:index-model-switch'))
|
||||
return form(
|
||||
{'topoform': model_switch, 'action_name': 'Editer'},
|
||||
{'topoform': model_switch, 'action_name': _("Edit")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -791,16 +791,16 @@ def del_model_switch(request, model_switch, **_kwargs):
|
|||
if request.method == "POST":
|
||||
try:
|
||||
model_switch.delete()
|
||||
messages.success(request, "Le modèle a été détruit")
|
||||
messages.success(request, _("The switch model was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Le modèle %s est affectée à un autre objet, impossible "
|
||||
"de la supprimer (switch ou user)" % model_switch)
|
||||
(_("The switch model %s is used by another object,"
|
||||
" impossible to delete it.") % model_switch)
|
||||
)
|
||||
return redirect(reverse('topologie:index-model-switch'))
|
||||
return form(
|
||||
{'objet': model_switch, 'objet_name': 'Modèle de switch'},
|
||||
{'objet': model_switch, 'objet_name': _("Switch model")},
|
||||
'topologie/delete.html',
|
||||
request
|
||||
)
|
||||
|
@ -813,10 +813,10 @@ def new_switch_bay(request):
|
|||
switch_bay = EditSwitchBayForm(request.POST or None)
|
||||
if switch_bay.is_valid():
|
||||
switch_bay.save()
|
||||
messages.success(request, "La baie a été créé")
|
||||
messages.success(request, _("The switch bay was created."))
|
||||
return redirect(reverse('topologie:index-physical-grouping'))
|
||||
return form(
|
||||
{'topoform': switch_bay, 'action_name': 'Ajouter'},
|
||||
{'topoform': switch_bay, 'action_name': _("Add")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -830,10 +830,10 @@ def edit_switch_bay(request, switch_bay, **_kwargs):
|
|||
if switch_bay.is_valid():
|
||||
if switch_bay.changed_data:
|
||||
switch_bay.save()
|
||||
messages.success(request, "Le switch a bien été modifié")
|
||||
messages.success(request, _("The switch bay was edited."))
|
||||
return redirect(reverse('topologie:index-physical-grouping'))
|
||||
return form(
|
||||
{'topoform': switch_bay, 'action_name': 'Editer'},
|
||||
{'topoform': switch_bay, 'action_name': _("Edit")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -846,16 +846,16 @@ def del_switch_bay(request, switch_bay, **_kwargs):
|
|||
if request.method == "POST":
|
||||
try:
|
||||
switch_bay.delete()
|
||||
messages.success(request, "La baie a été détruite")
|
||||
messages.success(request, _("The switch bay was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("La baie %s est affecté à un autre objet, impossible "
|
||||
"de la supprimer (switch ou user)" % switch_bay)
|
||||
(_("The switch bay %s is used by another object,"
|
||||
" impossible to delete it.") % switch_bay)
|
||||
)
|
||||
return redirect(reverse('topologie:index-physical-grouping'))
|
||||
return form(
|
||||
{'objet': switch_bay, 'objet_name': 'Baie de switch'},
|
||||
{'objet': switch_bay, 'objet_name': _("Switch bay")},
|
||||
'topologie/delete.html',
|
||||
request
|
||||
)
|
||||
|
@ -868,10 +868,10 @@ def new_building(request):
|
|||
building = EditBuildingForm(request.POST or None)
|
||||
if building.is_valid():
|
||||
building.save()
|
||||
messages.success(request, "Le batiment a été créé")
|
||||
messages.success(request, _("The building was created."))
|
||||
return redirect(reverse('topologie:index-physical-grouping'))
|
||||
return form(
|
||||
{'topoform': building, 'action_name': 'Ajouter'},
|
||||
{'topoform': building, 'action_name': _("Add")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -885,10 +885,10 @@ def edit_building(request, building, **_kwargs):
|
|||
if building.is_valid():
|
||||
if building.changed_data:
|
||||
building.save()
|
||||
messages.success(request, "Le batiment a bien été modifié")
|
||||
messages.success(request, _("The building was edited."))
|
||||
return redirect(reverse('topologie:index-physical-grouping'))
|
||||
return form(
|
||||
{'topoform': building, 'action_name': 'Editer'},
|
||||
{'topoform': building, 'action_name': _("Edit")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -901,16 +901,16 @@ def del_building(request, building, **_kwargs):
|
|||
if request.method == "POST":
|
||||
try:
|
||||
building.delete()
|
||||
messages.success(request, "La batiment a été détruit")
|
||||
messages.success(request, _("The building was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Le batiment %s est affecté à un autre objet, impossible "
|
||||
"de la supprimer (switch ou user)" % building)
|
||||
(_("The building %s is used by another object, impossible"
|
||||
" to delete it.") % building)
|
||||
)
|
||||
return redirect(reverse('topologie:index-physical-grouping'))
|
||||
return form(
|
||||
{'objet': building, 'objet_name': 'Bâtiment'},
|
||||
{'objet': building, 'objet_name': _("Building")},
|
||||
'topologie/delete.html',
|
||||
request
|
||||
)
|
||||
|
@ -923,10 +923,10 @@ def new_constructor_switch(request):
|
|||
constructor_switch = EditConstructorSwitchForm(request.POST or None)
|
||||
if constructor_switch.is_valid():
|
||||
constructor_switch.save()
|
||||
messages.success(request, "Le constructeur a été créé")
|
||||
messages.success(request, _("The switch constructor was created."))
|
||||
return redirect(reverse('topologie:index-model-switch'))
|
||||
return form(
|
||||
{'topoform': constructor_switch, 'action_name': 'Ajouter'},
|
||||
{'topoform': constructor_switch, 'action_name': _("Add")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -944,10 +944,10 @@ def edit_constructor_switch(request, constructor_switch, **_kwargs):
|
|||
if constructor_switch.is_valid():
|
||||
if constructor_switch.changed_data:
|
||||
constructor_switch.save()
|
||||
messages.success(request, "Le modèle a bien été modifié")
|
||||
messages.success(request, _("The switch constructor was edited."))
|
||||
return redirect(reverse('topologie:index-model-switch'))
|
||||
return form(
|
||||
{'topoform': constructor_switch, 'action_name': 'Editer'},
|
||||
{'topoform': constructor_switch, 'action_name': _("Edit")},
|
||||
'topologie/topo.html',
|
||||
request
|
||||
)
|
||||
|
@ -960,17 +960,17 @@ def del_constructor_switch(request, constructor_switch, **_kwargs):
|
|||
if request.method == "POST":
|
||||
try:
|
||||
constructor_switch.delete()
|
||||
messages.success(request, "Le constructeur a été détruit")
|
||||
messages.success(request, _("The switch constructor was deleted."))
|
||||
except ProtectedError:
|
||||
messages.error(
|
||||
request,
|
||||
("Le constructeur %s est affecté à un autre objet, impossible "
|
||||
"de la supprimer (switch ou user)" % constructor_switch)
|
||||
(_("The switch constructor %s is used by another object,"
|
||||
" impossible to delete it.") % constructor_switch)
|
||||
)
|
||||
return redirect(reverse('topologie:index-model-switch'))
|
||||
return form({
|
||||
'objet': constructor_switch,
|
||||
'objet_name': 'Constructeur de switch'
|
||||
'objet_name': _("Switch constructor")
|
||||
}, 'topologie/delete.html', request)
|
||||
|
||||
|
||||
|
@ -981,7 +981,7 @@ def new_port_profile(request):
|
|||
port_profile = EditPortProfileForm(request.POST or None)
|
||||
if port_profile.is_valid():
|
||||
port_profile.save()
|
||||
messages.success(request, _("Port profile created"))
|
||||
messages.success(request, _("The port profile was created."))
|
||||
return redirect(reverse('topologie:index'))
|
||||
return form(
|
||||
{'topoform': port_profile, 'action_name': _("Create")},
|
||||
|
@ -999,7 +999,7 @@ def edit_port_profile(request, port_profile, **_kwargs):
|
|||
if port_profile.is_valid():
|
||||
if port_profile.changed_data:
|
||||
port_profile.save()
|
||||
messages.success(request, _("Port profile modified"))
|
||||
messages.success(request, _("The port profile was edited."))
|
||||
return redirect(reverse('topologie:index'))
|
||||
return form(
|
||||
{'topoform': port_profile, 'action_name': _("Edit")},
|
||||
|
@ -1016,10 +1016,10 @@ def del_port_profile(request, port_profile, **_kwargs):
|
|||
try:
|
||||
port_profile.delete()
|
||||
messages.success(request,
|
||||
_("The port profile was successfully deleted"))
|
||||
_("The port profile was deleted."))
|
||||
except ProtectedError:
|
||||
messages.success(request,
|
||||
_("Impossible to delete the port profile"))
|
||||
_("Impossible to delete the port profile."))
|
||||
return redirect(reverse('topologie:index'))
|
||||
return form(
|
||||
{'objet': port_profile, 'objet_name': _("Port profile")},
|
||||
|
@ -1139,9 +1139,8 @@ def generate_dot(data, template):
|
|||
t = loader.get_template(template)
|
||||
if not isinstance(t, Template) and \
|
||||
not (hasattr(t, 'template') and isinstance(t.template, Template)):
|
||||
raise Exception("Le template par défaut de Django n'est pas utilisé."
|
||||
"Cela peut mener à des erreurs de rendu."
|
||||
"Vérifiez les paramètres")
|
||||
raise Exception(_("The default Django template isn't used. This can"
|
||||
" lead to rendering errors. Check the parameters."))
|
||||
c = Context(data).flatten()
|
||||
dot = t.render(c)
|
||||
return(dot)
|
||||
|
@ -1183,3 +1182,4 @@ def recursive_switchs(switch_start, switch_before, detected):
|
|||
if link:
|
||||
links_return.append(link)
|
||||
return (links_return, detected)
|
||||
|
||||
|
|
Loading…
Reference in a new issue