diff --git a/cmd/command/main.go b/cmd/command/main.go index 7a1a2410..c6234a9c 100644 --- a/cmd/command/main.go +++ b/cmd/command/main.go @@ -206,7 +206,9 @@ func list() { func login() { if err := action.Login(); err != nil { logUtils.ExecConsole(color.FgRed, i118Utils.Sprintf("login_fail")) + return } + logUtils.ExecConsole(color.FgGreen, i118Utils.Sprintf("login_success")) } func view() { diff --git a/internal/command/action/login.go b/internal/command/action/login.go index c9372608..5db017ad 100644 --- a/internal/command/action/login.go +++ b/internal/command/action/login.go @@ -9,7 +9,7 @@ import ( ) func Login() error { - logUtils.Info(i118Utils.Sprintf("only_test_auth_login")) config := configHelper.LoadByWorkspacePath(commConsts.ZtfDir) + logUtils.Info(i118Utils.Sprintf("only_test_auth_login", config.Username, config.Url)) return zentaoHelper.Login(config) } diff --git a/res/server/en/messages.json b/res/server/en/messages.json index df7bf1ac..72269f3d 100644 --- a/res/server/en/messages.json +++ b/res/server/en/messages.json @@ -560,7 +560,11 @@ }, { "id": "only_test_auth_login", - "translation": "Only test auth login." + "translation": "Only test auth [%s] login: %s." + }, + { + "id": "login_success", + "translation": "Login success." }, { "id": "login_fail", diff --git a/res/server/zh/messages.json b/res/server/zh/messages.json index 0d63fe19..4b1ec87a 100644 --- a/res/server/zh/messages.json +++ b/res/server/zh/messages.json @@ -557,7 +557,11 @@ }, { "id": "only_test_auth_login", - "translation": "仅仅测试登录" + "translation": "使用账号 %s 测试 %s登录接口是否正常" + }, + { + "id": "login_success", + "translation": "客户端与禅道通信正常, 请排查是否有权限限制" }, { "id": "login_fail",