diff --git a/computes/urls.py b/computes/urls.py index fa77f79..55013e1 100644 --- a/computes/urls.py +++ b/computes/urls.py @@ -1,6 +1,4 @@ -from secrets.views import secrets - -from django.urls import path +from django.urls import path, include from . import views from create.views import create_instance, create_instance_select_type @@ -8,6 +6,7 @@ from instances.views import instances from interfaces.views import interface, interfaces from networks.views import network, networks from nwfilters.views import nwfilter, nwfilters +from secrets.views import secrets from storages.views import get_volumes, storage, storages from . import forms @@ -17,30 +16,24 @@ urlpatterns = [ path('add_ssh_host/', views.add_host, {'FormClass': forms.SshComputeForm}, name='add_ssh_host'), path('add_tls_host/', views.add_host, {'FormClass': forms.TlsComputeForm}, name='add_tls_host'), path('add_socket_host/', views.add_host, {'FormClass': forms.SocketComputeForm}, name='add_socket_host'), - path('/', views.overview, name='overview'), - path('/statistics/', views.compute_graph, name='compute_graph'), - path('/instances/', instances, name='instances'), - path('/storages/', storages, name='storages'), - path('/storage//volumes/', get_volumes, name='volumes'), - path('/storage//', storage, name='storage'), - path('/networks/', networks, name='networks'), - path('/network//', network, name='network'), - path('/interfaces/', interfaces, name='interfaces'), - path('/interface//', interface, name='interface'), - path('/nwfilters/', nwfilters, name='nwfilters'), - path('/nwfilter//', nwfilter, name='nwfilter'), - path('/secrets/', secrets, name='secrets'), - path('/create/', create_instance_select_type, name='create_instance_select_type'), - path('/create/archs//machines//', create_instance, name='create_instance'), - path('/archs//machines/', views.get_compute_machine_types, name='machines'), - path( - '/archs//machines//disks//buses/', - views.get_compute_disk_buses, - name='buses', - ), - path( - '/archs//machines//capabilities/', - views.get_dom_capabilities, - name='domcaps', - ), + path('/', include([ + path('', views.overview, name='overview'), + path('statistics', views.compute_graph, name='compute_graph'), + path('instances/', instances, name='instances'), + path('storages/', storages, name='storages'), + path('storage//volumes', get_volumes, name='volumes'), + path('storage//', storage, name='storage'), + path('networks/', networks, name='networks'), + path('network//', network, name='network'), + path('interfaces/', interfaces, name='interfaces'), + path('interface//', interface, name='interface'), + path('nwfilters/', nwfilters, name='nwfilters'), + path('nwfilter//', nwfilter, name='nwfilter'), + path('secrets/', secrets, name='secrets'), + path('create/', create_instance_select_type, name='create_instance_select_type'), + path('create/archs//machines/', create_instance, name='create_instance'), + path('archs//machines', views.get_compute_machine_types, name='machines'), + path('archs//machines//disks//buses', views.get_compute_disk_buses, name='buses'), + path('archs//machines//capabilities', views.get_dom_capabilities, name='domcaps'), + ])), ] diff --git a/instances/urls.py b/instances/urls.py index 32922a2..f0c8618 100644 --- a/instances/urls.py +++ b/instances/urls.py @@ -1,14 +1,14 @@ -from django.urls import path, re_path +from django.urls import path from . import views urlpatterns = [ path('', views.allinstances, name='allinstances'), - re_path(r'^(?P[0-9]+)/(?P[\w\-\.]+)/$', views.instance, name='instance'), - re_path(r'^statistics/(?P[0-9]+)/(?P[\w\-\.]+)/$', views.inst_graph, name='inst_graph'), - re_path(r'^status/(?P[0-9]+)/(?P[\w\-\.]+)/$', views.inst_status, name='inst_status'), - re_path(r'^guess_mac_address/(?P[\w\-\.]+)/$', views.guess_mac_address, name='guess_mac_address'), - re_path(r'^guess_clone_name/$', views.guess_clone_name, name='guess_clone_name'), - re_path(r'^random_mac_address/$', views.random_mac_address, name='random_mac_address'), - re_path(r'^check_instance/(?P[\w\-\.]+)/$', views.check_instance, name='check_instance'), - re_path(r'^sshkeys/(?P[\w\-\.]+)/$', views.sshkeys, name='sshkeys'), + path('//', views.instance, name='instance'), + path('statistics///', views.inst_graph, name='inst_graph'), + path('status///', views.inst_status, name='inst_status'), + path('guess_mac_address//', views.guess_mac_address, name='guess_mac_address'), + path('guess_clone_name/', views.guess_clone_name, name='guess_clone_name'), + path('random_mac_address/', views.random_mac_address, name='random_mac_address'), + path('check_instance//', views.check_instance, name='check_instance'), + path('sshkeys//', views.sshkeys, name='sshkeys'), ] diff --git a/logs/urls.py b/logs/urls.py index a8a5ae8..41618ae 100644 --- a/logs/urls.py +++ b/logs/urls.py @@ -1,6 +1,6 @@ -from django.urls import path, re_path +from django.urls import path from . import views urlpatterns = [ - re_path(r'^vm_logs/(?P[\w\-\.]+)/$', views.vm_logs, name='vm_logs'), + path('vm_logs//', views.vm_logs, name='vm_logs'), ]