mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-14 12:20:27 +08:00
优化交互
This commit is contained in:
@@ -171,6 +171,7 @@ func (this *userMustAuth) BeforeAction(actionPtr actions.ActionWrapper, paramNam
|
|||||||
// 菜单配置
|
// 菜单配置
|
||||||
func (this *userMustAuth) modules(actionPtr actions.ActionWrapper, adminId int64) []maps.Map {
|
func (this *userMustAuth) modules(actionPtr actions.ActionWrapper, adminId int64) []maps.Map {
|
||||||
var countUnreadNodeLogs int64 = 0
|
var countUnreadNodeLogs int64 = 0
|
||||||
|
var nodeLogsType = ""
|
||||||
|
|
||||||
// 父级动作
|
// 父级动作
|
||||||
parentAction, ok := actionPtr.(actionutils.ActionInterface)
|
parentAction, ok := actionPtr.(actionutils.ActionInterface)
|
||||||
@@ -192,6 +193,7 @@ func (this *userMustAuth) modules(actionPtr actions.ActionWrapper, adminId int64
|
|||||||
if countUnreadNodeLogs >= 1000 {
|
if countUnreadNodeLogs >= 1000 {
|
||||||
countUnreadNodeLogs = 999
|
countUnreadNodeLogs = 999
|
||||||
}
|
}
|
||||||
|
nodeLogsType = "unread"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -268,7 +270,7 @@ func (this *userMustAuth) modules(actionPtr actions.ActionWrapper, adminId int64
|
|||||||
"subItems": []maps.Map{
|
"subItems": []maps.Map{
|
||||||
{
|
{
|
||||||
"name": "运行日志",
|
"name": "运行日志",
|
||||||
"url": "/clusters/logs",
|
"url": "/clusters/logs?type=" + nodeLogsType,
|
||||||
"code": "log",
|
"code": "log",
|
||||||
"badge": countUnreadNodeLogs,
|
"badge": countUnreadNodeLogs,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user