Browse Source

resolve the conflict.

pull/3/MERGE
zhuangchong 4 years ago
parent
commit
ef9221b02c
  1. 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
  2. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
  3. 19
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue
  4. 6
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  5. 5
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
  6. 4
      e2e/src/test/java/org/apache/dolphinscheduler/data/security/TenantManageData.java

2
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java

@ -318,7 +318,7 @@ public class ResourcesService extends BaseService {
return result;
}
if (name.equals(resource.getAlias()) && desc.equals(resource.getDescription())) {
if (file == null && name.equals(resource.getAlias()) && desc.equals(resource.getDescription())) {
putMsg(result, Status.SUCCESS);
return result;
}

2
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue

@ -65,7 +65,7 @@
</th>
</tr>
<tr v-for="(item, $index) in list" :key="item.id">
<td width="50"><x-checkbox v-model="item.isCheck" :disabled="item.state === 'RUNNING_EXEUTION'" @on-change="_arrDelChange"></x-checkbox></td>
<td width="50"><x-checkbox v-model="item.isCheck" :disabled="item.state === 'RUNNING_EXEUTION' || item.state === 'READY_STOP' || item.state === 'READY_PAUSE'" @on-change="_arrDelChange"></x-checkbox></td>
<td width="50">
<span>{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}</span>
</td>

19
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue

@ -30,7 +30,7 @@
:disabled="item ? true : false"
v-model="tenantCode"
maxlength="60"
:placeholder="$t('Please enter name')">
:placeholder="$t('Please enter tenant code')">
</x-input>
</template>
</m-list-box-f>
@ -41,7 +41,7 @@
type="input"
v-model="tenantName"
maxlength="60"
:placeholder="$t('Please enter name')"
:placeholder="$t('Please enter tenant Name')"
autocomplete="off">
</x-input>
</template>
@ -88,7 +88,7 @@
store,
queueList: [],
queueId: '',
tenantCode: '',
tenantCode: null,
tenantName: '',
description: '',
}
@ -133,17 +133,20 @@
},
_verification () {
let isEn = /^[0-9a-zA-Z_.-]{1,}$/
let isNumber = /^\d+$/
let isComb =/^[0-9a-zA-Z]*$/g
if (!this.tenantCode.replace(/\s*/g,"")) {
this.$message.warning(`${i18n.$t('Please enter the tenant code in English')}`)
if(!isComb.test(this.tenantCode)) {
this.$message.warning(`${i18n.$t('The tenant code. Only letters or a combination of letters and numbers are allowed')}`)
return false
}
if (!isEn.test(this.tenantCode) || _.startsWith(this.tenantCode, '_', 0) || _.startsWith(this.tenantCode, '.', 0)) {
this.$message.warning(`${i18n.$t('Please enter tenant code in English')}`)
if(isNumber.test(this.tenantCode)) {
this.$message.warning(`${i18n.$t('The tenant code. Only letters or a combination of letters and numbers are allowed')}`)
return false
}
if (!this.tenantName.replace(/\s*/g,"")) {
this.$message.warning(`${i18n.$t('Please enter name')}`)
this.$message.warning(`${i18n.$t('Please enter tenant Name')}`)
return false
}
// Verify tenant name cannot contain special characters

6
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js

@ -173,8 +173,10 @@ export default {
'Tenant Name': 'Tenant Name',
Queue: 'Queue',
'Please select a queue': 'default is tenant association queue',
'Please enter the tenant code in English': 'Please enter the tenant code in English',
'Please enter tenant code in English': 'Please enter tenant code in English',
'Please enter tenant code': 'Please enter tenant code',
'Please enter tenant Name': 'Please enter tenant Name',
'The tenant code. Only letters or a combination of letters and numbers are allowed': 'The tenant code. Only letters or a combination of letters and numbers are allowed',
'The tenant code cannot be all numbers': 'The tenant code cannot be all numbers',
'Please enter tenant name without special characters': 'Please enter tenant name without special characters',
'Edit User': 'Edit User',
Tenant: 'Tenant',

5
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -176,8 +176,9 @@ export default {
'Tenant Code': '租户编码',
'Tenant Name': '租户名称',
Queue: '队列',
'Please enter the tenant code in English': '请输入租户编码只允许英文',
'Please enter tenant code in English': '请输入英文租户编码',
'Please enter tenant code': '请输入租户编码',
'Please enter tenant Name': '请输入租户名称',
'The tenant code. Only letters or a combination of letters and numbers are allowed': '租户编码只允许字母或字母与数字组合',
'Please enter tenant name without special characters': '请输入不包含特殊字符的租户名称',
'Edit User': '编辑用户',
Tenant: '租户',

4
e2e/src/test/java/org/apache/dolphinscheduler/data/security/TenantManageData.java

@ -25,12 +25,12 @@ public class TenantManageData {
/**
* Tenant Code
*/
public static final String TENANT_CODE = "selenium_tenant_code_1";
public static final String TENANT_CODE = "seleniumTenantCode1";
/**
* Tenant Name
*/
public static final String TENANT_NAME = "selenium_tenant_Name";
public static final String TENANT_NAME = "seleniumTenantName";
/**
* Queue

Loading…
Cancel
Save