This is an automated email from the ASF dual-hosted git repository.

aloyszhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new b25f070ce0 [INLONG-11772][Dashboard][Manager] Fix login verify fail 
(#11773)
b25f070ce0 is described below

commit b25f070ce026e4d38e9a5c774cd3ea378e05a3de
Author: James Zow <[email protected]>
AuthorDate: Wed Feb 26 09:49:36 2025 +0800

    [INLONG-11772][Dashboard][Manager] Fix login verify fail (#11773)
---
 inlong-dashboard/src/ui/locales/cn.json       |  2 ++
 inlong-dashboard/src/ui/locales/en.json       |  2 ++
 inlong-dashboard/src/ui/pages/Login/index.tsx | 10 ++++++++--
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/inlong-dashboard/src/ui/locales/cn.json 
b/inlong-dashboard/src/ui/locales/cn.json
index 598e1be34e..26dac255ae 100644
--- a/inlong-dashboard/src/ui/locales/cn.json
+++ b/inlong-dashboard/src/ui/locales/cn.json
@@ -913,9 +913,11 @@
   "pages.ClusterTags.TagPlaceholder": "请输入标签",
   "pages.ClusterTags.TenantPlaceholder": "请选择租户",
   "pages.Login.PleaseEnterUserName": "请输入用户名",
+  "pages.Login.UserNameSpaceNotAllowed": "用户名不能包含空格,请删除空格后重试",
   "pages.Login.PasswordRules": "只能包含字母、数字、中划线、下划线、@",
   "pages.Login.Login": "登录",
   "pages.Login.PleaseEnterYourPassword": "请输入密码",
+  "pages.Login.UserPasswordSpaceNotAllowed": "密码不能包含空格,请删除空格后重试",
   "pages.UserManagement.DetailModal.Day": "天",
   "pages.UserManagement.DetailModal.New": "新建",
   "pages.UserManagement.DetailModal.UserPassword": "用户密码",
diff --git a/inlong-dashboard/src/ui/locales/en.json 
b/inlong-dashboard/src/ui/locales/en.json
index 25878c36ee..f6244380d3 100644
--- a/inlong-dashboard/src/ui/locales/en.json
+++ b/inlong-dashboard/src/ui/locales/en.json
@@ -907,9 +907,11 @@
   "pages.ClusterTags.TagPlaceholder": "Please enter a tag",
   "pages.ClusterTags.TenantPlaceholder": "Please select a tenant",
   "pages.Login.PleaseEnterUserName": "Please enter user name",
+  "pages.Login.UserNameSpaceNotAllowed": "The username cannot contain spaces, 
please remove any spaces and try again",
   "pages.Login.PasswordRules": "Only letters, numbers, minus, @, and 
underscores",
   "pages.Login.Login": "Login",
   "pages.Login.PleaseEnterYourPassword": "Please enter your password",
+  "pages.Login.UserPasswordSpaceNotAllowed": "The username cannot contain 
spaces, please remove any spaces and try again",
   "pages.UserManagement.DetailModal.Day": "Days",
   "pages.UserManagement.DetailModal.New": "New construction",
   "pages.UserManagement.DetailModal.UserPassword": "Password",
diff --git a/inlong-dashboard/src/ui/pages/Login/index.tsx 
b/inlong-dashboard/src/ui/pages/Login/index.tsx
index ccbd3e2a86..a2aa90ab50 100644
--- a/inlong-dashboard/src/ui/pages/Login/index.tsx
+++ b/inlong-dashboard/src/ui/pages/Login/index.tsx
@@ -39,7 +39,10 @@ const Comp: React.FC = () => {
         size: 'large',
         prefix: <UserOutlined />,
       },
-      rules: [{ required: true, message: t('pages.Login.PleaseEnterUserName') 
}],
+      rules: [
+        { required: true, message: t('pages.Login.PleaseEnterUserName') },
+        { pattern: /^\S+$/, message: t('pages.Login.UserNameSpaceNotAllowed') 
},
+      ],
     },
     {
       type: 'password',
@@ -49,7 +52,10 @@ const Comp: React.FC = () => {
         size: 'large',
         prefix: <LockOutlined />,
       },
-      rules: [{ required: true, message: 
t('pages.Login.PleaseEnterYourPassword') }],
+      rules: [
+        { required: true, message: t('pages.Login.PleaseEnterYourPassword') },
+        { pattern: /^\S+$/, message: 
t('pages.Login.UserPasswordSpaceNotAllowed') },
+      ],
     },
   ];
 

Reply via email to