You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2022/03/03 07:41:10 UTC

[incubator-linkis] branch dev-1.1.0-datasource updated: Dev 1.1.0 datasource (#1591)

This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch dev-1.1.0-datasource
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.1.0-datasource by this push:
     new 884d172  Dev 1.1.0 datasource (#1591)
884d172 is described below

commit 884d1727f106e603d16a7432074f3c99af3c5484
Author: luxl@chinatelecom.cn <li...@126.com>
AuthorDate: Thu Mar 3 15:41:05 2022 +0800

    Dev 1.1.0 datasource (#1591)
    
    * support all type url
    
    * fix path and i18n
---
 web/src/apps/linkis/i18n/common/en.json            |  1 +
 web/src/apps/linkis/i18n/common/zh.json            |  3 ++-
 .../apps/linkis/module/datasource/dataSourceApi.js | 28 +++++++++++-----------
 3 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/web/src/apps/linkis/i18n/common/en.json b/web/src/apps/linkis/i18n/common/en.json
index 22a0ade..d2269a2 100644
--- a/web/src/apps/linkis/i18n/common/en.json
+++ b/web/src/apps/linkis/i18n/common/en.json
@@ -47,6 +47,7 @@
       "save": "Save",
       "edit": "Edit",
       "cancel": "Cancel",
+      "create": "Create",
       "noDataText": "No data yet",
       "userName": "Username",
       "unselect": "Please select task",
diff --git a/web/src/apps/linkis/i18n/common/zh.json b/web/src/apps/linkis/i18n/common/zh.json
index e56b79c..3b8f724 100644
--- a/web/src/apps/linkis/i18n/common/zh.json
+++ b/web/src/apps/linkis/i18n/common/zh.json
@@ -47,6 +47,7 @@
             "save": "保存",
             "edit": "编辑",
             "cancel": "取消",
+            "create": "新建",
             "noDataText": "暂无数据",
             "userName": "用户名",
             "unselect": "请选择",
@@ -76,7 +77,7 @@
             },
             "tableColumns": {
                 "instanceName": "实例名称",
-                "initiator":"启动者",
+                "initiator": "启动者",
                 "engineInstance": "引擎实例",
                 "engineType": "引擎类型",
                 "taskID": "任务ID",
diff --git a/web/src/apps/linkis/module/datasource/dataSourceApi.js b/web/src/apps/linkis/module/datasource/dataSourceApi.js
index a0a8df8..34f7b66 100644
--- a/web/src/apps/linkis/module/datasource/dataSourceApi.js
+++ b/web/src/apps/linkis/module/datasource/dataSourceApi.js
@@ -20,19 +20,19 @@ import { serialize } from 'object-to-formdata';
 
 
 const getDataSourceList = (params)=>{
-  return api.fetch('data_source/info', params, 'get')
+  return api.fetch('data-source-manager/info', params, 'get')
 }
 
 const getDataSourceTypeList = ()=>{
-  return api.fetch('/data_source/type/all', {}, 'get')
+  return api.fetch('/data-source-manager/type/all', {}, 'get')
 }
 
 const getEnvList = ()=>{
-  return api.fetch('data_source/env', {}, 'get')
+  return api.fetch('data-source-manager/env', {}, 'get')
 }
 
 const getKeyDefine = (id)=>{
-  return api.fetch(`/data_source/key_define/type/${id}`, {}, 'get')
+  return api.fetch(`/data-source-manager/key_define/type/${id}`, {}, 'get')
 }
 
 /**
@@ -41,7 +41,7 @@ const getKeyDefine = (id)=>{
  * @returns 
  */
 const createDataSource = (realFormData)=>{
-  return api.fetch('data_source/info/json', realFormData)
+  return api.fetch('data-source-manager/info/json', realFormData)
 }
 
 /**
@@ -50,7 +50,7 @@ const createDataSource = (realFormData)=>{
  * @returns 
  */
 const createDataSourceForm = (realFormData)=>{
-  return api.fetch('data_source/info/form', realFormData, {methed: 'post', 'Content-Type': 'text/plain'})
+  return api.fetch('data-source-manager/info/form', realFormData, {methed: 'post', 'Content-Type': 'text/plain'})
 }
 
 /**
@@ -59,7 +59,7 @@ const createDataSourceForm = (realFormData)=>{
  * @returns 
  */
 const updateDataSource = (data, datasourceId)=>{
-  return api.fetch(`data_source/info/${datasourceId}/json`, data, 'put')
+  return api.fetch(`data-source-manager/info/${datasourceId}/json`, data, 'put')
 }
 
 /**
@@ -69,7 +69,7 @@ const updateDataSource = (data, datasourceId)=>{
  * @returns 
  */
 const saveConnectParams = (datasourceId, data, comment)=>{
-  return api.fetch(`/data_source/parameter/${datasourceId}/json`, {connectParams: data, comment})//{connectParams: data, comment}
+  return api.fetch(`/data-source-manager/parameter/${datasourceId}/json`, {connectParams: data, comment})//{connectParams: data, comment}
 }
 
 /**
@@ -78,7 +78,7 @@ const saveConnectParams = (datasourceId, data, comment)=>{
  */
 const saveConnectParamsForm = (datasourceId, data, comment)=>{
   const formData = serialize({connectParams: data, comment});
-  return api.fetch(`/data_source/parameter/${datasourceId}/form`, formData, {methed: 'post', 'Content-Type': 'text/plain'})
+  return api.fetch(`/data-source-manager/parameter/${datasourceId}/form`, formData, {methed: 'post', 'Content-Type': 'text/plain'})
 }
   
 
@@ -87,14 +87,14 @@ const saveConnectParamsForm = (datasourceId, data, comment)=>{
  * @returns 
  */
 const getDataSourceByIdAndVersion = (datasourceId, version)=>{
-  return api.fetch(`/data_source/info/${datasourceId}/${version}`, {}, 'get')
+  return api.fetch(`/data-source-manager/info/${datasourceId}/${version}`, {}, 'get')
 }
 /**
  * @param datasourceId 
  * @returns 
  */
 const getVersionListByDatasourceId = (datasourceId)=>{
-  return api.fetch(`/data_source/${datasourceId}/versions`, {}, 'get')
+  return api.fetch(`/data-source-manager/${datasourceId}/versions`, {}, 'get')
 }
   
 
@@ -105,7 +105,7 @@ const getVersionListByDatasourceId = (datasourceId)=>{
  * @returns 
  */
 const expire = (datasourceId)=>{
-  return api.fetch(`/data_source/info/${datasourceId}/expire`, {}, 'put')
+  return api.fetch(`/data-source-manager/info/${datasourceId}/expire`, {}, 'put')
 }
 
 /**
@@ -115,7 +115,7 @@ const expire = (datasourceId)=>{
  * @returns 
  */
 const publish = (datasourceId, versionId)=>{
-  return api.fetch(`data_source/publish/${datasourceId}/${versionId}`, {}, 'post')
+  return api.fetch(`data-source-manager/publish/${datasourceId}/${versionId}`, {}, 'post')
 }
 
 /**
@@ -123,7 +123,7 @@ const publish = (datasourceId, versionId)=>{
  * @returns 
  */
 const connect = (data)=> {
-  return api.fetch(`data_source/op/connect/json`, data);
+  return api.fetch(`data-source-manager/op/connect/json`, data);
 }
 
 export  {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org