Browse Source

[Fix-14488][UI] When creating a tenant add the strong validation of its tenant code. (#14492)

3.2.1-prepare
calvin 1 year ago committed by GitHub
parent
commit
cb0866ca9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-ui/src/locales/en_US/security.ts
  2. 1
      dolphinscheduler-ui/src/locales/zh_CN/security.ts
  3. 3
      dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts

1
dolphinscheduler-ui/src/locales/en_US/security.ts

@ -28,6 +28,7 @@ export default {
actions: 'Operation',
edit_tenant: 'Edit Tenant',
tenant_code_tips: 'Please enter the operating system tenant',
tenant_code_invalid_tips: 'The tenant code is invalid.',
queue_name_tips: 'Please select queue',
description_tips: 'Please enter a description',
delete_confirm: 'Delete?',

1
dolphinscheduler-ui/src/locales/zh_CN/security.ts

@ -28,6 +28,7 @@ export default {
actions: '操作',
edit_tenant: '编辑租户',
tenant_code_tips: '请输入操作系统租户',
tenant_code_invalid_tips: '操作系统租户名称含有非法字符',
queue_name_tips: '请选择队列',
description_tips: '请输入描述',
delete_confirm: '确定删除吗?',

3
dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts

@ -47,6 +47,9 @@ export function useModalData(
if (!variables.model.tenantCode) {
return new Error(t('security.tenant.tenant_code_tips'))
}
if (variables.model.tenantCode.search('[^-._a-zA-Z0-9]') !== -1) {
return new Error(t('security.tenant.tenant_code_invalid_tips'))
}
}
},
queueId: {

Loading…
Cancel
Save