mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
convert urls to new path format
This commit is contained in:
parent
e8d4f0d2e1
commit
20df0f4b5b
6 changed files with 40 additions and 42 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from django.urls import path, re_path
|
||||
from django.urls import path
|
||||
from django.contrib.auth import views as auth_views
|
||||
from . import views
|
||||
|
||||
|
|
@ -6,5 +6,5 @@ urlpatterns = [
|
|||
path('login/', auth_views.LoginView.as_view(template_name='login.html'), name='login'),
|
||||
path('logout/', auth_views.LogoutView.as_view(template_name='logout.html'), name='logout'),
|
||||
path('profile/', views.profile, name='profile'), path('', views.accounts, name='accounts'),
|
||||
re_path(r'^profile/(?P<user_id>[0-9]+)/$', views.account, name='account'),
|
||||
path('profile/<int:user_id>/', views.account, name='account'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from django.urls import path, re_path
|
||||
from django.urls import path, include
|
||||
from storages.views import storages, storage, get_volumes
|
||||
from networks.views import networks, network
|
||||
from secrets.views import secrets
|
||||
|
|
@ -10,23 +10,24 @@ from nwfilters.views import nwfilter, nwfilters
|
|||
|
||||
urlpatterns = [
|
||||
path('', computes, name='computes'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/$', overview, name='overview'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/statistics$', compute_graph, name='compute_graph'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/instances/$', instances, name='instances'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/storages/$', storages, name='storages'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/storage/(?P<pool>[\w\-\.\/]+)/volumes$', get_volumes, name='volumes'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/storage/(?P<pool>[\w\-\.\/]+)/$', storage, name='storage'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/networks/$', networks, name='networks'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/network/(?P<pool>[\w\-\.]+)/$', network, name='network'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/interfaces/$', interfaces, name='interfaces'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/interface/(?P<iface>[\w\-\.\:]+)/$', interface, name='interface'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/nwfilters/$', nwfilters, name='nwfilters'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/nwfilter/(?P<nwfltr>[\w\-\.\:]+)/$', nwfilter, name='nwfilter'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/secrets/$', secrets, name='secrets'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/create/$', create_instance_select_type, name='create_instance_select_type'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/create/archs/(?P<arch>[\w\-\.\/]+)/machines/(?P<machine>[\w\-\.\/]+)$', create_instance, name='create_instance'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/archs/(?P<arch>[\w\-\.\/]+)/machines$', get_compute_machine_types, name='machines'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/archs/(?P<arch>[\w\-\.\/]+)/machines/(?P<machine>[\w\-\.\/]+)/disks/(?P<disk>[\w\-\.\/]+)/buses$', get_compute_disk_buses, name='buses'),
|
||||
re_path(r'^(?P<compute_id>[0-9]+)/archs/(?P<arch>[\w\-\.\/]+)/machines/(?P<machine>[\w\-\.\/]+)/capabilities$', get_dom_capabilities, name='domcaps'),
|
||||
path('<int:compute_id>/', include([
|
||||
path('', overview, name='overview'),
|
||||
path('statistics', compute_graph, name='compute_graph'),
|
||||
path('instances/', instances, name='instances'),
|
||||
path('storages/', storages, name='storages'),
|
||||
path('storage/<pool>/volumes', get_volumes, name='volumes'),
|
||||
path('storage/<pool>/', storage, name='storage'),
|
||||
path('networks/', networks, name='networks'),
|
||||
path('network/<pool>/', network, name='network'),
|
||||
path('interfaces/', interfaces, name='interfaces'),
|
||||
path('interface/<iface>/', interface, name='interface'),
|
||||
path('nwfilters/', nwfilters, name='nwfilters'),
|
||||
path('nwfilter/<nwfltr>/', nwfilter, name='nwfilter'),
|
||||
path('secrets/', secrets, name='secrets'),
|
||||
path('create/', create_instance_select_type, name='create_instance_select_type'),
|
||||
path('create/archs/<arch>/machines/<machine>', create_instance, name='create_instance'),
|
||||
path('archs/<arch>/machines', get_compute_machine_types, name='machines'),
|
||||
path('archs/<arch>/machines/<machine>/disks/<disk>/buses', get_compute_disk_buses, name='buses'),
|
||||
path('archs/<arch>/machines/<machine>/capabilities', get_dom_capabilities, name='domcaps'),
|
||||
])),
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
from django.conf.urls import url
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^openstack/$',
|
||||
views.os_index, name='ds_openstack_index'),
|
||||
url(r'^openstack/(?P<version>[\w\-\.]+)/meta_data.json$',
|
||||
views.os_metadata_json, name='ds_openstack_metadata'),
|
||||
url(r'^openstack/(?P<version>[\w\-\.]+)/user_data$',
|
||||
views.os_userdata, name='ds_openstack_userdata'),
|
||||
url(r'^vdi/(?P<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$', views.get_vdi_url, name='vdi_url'),
|
||||
path('openstack/', views.os_index, name='ds_openstack_index'),
|
||||
path('openstack/<version>/meta_data.json', views.os_metadata_json, name='ds_openstack_metadata'),
|
||||
path('openstack/<version>/user_data', views.os_userdata, name='ds_openstack_userdata'),
|
||||
path('vdi/<int:comspute_id>/<vname>/', views.get_vdi_url, name='vdi_url'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$', views.instance, name='instance'),
|
||||
re_path(r'^statistics/(?P<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$', views.inst_graph, name='inst_graph'),
|
||||
re_path(r'^status/(?P<compute_id>[0-9]+)/(?P<vname>[\w\-\.]+)/$', views.inst_status, name='inst_status'),
|
||||
re_path(r'^guess_mac_address/(?P<vname>[\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<vname>[\w\-\.]+)/$', views.check_instance, name='check_instance'),
|
||||
re_path(r'^sshkeys/(?P<vname>[\w\-\.]+)/$', views.sshkeys, name='sshkeys'),
|
||||
path('<int:compute_id>/<vname>/', views.instance, name='instance'),
|
||||
path('statistics/<int:compute_id>/<vname>/', views.inst_graph, name='inst_graph'),
|
||||
path('status/<int:compute_id>/<vname>/', views.inst_status, name='inst_status'),
|
||||
path('guess_mac_address/<vname>/', 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/<vname>/', views.check_instance, name='check_instance'),
|
||||
path('sshkeys/<vname>/', views.sshkeys, name='sshkeys'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ from . import views
|
|||
|
||||
urlpatterns = [
|
||||
path('', views.showlogs, name='showlogs'),
|
||||
re_path(r'^(?P<page>[0-9]+)/$', views.showlogs, name='showlogspage'),
|
||||
re_path(r'^vm_logs/(?P<vname>[\w\-\.]+)/$', views.vm_logs, name='vm_logs'),
|
||||
path('<int:page>/', views.showlogs, name='showlogspage'),
|
||||
path('vm_logs/<vname>/', views.vm_logs, name='vm_logs'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@ urlpatterns = [
|
|||
path('console/', console, name='console'),
|
||||
path('appsettings/', appsettings, name='appsettings'),
|
||||
path('i18n/', include('django.conf.urls.i18n')),
|
||||
# url(r'^admin/', include(admin.site.urls)),
|
||||
# path('admin/', include(admin.site.urls)),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue