From 1f0c67bfb772f46a0e7d6289b13a499aae403fe3 Mon Sep 17 00:00:00 2001 From: kyoty Date: Wed, 14 Jul 2021 13:51:10 +0800 Subject: [PATCH] [Fix-5726] When we used the UI page, we found some problems such as parameter validation, parameter update shows success but actually work (#5727) * enhance the validation in UI * enchance form verifaction * simplify disable condition --- .../api/service/impl/DataSourceServiceImpl.java | 6 +----- .../org/apache/dolphinscheduler/dao/mapper/UserMapper.xml | 2 +- .../datasource/pages/list/_source/createDataSource.vue | 2 +- .../security/pages/warningGroups/_source/createWarning.vue | 2 +- .../home/pages/user/pages/token/_source/createToken.vue | 4 ++++ dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js | 1 + dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js | 1 + 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DataSourceServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DataSourceServiceImpl.java index f36d63b989..529dbb23fb 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DataSourceServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DataSourceServiceImpl.java @@ -119,10 +119,6 @@ public class DataSourceServiceImpl extends BaseServiceImpl implements DataSource * updateProcessInstance datasource * * @param loginUser login user - * @param name data source name - * @param desc data source description - * @param type data source type - * @param parameter datasource parameters * @param id data source id * @return update result code */ @@ -163,7 +159,7 @@ public class DataSourceServiceImpl extends BaseServiceImpl implements DataSource Date now = new Date(); - dataSource.setName(dataSource.getName().trim()); + dataSource.setName(dataSourceParam.getName().trim()); dataSource.setNote(dataSourceParam.getNote()); dataSource.setUserName(loginUser.getUserName()); dataSource.setType(dataSource.getType()); diff --git a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/UserMapper.xml b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/UserMapper.xml index 7faff8b878..dec6a51937 100644 --- a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/UserMapper.xml +++ b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/UserMapper.xml @@ -61,7 +61,7 @@ - , + ,t.tenant_code, case when u.queue ]]> '' then u.queue else q.queue_name end as queue_name from t_ds_user u left join t_ds_tenant t on u.tenant_id=t.id diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue b/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue index 301ec8cd5c..00740fcf9f 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue @@ -21,7 +21,7 @@