浏览代码

[api] Prefix editor view names

Romain Rigaux 4 年之前
父节点
当前提交
5012908b62
共有 1 个文件被更改,包括 23 次插入23 次删除
  1. 23 23
      desktop/core/src/desktop/api_public_urls.py

+ 23 - 23
desktop/core/src/desktop/api_public_urls.py

@@ -29,8 +29,8 @@ else:
 # "New" query API (i.e. connector based, lean arguments).
 # e.g. https://demo.gethue.com/api/query/execute/hive
 urlpatterns = [
-  re_path(r'^query/create_notebook/?$', api_public.create_notebook, name='api_create_notebook'),
-  re_path(r'^query/autocomplete/?$', api_public.autocomplete, name='api_autocomplete_databases'),
+  re_path(r'^query/create_notebook/?$', api_public.create_notebook, name='query_create_notebook'),
+  re_path(r'^query/autocomplete/?$', api_public.autocomplete, name='query_autocomplete_databases'),
 ]
 
 # Compatibility with "old" private API.
@@ -39,49 +39,49 @@ urlpatterns += [
   re_path(r'^get_config/?$', api_public.get_config),
   re_path(r'^get_namespaces/(?P<interface>[\w\-]+)/?$', api_public.get_context_namespaces),  # To remove
 
-  re_path(r'^editor/create_notebook/?$', api_public.create_notebook, name='api_create_notebook'),
-  re_path(r'^editor/create_session/?$', api_public.create_session, name='api_create_session'),
-  re_path(r'^editor/close_session/?$', api_public.close_session, name='api_close_session'),
+  re_path(r'^editor/create_notebook/?$', api_public.create_notebook, name='editor_create_notebook'),
+  re_path(r'^editor/create_session/?$', api_public.create_session, name='editor_create_session'),
+  re_path(r'^editor/close_session/?$', api_public.close_session, name='editor_close_session'),
   re_path(r'^editor/execute(?:/(?P<dialect>.+))?/?$', api_public.execute, name='editor_execute'),
-  re_path(r'^editor/check_status/?$', api_public.check_status, name='api_check_status'),
-  re_path(r'^editor/fetch_result_data/?$', api_public.fetch_result_data, name='api_fetch_result_data'),
-  re_path(r'^editor/fetch_result_metadata/?$', api_public.fetch_result_metadata, name='api_fetch_result_metadata'),
-  re_path(r'^editor/fetch_result_size/?$', api_public.fetch_result_size, name='api_fetch_result_size'),
-  re_path(r'^editor/cancel_statement/?$', api_public.cancel_statement, name='api_cancel_statement'),
-  re_path(r'^editor/close_statement/?$', api_public.close_statement, name='api_close_statement'),
-  re_path(r'^editor/get_logs/?$', api_public.get_logs, name='api_get_logs'),
+  re_path(r'^editor/check_status/?$', api_public.check_status, name='editor_check_status'),
+  re_path(r'^editor/fetch_result_data/?$', api_public.fetch_result_data, name='editor_fetch_result_data'),
+  re_path(r'^editor/fetch_result_metadata/?$', api_public.fetch_result_metadata, name='editor_fetch_result_metadata'),
+  re_path(r'^editor/fetch_result_size/?$', api_public.fetch_result_size, name='editor_fetch_result_size'),
+  re_path(r'^editor/cancel_statement/?$', api_public.cancel_statement, name='editor_cancel_statement'),
+  re_path(r'^editor/close_statement/?$', api_public.close_statement, name='editor_close_statement'),
+  re_path(r'^editor/get_logs/?$', api_public.get_logs, name='editor_get_logs'),
 
-  re_path(r'^editor/describe/(?P<database>[^/]*)/?$', api_public.describe, name='api_describe_database'),
-  re_path(r'^editor/describe/(?P<database>[^/]*)/(?P<table>[\w_\-]+)/?$', api_public.describe, name='api_describe_table'),
-  re_path(r'^editor/describe/(?P<database>[^/]*)/(?P<table>\w+)/stats(?:/(?P<column>\w+))?/?$', api_public.describe, name='api_describe_column'),
+  re_path(r'^editor/describe/(?P<database>[^/]*)/?$', api_public.describe, name='editor_describe_database'),
+  re_path(r'^editor/describe/(?P<database>[^/]*)/(?P<table>[\w_\-]+)/?$', api_public.describe, name='editor_describe_table'),
+  re_path(r'^editor/describe/(?P<database>[^/]*)/(?P<table>\w+)/stats(?:/(?P<column>\w+))?/?$', api_public.describe, name='editor_describe_column'),
 
-  re_path(r'^editor/autocomplete/?$', api_public.autocomplete, name='api_autocomplete_databases'),
+  re_path(r'^editor/autocomplete/?$', api_public.autocomplete, name='editor_autocomplete_databases'),
   re_path(
       r"^editor/autocomplete/(?P<database>[^/?]*)/?$",
       api_public.autocomplete,
-      name="api_autocomplete_tables",
+      name="editor_autocomplete_tables",
   ),
   re_path(
       r"^editor/autocomplete/(?P<database>[^/?]*)/(?P<table>[\w_\-]+)/?$",
       api_public.autocomplete,
-      name="api_autocomplete_columns",
+      name="editor_autocomplete_columns",
   ),
   re_path(
       r"^editor/autocomplete/(?P<database>[^/?]*)/(?P<table>[\w_\-]+)/(?P<column>\w+)/?$",
       api_public.autocomplete,
-      name="api_autocomplete_column",
+      name="editor_autocomplete_column",
   ),
   re_path(
       r"^editor/autocomplete/(?P<database>[^/?]*)/(?P<table>[\w_\-]+)/(?P<column>\w+)/(?P<nested>.+)/?$",
       api_public.autocomplete,
-      name="api_autocomplete_nested",
+      name="editor_autocomplete_nested",
   ),
 ]
 
 urlpatterns += [
-  re_path(r'^storage/view=(?P<path>.*)$', api_public.storage_view, name='api_storage_view'),
-  re_path(r'^storage/download=(?P<path>.*)$', api_public.storage_download, name='api_storage_download'),
-  re_path(r'^storage/upload/file/?$', api_public.storage_upload_file, name='api_storage_upload_file'),
+  re_path(r'^storage/view=(?P<path>.*)$', api_public.storage_view, name='storage_view'),
+  re_path(r'^storage/download=(?P<path>.*)$', api_public.storage_download, name='storage_download'),
+  re_path(r'^storage/upload/file/?$', api_public.storage_upload_file, name='storage_upload_file'),
 ]
 
 # Slack install API for using CORS by default