mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 05:00:25 +08:00
看板增加离线节点数字
This commit is contained in:
@@ -33,7 +33,9 @@ func (this *AdvancedHelper) BeforeAction(actionPtr actions.ActionWrapper) (goNex
|
||||
if configloaders.AllowModule(adminId, configloaders.AdminModuleCodeSetting) {
|
||||
tabbar.Add("数据库", "", "/settings/database", "", this.tab == "database")
|
||||
tabbar.Add("API节点", "", "/api", "", this.tab == "apiNodes")
|
||||
tabbar.Add("用户节点", "", "/settings/userNodes", "", this.tab == "userNodes")
|
||||
if teaconst.IsPlus {
|
||||
tabbar.Add("用户节点", "", "/settings/userNodes", "", this.tab == "userNodes")
|
||||
}
|
||||
tabbar.Add("日志数据库", "", "/db", "", this.tab == "dbNodes")
|
||||
if teaconst.IsPlus {
|
||||
tabbar.Add("监控节点", "", "/settings/monitorNodes", "", this.tab == "monitorNodes")
|
||||
|
||||
@@ -3,6 +3,7 @@ package usernodes
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
@@ -20,6 +21,11 @@ func (this *IndexAction) Init() {
|
||||
}
|
||||
|
||||
func (this *IndexAction) RunGet(params struct{}) {
|
||||
if !teaconst.IsPlus {
|
||||
this.RedirectURL("/")
|
||||
return
|
||||
}
|
||||
|
||||
countResp, err := this.RPC().UserNodeRPC().CountAllEnabledUserNodes(this.AdminContext(), &pb.CountAllEnabledUserNodesRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
Reference in New Issue
Block a user