[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
This commit is contained in:
kyoty 2021-07-14 13:51:10 +08:00 committed by GitHub
parent 00e76558be
commit 1f0c67bfb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 8 deletions

View File

@ -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());

View File

@ -61,7 +61,7 @@
<include refid="baseSqlV2">
<property name="alias" value="u"/>
</include>
,
,t.tenant_code,
case when u.queue <![CDATA[ <> ]]> '' 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

View File

@ -21,7 +21,7 @@
<m-list-box-f>
<template slot="name"><strong>*</strong>{{$t('Datasource')}}</template>
<template slot="content" size="small">
<el-select style="width: 100%;" v-model="type">
<el-select style="width: 100%;" v-model="type" :disabled="this.item.id">
<el-option v-for="item in datasourceTypeList" :key="item.value" :value="item.value" :label="item.label">
</el-option>
</el-select>

View File

@ -109,7 +109,7 @@
this.$message.warning(`${i18n.$t('Please enter group name')}`)
return false
}
if (this.alertInstanceIds) {
if (this.alertInstanceIds.length === 0) {
this.$message.warning(`${i18n.$t('Select Alarm plugin instance')}`)
return false
}

View File

@ -108,6 +108,10 @@
this.$message.warning(`${i18n.$t('Please generate token')}`)
return false
}
if (!this.expireTime) {
this.$message.warning(`${i18n.$t('Please Select token')}`)
return false
}
return true
},
_submit () {

View File

@ -579,6 +579,7 @@ export default {
'There is no data for this period of time': 'There is no data for this period of time',
'Worker addresses cannot be empty': 'Worker addresses cannot be empty',
'Please generate token': 'Please generate token',
'Please Select token': 'Please select the expiration time of token',
'Spark Version': 'Spark Version',
TargetDataBase: 'target database',
TargetTable: 'target table',

View File

@ -579,6 +579,7 @@ export default {
'There is no data for this period of time': '该时间段无数据',
'Worker addresses cannot be empty': 'Worker地址不能为空',
'Please generate token': '请生成Token',
'Please Select token': '请选择Token失效时间',
'Spark Version': 'Spark版本',
TargetDataBase: '目标库',
TargetTable: '目标表',