urls.py 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #!/usr/bin/env python
  2. # Licensed to Cloudera, Inc. under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. Cloudera, Inc. licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. from django.conf.urls.defaults import patterns, url
  18. IS_URL_NAMESPACED = True
  19. urlpatterns = patterns(
  20. 'oozie.views.editor',
  21. url(r'^list_workflows/$', 'list_workflows', name='list_workflows'),
  22. url(r'^list_trashed_workflows/$', 'list_trashed_workflows', name='list_trashed_workflows'),
  23. url(r'^create_workflow/$', 'create_workflow', name='create_workflow'),
  24. url(r'^edit_workflow/(?P<workflow>\d+)$', 'edit_workflow', name='edit_workflow'),
  25. url(r'^delete_workflow$', 'delete_workflow', name='delete_workflow'),
  26. url(r'^restore_workflow/$', 'restore_workflow', name='restore_workflow'),
  27. url(r'^clone_workflow/(?P<workflow>\d+)$', 'clone_workflow', name='clone_workflow'),
  28. url(r'^submit_workflow/(?P<workflow>\d+)$', 'submit_workflow', name='submit_workflow'),
  29. url(r'^schedule_workflow/(?P<workflow>\d+)$', 'schedule_workflow', name='schedule_workflow'),
  30. url(r'^import_workflow/$', 'import_workflow', name='import_workflow'),
  31. url(r'^import_coordinator/$', 'import_coordinator', name='import_coordinator'),
  32. url(r'^export_workflow/(?P<workflow>\d+)$', 'export_workflow', name='export_workflow'),
  33. url(r'^list_coordinators/(?P<workflow_id>[-\w]+)?$', 'list_coordinators', name='list_coordinators'),
  34. url(r'^list_trashed_coordinators/$', 'list_trashed_coordinators', name='list_trashed_coordinators'),
  35. url(r'^create_coordinator/(?P<workflow>[-\w]+)?$', 'create_coordinator', name='create_coordinator'),
  36. url(r'^edit_coordinator/(?P<coordinator>[-\w]+)$', 'edit_coordinator', name='edit_coordinator'),
  37. url(r'^delete_coordinator$', 'delete_coordinator', name='delete_coordinator'),
  38. url(r'^restore_coordinator$', 'restore_coordinator', name='restore_coordinator'),
  39. url(r'^clone_coordinator/(?P<coordinator>\d+)$', 'clone_coordinator', name='clone_coordinator'),
  40. url(r'^create_coordinator_dataset/(?P<coordinator>[-\w]+)$', 'create_coordinator_dataset', name='create_coordinator_dataset'),
  41. url(r'^edit_coordinator_dataset/(?P<dataset>\d+)$', 'edit_coordinator_dataset', name='edit_coordinator_dataset'),
  42. url(r'^create_coordinator_data/(?P<coordinator>[-\w]+)/(?P<data_type>(input|output))$', 'create_coordinator_data', name='create_coordinator_data'),
  43. url(r'^submit_coordinator/(?P<coordinator>\d+)$', 'submit_coordinator', name='submit_coordinator'),
  44. url(r'^list_bundles$', 'list_bundles', name='list_bundles'),
  45. url(r'^list_trashed_bundles$', 'list_trashed_bundles', name='list_trashed_bundles'),
  46. url(r'^create_bundle$', 'create_bundle', name='create_bundle'),
  47. url(r'^edit_bundle/(?P<bundle>\d+)$', 'edit_bundle', name='edit_bundle'),
  48. url(r'^submit_bundle/(?P<bundle>\d+)$', 'submit_bundle', name='submit_bundle'),
  49. url(r'^clone_bundle/(?P<bundle>\d+)$', 'clone_bundle', name='clone_bundle'),
  50. url(r'^delete_bundle$', 'delete_bundle', name='delete_bundle'),
  51. url(r'^restore_bundle$', 'restore_bundle', name='restore_bundle'),
  52. url(r'^create_bundled_coordinator/(?P<bundle>\d+)$', 'create_bundled_coordinator', name='create_bundled_coordinator'),
  53. url(r'^edit_bundled_coordinator/(?P<bundle>\d+)/(?P<bundled_coordinator>\d+)$', 'edit_bundled_coordinator', name='edit_bundled_coordinator'),
  54. url(r'^list_history$', 'list_history', name='list_history'), # Unused
  55. url(r'^list_history/(?P<record_id>[-\w]+)$', 'list_history_record', name='list_history_record'),
  56. url(r'^install_examples/$', 'install_examples', name='install_examples'),
  57. url(r'^jasmine', 'jasmine'),
  58. )
  59. urlpatterns += patterns(
  60. 'oozie.views.editor2',
  61. url(r'^editor/workflow/list/$', 'list_editor_workflows', name='list_editor_workflows'),
  62. url(r'^editor/workflow/edit/$', 'edit_workflow', name='edit_workflow'),
  63. url(r'^editor/workflow/new/$', 'new_workflow', name='new_workflow'),
  64. url(r'^editor/workflow/save/$', 'save_workflow', name='save_workflow'),
  65. url(r'^editor/workflow/submit/(?P<doc_id>\d+)$', 'submit_workflow', name='editor_submit_workflow'),
  66. url(r'^editor/workflow/new_node/$', 'new_node', name='new_node'),
  67. url(r'^editor/workflow/add_node/$', 'add_node', name='add_node'),
  68. url(r'^editor/workflow/parameters/$', 'workflow_parameters', name='workflow_parameters'),
  69. url(r'^editor/workflow/gen_xml/$', 'gen_xml_workflow', name='gen_xml_workflow'), # Temporary
  70. url(r'^editor/workflow/import_workflows/$', 'import_hue_3_7_workflows', name='import_hue_3_7_workflows'), # Temporary
  71. url(r'^editor/coordinator/list/$', 'list_editor_coordinators', name='list_editor_coordinators'),
  72. url(r'^editor/coordinator/edit/$', 'edit_coordinator', name='edit_coordinator'),
  73. url(r'^editor/coordinator/new/$', 'new_coordinator', name='new_coordinator'),
  74. url(r'^editor/coordinator/save/$', 'save_coordinator', name='save_coordinator'),
  75. url(r'^editor/coordinator/submit/(?P<doc_id>\d+)$', 'submit_coordinator', name='editor_submit_coordinator'),
  76. url(r'^editor/coordinator/gen_xml/$', 'gen_xml_coordinator', name='gen_xml_coordinator'), # Temporary
  77. )
  78. urlpatterns += patterns(
  79. 'oozie.views.api',
  80. url(r'^workflows$', 'workflows', name='workflows'),
  81. url(r'^workflows/(?P<workflow>\d+)$', 'workflow', name='workflow'),
  82. url(r'^workflows/(?P<workflow>\d+)/save$', 'workflow_save', name='workflow_save'),
  83. url(r'^workflows/(?P<workflow>\d+)/actions$', 'workflow_actions', name='workflow_actions'),
  84. url(r'^workflows/(?P<workflow>\d+)/nodes/(?P<node_type>\w+)/validate$', 'workflow_validate_node', name='workflow_validate_node'),
  85. url(r'^workflows/autocomplete_properties/$', 'autocomplete_properties', name='autocomplete_properties'),
  86. )
  87. urlpatterns += patterns(
  88. 'oozie.views.dashboard',
  89. url(r'^$', 'list_oozie_workflows', name='index'),
  90. url(r'^list_oozie_workflows/$', 'list_oozie_workflows', name='list_oozie_workflows'),
  91. url(r'^list_oozie_coordinators/$', 'list_oozie_coordinators', name='list_oozie_coordinators'),
  92. url(r'^list_oozie_bundles/$', 'list_oozie_bundles', name='list_oozie_bundles'),
  93. url(r'^list_oozie_workflow/(?P<job_id>[-\w]+)/$', 'list_oozie_workflow', name='list_oozie_workflow'),
  94. url(r'^list_oozie_coordinator/(?P<job_id>[-\w]+)/$', 'list_oozie_coordinator', name='list_oozie_coordinator'),
  95. url(r'^list_oozie_workflow_action/(?P<action>[-\w@]+)/$', 'list_oozie_workflow_action', name='list_oozie_workflow_action'),
  96. url(r'^list_oozie_bundle/(?P<job_id>[-\w]+)$', 'list_oozie_bundle', name='list_oozie_bundle'),
  97. url(r'^rerun_oozie_job/(?P<job_id>[-\w]+)/(?P<app_path>.+?)$', 'rerun_oozie_job', name='rerun_oozie_job'),
  98. url(r'^rerun_oozie_coord/(?P<job_id>[-\w]+)/(?P<app_path>.+?)$', 'rerun_oozie_coordinator', name='rerun_oozie_coord'),
  99. url(r'^rerun_oozie_bundle/(?P<job_id>[-\w]+)/(?P<app_path>.+?)$', 'rerun_oozie_bundle', name='rerun_oozie_bundle'),
  100. url(r'^manage_oozie_jobs/(?P<job_id>[-\w]+)/(?P<action>(start|suspend|resume|kill|rerun))$', 'manage_oozie_jobs', name='manage_oozie_jobs'),
  101. url(r'^bulk_manage_oozie_jobs/$', 'bulk_manage_oozie_jobs', name='bulk_manage_oozie_jobs'),
  102. url(r'^submit_external_job/(?P<application_path>.+?)$', 'submit_external_job', name='submit_external_job'),
  103. url(r'^get_oozie_job_log/(?P<job_id>[-\w]+)$', 'get_oozie_job_log', name='get_oozie_job_log'),
  104. url(r'^list_oozie_info/$', 'list_oozie_info', name='list_oozie_info'),
  105. url(r'^list_oozie_sla/$', 'list_oozie_sla', name='list_oozie_sla'),
  106. )