Browse Source

revert pr 3872

pull/3/MERGE
break60 4 years ago
parent
commit
8703b46fa0
  1. 11
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue
  2. 2
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  3. 2
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

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

@ -133,15 +133,14 @@
}, },
_verification () { _verification () {
let isEn = /^[0-9a-zA-Z_.-]{1,}$/ let isEn = /^[0-9a-zA-Z_.-]{1,}$/
let isNumber = /^\d+$/
let isComb =/^[0-9a-zA-Z]*$/g
if(!isComb.test(this.tenantCode)) { if (!this.tenantCode.replace(/\s*/g,"")) {
this.$message.warning(`${i18n.$t('The tenant code. Only letters or a combination of letters and numbers are allowed')}`) this.$message.warning(`${i18n.$t('Please enter the tenant code in English')}`)
return false return false
} }
if(isNumber.test(this.tenantCode)) {
this.$message.warning(`${i18n.$t('The tenant code. Only letters or a combination of letters and numbers are allowed')}`) if (!isEn.test(this.tenantCode) || _.startsWith(this.tenantCode, '_', 0) || _.startsWith(this.tenantCode, '.', 0)) {
this.$message.warning(`${i18n.$t('Please enter tenant code in English')}`)
return false return false
} }

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

@ -173,6 +173,8 @@ export default {
'Tenant Name': 'Tenant Name', 'Tenant Name': 'Tenant Name',
Queue: 'Queue', Queue: 'Queue',
'Please select a queue': 'default is tenant association 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 code': 'Please enter tenant code',
'Please enter tenant Name': 'Please enter tenant Name', '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. 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',

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

@ -176,6 +176,8 @@ export default {
'Tenant Code': '租户编码', 'Tenant Code': '租户编码',
'Tenant Name': '租户名称', 'Tenant Name': '租户名称',
Queue: '队列', Queue: '队列',
'Please enter the 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': '租户编码只允许字母或字母与数字组合',

Loading…
Cancel
Save