Browse Source

Merge pull request #3870 from zhuangchong/1.3.3-bug-ui-fix-3835

[1.3.3-release][fix-3835][ui] When the tenantName contains "<", the tenant drop-down list is blankadd verify tenant name cannot contain special characters.
pull/3/MERGE
xingchun-chen 4 years ago committed by GitHub
parent
commit
e8db263d68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue
  2. 1
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  3. 1
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

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

@ -149,6 +149,13 @@
this.$message.warning(`${i18n.$t('Please enter tenant Name')}`) this.$message.warning(`${i18n.$t('Please enter tenant Name')}`)
return false return false
} }
// Verify tenant name cannot contain special characters
let isSpecial = /[~#^$@%&!*()<>《》:;'"{}【】 ]/gi
if (isSpecial.test(this.tenantName)) {
this.$message.warning(`${i18n.$t('Please enter tenant name without special characters')}`)
return false
}
return true return true
}, },
_submit () { _submit () {
@ -195,4 +202,4 @@
}, },
components: { mPopup, mListBoxF } components: { mPopup, mListBoxF }
} }
</script> </script>

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

@ -177,6 +177,7 @@ export default {
'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',
'The tenant code cannot be all numbers': 'The tenant code cannot be all numbers', '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', 'Edit User': 'Edit User',
Tenant: 'Tenant', Tenant: 'Tenant',
Email: 'Email', Email: 'Email',

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

@ -179,6 +179,7 @@ export default {
'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': '租户编码只允许字母或字母与数字组合',
'Please enter tenant name without special characters': '请输入不包含特殊字符的租户名称',
'Edit User': '编辑用户', 'Edit User': '编辑用户',
Tenant: '租户', Tenant: '租户',
Email: '邮件', Email: '邮件',

Loading…
Cancel
Save