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

[linkis] branch dev-1.3.2 updated: Fix control panel bugs (#4346)

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

casion pushed a commit to branch dev-1.3.2
in repository https://gitbox.apache.org/repos/asf/linkis.git


The following commit(s) were added to refs/heads/dev-1.3.2 by this push:
     new 248addd43 Fix control panel bugs (#4346)
248addd43 is described below

commit 248addd43490f283847af86871455637fd711988
Author: aiceflower <ki...@gmail.com>
AuthorDate: Fri Mar 10 11:56:55 2023 +0800

    Fix control panel bugs (#4346)
    
    * Control panel Data source configuration  display English names
    
    * update linkis version
    
    * hide codeQuery
    
    * fix Control panel token add error
    
    * fix token add error
    
    * add mongo and presto data sources
    
    ---------
    
    Co-authored-by: aiceflower <ki...@sina.com>
    Co-authored-by: Casion <ca...@gmail.com>
---
 linkis-dist/package/db/linkis_dml.sql               | 11 +++++++++++
 .../db/upgrade/1.3.2_schema/mysql/linkis_dml.sql    | 13 +++++++++++++
 linkis-web/.env                                     |  2 +-
 linkis-web/src/apps/linkis/i18n/common/zh.json      |  1 +
 .../apps/linkis/module/gatewayAuthToken/index.vue   | 21 ++++++++++++++-------
 linkis-web/src/apps/linkis/view/linkis/index.vue    |  8 +-------
 6 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/linkis-dist/package/db/linkis_dml.sql b/linkis-dist/package/db/linkis_dml.sql
index e7636ba3d..7df48a393 100644
--- a/linkis-dist/package/db/linkis_dml.sql
+++ b/linkis-dist/package/db/linkis_dml.sql
@@ -553,6 +553,17 @@ INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, `cl
 INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, `classifier`, `icon`, `layers`) VALUES ('greenplum','greenplum数据库','greenplum','关系型数据库','',3);
 INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, `classifier`, `icon`, `layers`) VALUES ('doris','doris数据库','doris','olap','',4);
 INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, `classifier`, `icon`, `layers`) VALUES ('clickhouse','clickhouse数据库','clickhouse','olap','',4);
+INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, `classifier`, `icon`, `layers`) VALUES ('mongodb', 'default', 'default', 'DEFAULT', NULL, 3);
+INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, `classifier`, `icon`, `layers`) VALUES ('presto', 'presto SQL', 'presto', '大数据存储', '', 3);
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where `name` = 'mongodb';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'username', '用户名', 'Username', NULL, 'TEXT', NULL, 1, '用户名', 'Username', '^[0-9A-Za-z_-]+$', NULL, '', NULL, now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'password', '密码', 'Password', NULL, 'PASSWORD', NULL, 1, '密码', 'Password', '', NULL, '', NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'database', '默认库', 'Database', NULL, 'TEXT', NULL, 1, '默认库', 'Database', '^[0-9A-Za-z_-]+$', NULL, '', NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'host', 'Host', 'Host', NULL, 'TEXT', NULL, 1, 'mongodb Host', 'Host', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'port', '端口', 'Port', NULL, 'TEXT', NULL, 1, '端口', 'Port', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'params', '连接参数', 'Params', NULL, 'TEXT', NULL, 0, '输入JSON格式: {"param":"value"}', 'Input JSON Format: {"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
+
 
 select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where `name` = 'hive';
 SET @data_source=CONCAT('/data-source-manager/env-list/all/type/',@data_source_type_id);
diff --git a/linkis-dist/package/db/upgrade/1.3.2_schema/mysql/linkis_dml.sql b/linkis-dist/package/db/upgrade/1.3.2_schema/mysql/linkis_dml.sql
index 3d566d20c..c28bd099b 100644
--- a/linkis-dist/package/db/upgrade/1.3.2_schema/mysql/linkis_dml.sql
+++ b/linkis-dist/package/db/upgrade/1.3.2_schema/mysql/linkis_dml.sql
@@ -289,8 +289,21 @@ select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where `nam
 INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'address', '地址', 'Address', NULL, 'TEXT', NULL, 0, '地址(host1:port1,host2:port2...)', 'Address(host1:port1,host2:port2...)', NULL, NULL, NULL, NULL,  now(), now());
 INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'databaseName', '数据库名(Database name)', 'Database name', NULL, 'TEXT', NULL, 0, '数据库名(Database name)', 'Database name', NULL, NULL, NULL, NULL,  now(), now());
 
+
+INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, `classifier`, `icon`, `layers`) VALUES ('mongodb', 'default', 'default', 'DEFAULT', NULL, 3);
+INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, `classifier`, `icon`, `layers`) VALUES ('presto', 'presto SQL', 'presto', '大数据存储', '', 3);
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where `name` = 'mongodb';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'username', '用户名', 'Username', NULL, 'TEXT', NULL, 1, '用户名', 'Username', '^[0-9A-Za-z_-]+$', NULL, '', NULL, now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'password', '密码', 'Password', NULL, 'PASSWORD', NULL, 1, '密码', 'Password', '', NULL, '', NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'database', '默认库', 'Database', NULL, 'TEXT', NULL, 1, '默认库', 'Database', '^[0-9A-Za-z_-]+$', NULL, '', NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'host', 'Host', 'Host', NULL, 'TEXT', NULL, 1, 'mongodb Host', 'Host', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'port', '端口', 'Port', NULL, 'TEXT', NULL, 1, '端口', 'Port', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, `name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, `description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, `data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 'params', '连接参数', 'Params', NULL, 'TEXT', NULL, 0, '输入JSON格式: {"param":"value"}', 'Input JSON Format: {"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
+
 INSERT INTO linkis_ps_error_code (error_code,error_desc,error_regex,error_type) VALUES ('43041','用户UDF函数 %s 加载失败,请检查后再执行','Invalid function (\\S+)',0);
 
 alter table `linkis_cg_ec_resource_info_record`  add column `metrics` VARCHAR(1024) DEFAULT NULL COMMENT 'ec metrics';
 
 INSERT INTO linkis_ps_error_code (error_code,error_desc,error_regex,error_type) VALUES ('12015','您设置的执行器内存已经超过了集群的限定值%s,请减少到限定值以下','is above the max threshold (\\S+.+\\))',0);
+
diff --git a/linkis-web/.env b/linkis-web/.env
index d06cff208..27591f1bf 100644
--- a/linkis-web/.env
+++ b/linkis-web/.env
@@ -1,4 +1,4 @@
 VUE_APP_HOST=
 VUE_APP_MN_CONFIG_PREFIX=
 VUE_APP_MN_CONFIG_SOCKET=/ws/api/entrance/connect
-VUE_APP_VERSION=1.3.1
+VUE_APP_VERSION=1.3.2
diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json b/linkis-web/src/apps/linkis/i18n/common/zh.json
index e86d3074d..cc04f4ab6 100644
--- a/linkis-web/src/apps/linkis/i18n/common/zh.json
+++ b/linkis-web/src/apps/linkis/i18n/common/zh.json
@@ -184,6 +184,7 @@
                       "datasourceAccess": "数据源权限",
                       "datasourceEnv": "数据源环境",
                       "datasourceType": "数据源分类",
+                      "datasourceTypeKey": "数据源配置项",
                       "EnginePluginManagement": "引擎物料管理",
                       "basedataManagement": "基础数据管理",
                       "codeQuery": "代码检索",
diff --git a/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue
index 0f0c53b82..19197f9c5 100644
--- a/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue
+++ b/linkis-web/src/apps/linkis/module/gatewayAuthToken/index.vue
@@ -81,18 +81,18 @@
         <Button type="text" size="large" @click="onModalCancel()">{{$t('message.linkis.basedataManagement.modal.cancel')}}</Button>
         <Button type="primary" size="large" @click="onModalOk('userConfirm')">{{$t('message.linkis.basedataManagement.modal.confirm')}}</Button>
       </div>
-      <ErrorCodeForm ref="errorCodeForm" :data="modalEditData"></ErrorCodeForm>
+      <EditForm ref="editForm" :data="modalEditData"></EditForm>
     </Modal>
   </div>
 </template>
 <script>
 import mixin from '@/common/service/mixin';
-import ErrorCodeForm from './EditForm/index'
+import EditForm from './EditForm/index'
 import {add, del, edit, getList} from "./service";
 import {formatDate} from "iview/src/components/date-picker/util";
 export default {
   mixins: [mixin],
-  components: {ErrorCodeForm},
+  components: {EditForm},
   data() {
     return {
       searchName: "",
@@ -211,16 +211,23 @@ export default {
       this.load()
     },
     onAdd(){
-      this.$refs.errorCodeForm.formModel.resetFields()
+      this.$refs.editForm.formModel.resetFields()
+      const row = {
+        elapseDay: -1,
+        permanentlyValid: true
+      }
+      this.$refs.editForm.formModel.rule[5].hidden = true
+      this.$refs.editForm.formModel.setValue(row)
+
       this.modalAddMode = 'add'
       this.modalShow = true
     },
     onTableEdit(row){
       if(row.elapseDay === -1) {
         row.permanentlyValid = true;
-        this.$refs.errorCodeForm.formModel.rule[5].hidden = true;
+        this.$refs.editForm.formModel.rule[5].hidden = true
       }
-      this.$refs.errorCodeForm.formModel.setValue(row)
+      this.$refs.editForm.formModel.setValue(row)
       this.modalAddMode = 'edit'
       this.modalShow = true
     },
@@ -251,7 +258,7 @@ export default {
 
     },
     onModalOk(){
-      this.$refs.errorCodeForm.formModel.submit((formData)=>{
+      this.$refs.editForm.formModel.submit((formData)=>{
         this.modalLoading = true
         if(this.modalAddMode=='add') {
           add(formData).then((data)=>{
diff --git a/linkis-web/src/apps/linkis/view/linkis/index.vue b/linkis-web/src/apps/linkis/view/linkis/index.vue
index 370cf26c2..88e5088af 100644
--- a/linkis-web/src/apps/linkis/view/linkis/index.vue
+++ b/linkis-web/src/apps/linkis/view/linkis/index.vue
@@ -180,13 +180,7 @@ export default {
             ),
             showSubMenu: true,
           },
-          {
-            key: '1-11',
-            name: this.$t(
-              'message.linkis.sideNavList.function.children.codeQuery'
-            ),
-            path: '/console/codeQuery',
-          },
+          // { key: '1-11', name: this.$t('message.linkis.sideNavList.function.children.codeQuery'), path: '/console/codeQuery' },
         ],
       },
       datasourceNavList: {


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