1
0

urls.py 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. from django.urls import path, re_path
  2. from django.views.generic import RedirectView, TemplateView
  3. from . import views
  4. from . import api
  5. urlpatterns = [
  6. path('maintenance/update', views.update, name='parc_info_update'),
  7. path('import/snow', views.import_snow_data, name='parc_info_import_snow'),
  8. #api taches
  9. # path('api/taches/get_list', api.taches_get_list, name='parc_info_api_taches_get_list'),
  10. # re_path('api/taches/edit_taches/(?P<id_tache>\d+)', api.taches_edit_info, name='parc_info_api_taches_edit_info'),
  11. #api switchs
  12. path('api/switch/get_list', api.switch_get_list, name='parc_info_api_switch_get_list'),
  13. re_path('api/switch/get/(?P<id>\d+)', api.switch_get_info, name='parc_info_api_switch_get_info'),
  14. re_path('api/switch/edit/(?P<id>\d+)', api.switch_edit_info, name='parc_info_api_switch_edit_info'),
  15. re_path('api/switch/edit/port/(?P<switch_id>\d+)/(?P<port_id>\d+)', api.switch_edit_port, name='parc_info_api_switch_edit_port'),
  16. re_path('api/switch/update/(?P<switch_id>\d+)', api.switch_update_port, name='parc_info_api_switch_update_port'),
  17. #api serveurs
  18. path('api/serveurs/get_list', api.srv_get_list, name='parc_info_api_srv_get_list'),
  19. re_path('api/serveurs/get_srv/(?P<id_srv>\d+)', api.srv_get_info, name='parc_info_api_srv_get_info'),
  20. #path('api/serveurs/add_srv', api.srv_edit_info, {'id_srv': None}, name='parc_info_api_srv_add_info'),
  21. re_path('api/serveurs/edit_srv/(?P<id_srv>\d+)', api.srv_edit_info, name='parc_info_api_srv_edit_info'),
  22. path('api/serveurs/update', api.srv_update, name='parc_info_api_srv_update'),
  23. #api clients
  24. path('api/clients/get_list', api.user_get_list, name='parc_info_api_user_get_list'),
  25. re_path('api/clients/get_user/(?P<id_user>\d+)', api.user_get_info, name='parc_info_api_user_get_info'),
  26. re_path('api/clients/get_hist/(?P<id_user>\d+)', api.user_get_hist, name='parc_info_api_user_get_hist'),
  27. re_path('api/clients/edit_user/(?P<id_user>\d+)', api.user_edit_info, name='parc_info_api_user_edit_info'),
  28. re_path('api/clients/edit_statut/(?P<id_user>\d+)', api.user_edit_statut, name='parc_info_api_user_edit_statut'),
  29. re_path('api/clients/novnc/(?P<cl_hostname>[a-zA-Z0-9_.,-]+)', api.user_start_novnc, name='parc_info_api_user_start_novnc'),
  30. path('api/client/update', api.user_update, name='parc_info_api_user_update'),
  31. # taches
  32. # path('taches', views.taches_show_list, name='parc_info_taches_show_list'),
  33. # re_path('taches/edit/(?P<id_tache>\d+)', views.taches_edit_info, name='parc_info_taches_edit_info'),
  34. # switch
  35. path('switch', views.switch_show_list, name='parc_info_switch_show_list'),
  36. re_path('switch/edit/(?P<id>\d+)', views.switch_edit_info, name='parc_info_switch_edit_info'),
  37. re_path('switch/edit/port/(?P<switch_id>\d+)/(?P<port_id>\d+)', views.switch_edit_port, name='parc_info_switch_edit_port'),
  38. re_path('switch/update/(?P<switch_id>\d+)', views.switch_update_port, name='parc_info_switch_update_port'),
  39. # serveurs
  40. path('serveurs', views.srv_show_list, name='parc_info_srv_show_list'),
  41. re_path('serveurs/edit/(?P<id_srv>\d+)', views.srv_edit_info, name='parc_info_srv_edit_info'),
  42. # client
  43. path('clients', views.user_show_list, name='parc_info_user_show_list'),
  44. re_path('clients/edit/(?P<id_user>\d+)', views.user_edit_info, name='parc_info_user_edit_info'),
  45. re_path('clients/edit_statut/(?P<id_user>\d+)', views.user_edit_statut, name='parc_info_user_edit_statut'),
  46. path('clients/enstock', views.user_show_list_en_stock, name='parc_info_user_show_list_en_stock'),
  47. path('clients/aprep', views.user_show_list_aprep, name='parc_info_user_show_list_aprep'),
  48. path('clients/deprod', views.user_show_list_deprod, name='parc_info_user_show_list_deprod'),
  49. path('clients/imp', views.user_show_list_imp, name='parc_info_user_show_list_imp'),
  50. path('clients/stat/par-services', views.stat_user_by_service, name='parc_info_stat_user_by_service'),
  51. path('clients/stat/without-snow', views.stat_user_without_snow, name='parc_info_stat_user_without_snow'),
  52. ]