2020-11-23 16:06:37 +00:00
|
|
|
# Re2o est un logiciel d'administration développé initiallement au Rézo Metz. Il
|
2017-01-15 23:01:18 +00:00
|
|
|
# se veut agnostique au réseau considéré, de manière à être installable en
|
|
|
|
# quelques clics.
|
|
|
|
#
|
|
|
|
# Copyright © 2017 Gabriel Détraz
|
2019-09-29 14:02:28 +00:00
|
|
|
# Copyright © 2017 Lara Kermarec
|
2017-01-15 23:01:18 +00:00
|
|
|
# Copyright © 2017 Augustin Lemesle
|
|
|
|
#
|
|
|
|
# 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.
|
2020-05-30 09:38:02 +00:00
|
|
|
"""topologie.urls
|
|
|
|
The defined URLs for topologie app. Included in re2o.urls.
|
2017-10-13 23:43:01 +00:00
|
|
|
"""
|
2017-01-15 23:01:18 +00:00
|
|
|
|
2017-09-10 23:29:24 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2021-02-09 12:01:42 +00:00
|
|
|
from django.urls import path
|
2016-07-06 19:50:15 +00:00
|
|
|
|
2021-02-10 10:06:09 +00:00
|
|
|
from . import views, views_autocomplete
|
2016-07-06 19:50:15 +00:00
|
|
|
|
2021-02-09 12:01:42 +00:00
|
|
|
app_name = "topologie"
|
|
|
|
|
2016-07-06 19:50:15 +00:00
|
|
|
urlpatterns = [
|
2021-02-09 12:01:42 +00:00
|
|
|
path("", views.index, name="index"),
|
|
|
|
path("index_ap", views.index_ap, name="index-ap"),
|
|
|
|
path("new_ap", views.new_ap, name="new-ap"),
|
|
|
|
path("edit_ap/<int:accesspointid>", views.edit_ap, name="edit-ap"),
|
2021-02-10 10:06:09 +00:00
|
|
|
path("create_ports/<int:switchid>", views.create_ports, name="create-ports"),
|
2021-02-09 12:01:42 +00:00
|
|
|
path("index_room", views.index_room, name="index-room"),
|
|
|
|
path("new_room", views.new_room, name="new-room"),
|
|
|
|
path("edit_room/<int:roomid>", views.edit_room, name="edit-room"),
|
|
|
|
path("del_room/<int:roomid>", views.del_room, name="del-room"),
|
|
|
|
path("new_switch", views.new_switch, name="new-switch"),
|
|
|
|
path("switch/<int:switchid>", views.index_port, name="index-port"),
|
|
|
|
path("edit_port/<int:portid>", views.edit_port, name="edit-port"),
|
|
|
|
path("new_port/<int:switchid>", views.new_port, name="new-port"),
|
|
|
|
path("del_port/<int:portid>", views.del_port, name="del-port"),
|
|
|
|
path("edit_switch/<int:switchid>", views.edit_switch, name="edit-switch"),
|
|
|
|
path("new_stack", views.new_stack, name="new-stack"),
|
|
|
|
path(
|
|
|
|
"index_stack",
|
2020-11-15 19:41:23 +00:00
|
|
|
views.index_stack,
|
|
|
|
name="index-stack",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"index_switch_bay",
|
2020-11-15 19:41:23 +00:00
|
|
|
views.index_switch_bay,
|
|
|
|
name="index-switch-bay",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"index_building",
|
2020-11-15 19:41:23 +00:00
|
|
|
views.index_building,
|
|
|
|
name="index-building",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"index_dormitory",
|
2020-11-15 19:41:23 +00:00
|
|
|
views.index_dormitory,
|
|
|
|
name="index-dormitory",
|
2019-11-04 16:55:03 +00:00
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path("edit_stack/<int:stackid>", views.edit_stack, name="edit-stack"),
|
|
|
|
path("del_stack/<int:stackid>", views.del_stack, name="del-stack"),
|
|
|
|
path("index_model_switch", views.index_model_switch, name="index-model-switch"),
|
|
|
|
path("index_model_switch", views.index_model_switch, name="index-model-switch"),
|
|
|
|
path("new_model_switch", views.new_model_switch, name="new-model-switch"),
|
|
|
|
path(
|
|
|
|
"edit_model_switch/<int:modelswitchid>",
|
2017-10-26 03:07:11 +00:00
|
|
|
views.edit_model_switch,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="edit-model-switch",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"del_model_switch/<int:modelswitchid>",
|
2017-10-26 03:07:11 +00:00
|
|
|
views.del_model_switch,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="del-model-switch",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"new_constructor_switch",
|
2017-10-26 03:07:11 +00:00
|
|
|
views.new_constructor_switch,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="new-constructor-switch",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"edit_constructor_switch/<int:constructorswitchid>",
|
2017-10-26 03:07:11 +00:00
|
|
|
views.edit_constructor_switch,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="edit-constructor-switch",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"del_constructor_switch/<int:constructorswitchid>",
|
2017-10-26 03:07:11 +00:00
|
|
|
views.del_constructor_switch,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="del-constructor-switch",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path("new_switch_bay", views.new_switch_bay, name="new-switch-bay"),
|
|
|
|
path(
|
|
|
|
"edit_switch_bay/<int:switchbayid>",
|
2018-04-07 18:45:29 +00:00
|
|
|
views.edit_switch_bay,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="edit-switch-bay",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"del_switch_bay/<int:switchbayid>",
|
2018-04-07 18:45:29 +00:00
|
|
|
views.del_switch_bay,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="del-switch-bay",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path("new_building", views.new_building, name="new-building"),
|
|
|
|
path(
|
|
|
|
"edit_building/<int:buildingid>",
|
2018-04-08 02:01:32 +00:00
|
|
|
views.edit_building,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="edit-building",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"del_building/<int:buildingid>",
|
2018-04-08 02:01:32 +00:00
|
|
|
views.del_building,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="del-building",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path("new_dormitory", views.new_dormitory, name="new-dormitory"),
|
|
|
|
path(
|
|
|
|
"edit_dormitory/<int:dormitoryid>",
|
2019-02-18 20:11:51 +00:00
|
|
|
views.edit_dormitory,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="edit-dormitory",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"del_dormitory/<int:dormitoryid>",
|
2019-02-18 20:11:51 +00:00
|
|
|
views.del_dormitory,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="del-dormitory",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path("index_port_profile", views.index_port_profile, name="index-port-profile"),
|
|
|
|
path("new_port_profile", views.new_port_profile, name="new-port-profile"),
|
|
|
|
path(
|
|
|
|
"edit_port_profile/<int:portprofileid>",
|
2018-05-26 22:36:25 +00:00
|
|
|
views.edit_port_profile,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="edit-port-profile",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"del_port_profile/<int:portprofileid>",
|
2018-05-26 22:36:25 +00:00
|
|
|
views.del_port_profile,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="del-port-profile",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"edit_vlanoptions/<int:vlanid>",
|
2018-07-08 02:08:01 +00:00
|
|
|
views.edit_vlanoptions,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="edit-vlanoptions",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path("add_module", views.add_module, name="add-module"),
|
|
|
|
path(
|
|
|
|
"edit_module/<int:moduleswitchid>",
|
2018-12-30 16:04:21 +00:00
|
|
|
views.edit_module,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="edit-module",
|
|
|
|
),
|
2021-02-10 10:06:09 +00:00
|
|
|
path("del_module/<int:moduleswitchid>", views.del_module, name="del-module"),
|
2021-02-09 12:01:42 +00:00
|
|
|
path("index_module", views.index_module, name="index-module"),
|
|
|
|
path("add_module_on", views.add_module_on, name="add-module-on"),
|
|
|
|
path(
|
|
|
|
"edit_module_on/<int:moduleonswitchid>",
|
2018-12-30 17:20:06 +00:00
|
|
|
views.edit_module_on,
|
2019-11-04 16:55:03 +00:00
|
|
|
name="edit-module-on",
|
|
|
|
),
|
2021-02-09 12:01:42 +00:00
|
|
|
path(
|
|
|
|
"del_module_on/<int:moduleonswitchid>",
|
2019-11-04 16:55:03 +00:00
|
|
|
views.del_module_on,
|
|
|
|
name="del-module-on",
|
|
|
|
),
|
2020-12-28 12:20:46 +00:00
|
|
|
### Autocomplete Views
|
2021-02-10 10:06:09 +00:00
|
|
|
path(
|
|
|
|
"room-autocomplete",
|
|
|
|
views_autocomplete.RoomAutocomplete.as_view(),
|
|
|
|
name="room-autocomplete",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"building-autocomplete",
|
|
|
|
views_autocomplete.BuildingAutocomplete.as_view(),
|
|
|
|
name="building-autocomplete",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"dormitory-autocomplete",
|
|
|
|
views_autocomplete.DormitoryAutocomplete.as_view(),
|
|
|
|
name="dormitory-autocomplete",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"switch-autocomplete",
|
|
|
|
views_autocomplete.SwitchAutocomplete.as_view(),
|
|
|
|
name="switch-autocomplete",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"port-autocomplete",
|
|
|
|
views_autocomplete.PortAutocomplete.as_view(),
|
|
|
|
name="profile-autocomplete",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"portprofile-autocomplete",
|
|
|
|
views_autocomplete.PortProfileAutocomplete.as_view(),
|
|
|
|
name="portprofile-autocomplete",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"switchbay-autocomplete",
|
|
|
|
views_autocomplete.SwitchBayAutocomplete.as_view(),
|
|
|
|
name="switchbay-autocomplete",
|
|
|
|
),
|
2018-12-30 16:04:21 +00:00
|
|
|
]
|