Эх сурвалжийг харах

[api] Switching Scratchpad to use the public API

Romain Rigaux 4 жил өмнө
parent
commit
95768cd74d

+ 3 - 2
desktop/core/src/desktop/js/api/urls.js

@@ -14,13 +14,14 @@
 // See the License for the specific language governing permissions and
 // See the License for the specific language governing permissions and
 // limitations under the License.
 // limitations under the License.
 
 
-export const AUTOCOMPLETE_API_PREFIX = '/notebook/api/autocomplete/';
+export const AUTOCOMPLETE_API_PREFIX = '/api/editor/autocomplete/';
+// export const AUTOCOMPLETE_API_PREFIX = '/notebook/api/autocomplete/';
 export const SAMPLE_API_PREFIX = '/notebook/api/sample/';
 export const SAMPLE_API_PREFIX = '/notebook/api/sample/';
 export const EXECUTE_API_PREFIX = '/notebook/api/execute/';
 export const EXECUTE_API_PREFIX = '/notebook/api/execute/';
 export const DOCUMENTS_API = '/desktop/api2/doc/';
 export const DOCUMENTS_API = '/desktop/api2/doc/';
 export const DOCUMENTS_SEARCH_API = '/desktop/api2/docs/';
 export const DOCUMENTS_SEARCH_API = '/desktop/api2/docs/';
 export const GET_HUE_CONFIG_API = '/desktop/api2/get_hue_config';
 export const GET_HUE_CONFIG_API = '/desktop/api2/get_hue_config';
-export const FETCH_CONFIG_PRIVATE_API = '/desktop/api2/get_config/';
+// export const FETCH_CONFIG_API = '/desktop/api2/get_config/';
 export const FETCH_CONFIG_API = '/api/iam/get_config/';
 export const FETCH_CONFIG_API = '/api/iam/get_config/';
 export const HDFS_API_PREFIX = '/filebrowser/view=' + encodeURIComponent('/');
 export const HDFS_API_PREFIX = '/filebrowser/view=' + encodeURIComponent('/');
 export const ADLS_API_PREFIX = '/filebrowser/view=' + encodeURIComponent('adl:/');
 export const ADLS_API_PREFIX = '/filebrowser/view=' + encodeURIComponent('adl:/');

+ 9 - 9
desktop/core/src/desktop/js/apps/editor/execution/api.ts

@@ -138,15 +138,15 @@ export interface AuthRequest {
   message?: string;
   message?: string;
 }
 }
 
 
-const CANCEL_STATEMENT_API = '/notebook/api/cancel_statement';
-const CHECK_STATUS_API = '/notebook/api/check_status';
-const CLOSE_SESSION_API = '/notebook/api/close_session';
-const CLOSE_STATEMENT_API = '/notebook/api/close_statement';
-const CREATE_SESSION_API = '/notebook/api/create_session';
-const EXECUTE_API_PREFIX = '/notebook/api/execute/';
-const FETCH_RESULT_DATA_API = '/notebook/api/fetch_result_data';
-const FETCH_RESULT_SIZE_API = '/notebook/api/fetch_result_size';
-const GET_LOGS_API = '/notebook/api/get_logs';
+const CANCEL_STATEMENT_API = '/api/editor/cancel_statement';
+const CHECK_STATUS_API = '/api/editor/check_status';
+const CLOSE_SESSION_API = '/api/editor/close_session';
+const CLOSE_STATEMENT_API = '/api/editor/close_statement';
+const CREATE_SESSION_API = '/api/editor/create_session';
+const EXECUTE_API_PREFIX = '/api/editor/execute/';
+const FETCH_RESULT_DATA_API = '/api/editor/fetch_result_data';
+const FETCH_RESULT_SIZE_API = '/api/editor/fetch_result_size';
+const GET_LOGS_API = '/api/editor/get_logs';
 
 
 export const createSession = async (options: {
 export const createSession = async (options: {
   type: string;
   type: string;

+ 2 - 1
desktop/core/src/desktop/js/catalog/api.ts

@@ -56,7 +56,8 @@ interface SampleFetchOptions extends SharedFetchOptions {
   sampleCount?: number;
   sampleCount?: number;
 }
 }
 
 
-const AUTOCOMPLETE_URL_PREFIX = '/notebook/api/autocomplete/';
+const AUTOCOMPLETE_URL_PREFIX = '/api/editor/autocomplete/';
+// const AUTOCOMPLETE_URL_PREFIX = '/notebook/api/autocomplete/';
 const CANCEL_STATEMENT_URL = '/notebook/api/cancel_statement';
 const CANCEL_STATEMENT_URL = '/notebook/api/cancel_statement';
 const CHECK_STATUS_URL = '/notebook/api/check_status';
 const CHECK_STATUS_URL = '/notebook/api/check_status';
 const DESCRIBE_URL = '/notebook/api/describe/';
 const DESCRIBE_URL = '/notebook/api/describe/';