From 3392ac1fa82dd46c52bcbefabc638b672b0193d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 20 Oct 2021 09:59:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/helpers/user_must_auth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/web/helpers/user_must_auth.go b/internal/web/helpers/user_must_auth.go index d13f8e97..aedb7673 100644 --- a/internal/web/helpers/user_must_auth.go +++ b/internal/web/helpers/user_must_auth.go @@ -171,6 +171,7 @@ func (this *userMustAuth) BeforeAction(actionPtr actions.ActionWrapper, paramNam // 菜单配置 func (this *userMustAuth) modules(actionPtr actions.ActionWrapper, adminId int64) []maps.Map { var countUnreadNodeLogs int64 = 0 + var nodeLogsType = "" // 父级动作 parentAction, ok := actionPtr.(actionutils.ActionInterface) @@ -192,6 +193,7 @@ func (this *userMustAuth) modules(actionPtr actions.ActionWrapper, adminId int64 if countUnreadNodeLogs >= 1000 { countUnreadNodeLogs = 999 } + nodeLogsType = "unread" } } } @@ -268,7 +270,7 @@ func (this *userMustAuth) modules(actionPtr actions.ActionWrapper, adminId int64 "subItems": []maps.Map{ { "name": "运行日志", - "url": "/clusters/logs", + "url": "/clusters/logs?type=" + nodeLogsType, "code": "log", "badge": countUnreadNodeLogs, },