urls.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. from django.urls import include, path
  2. from utilities.urls import get_model_urls
  3. from . import views
  4. app_name = 'core'
  5. urlpatterns = (
  6. path('data-sources/', include(get_model_urls('core', 'datasource', detail=False))),
  7. path('data-sources/<int:pk>/', include(get_model_urls('core', 'datasource'))),
  8. path('data-files/', include(get_model_urls('core', 'datafile', detail=False))),
  9. path('data-files/<int:pk>/', include(get_model_urls('core', 'datafile'))),
  10. path('jobs/', include(get_model_urls('core', 'job', detail=False))),
  11. path('jobs/<int:pk>/', include(get_model_urls('core', 'job'))),
  12. path('changelog/', include(get_model_urls('core', 'objectchange', detail=False))),
  13. path('changelog/<int:pk>/', include(get_model_urls('core', 'objectchange'))),
  14. # Background Tasks
  15. path('background-queues/', views.BackgroundQueueListView.as_view(), name='background_queue_list'),
  16. path(
  17. 'background-queues/<int:queue_index>/<str:status>/',
  18. views.BackgroundTaskListView.as_view(),
  19. name='background_task_list'
  20. ),
  21. path('background-tasks/<str:job_id>/', views.BackgroundTaskView.as_view(), name='background_task'),
  22. path(
  23. 'background-tasks/<str:job_id>/delete/',
  24. views.BackgroundTaskDeleteView.as_view(),
  25. name='background_task_delete'
  26. ),
  27. path(
  28. 'background-tasks/<str:job_id>/requeue/',
  29. views.BackgroundTaskRequeueView.as_view(),
  30. name='background_task_requeue'
  31. ),
  32. path(
  33. 'background-tasks/<str:job_id>/enqueue/',
  34. views.BackgroundTaskEnqueueView.as_view(),
  35. name='background_task_enqueue'
  36. ),
  37. path('background-tasks/<str:job_id>/stop/', views.BackgroundTaskStopView.as_view(), name='background_task_stop'),
  38. path('background-workers/<int:queue_index>/', views.WorkerListView.as_view(), name='worker_list'),
  39. path('background-workers/<str:key>/', views.WorkerView.as_view(), name='worker'),
  40. path('config-revisions/', include(get_model_urls('core', 'configrevision', detail=False))),
  41. path('config-revisions/<int:pk>/', include(get_model_urls('core', 'configrevision'))),
  42. path('system/', views.SystemView.as_view(), name='system'),
  43. path('system/db-schema/', views.SystemDBSchemaView.as_view(), name='system_db_schema'),
  44. path('plugins/', views.PluginListView.as_view(), name='plugin_list'),
  45. path('plugins/<str:name>/', views.PluginView.as_view(), name='plugin'),
  46. )