urls.py 3.9 KB

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