实现节点看板(仅对企业版开放)

This commit is contained in:
刘祥超
2021-07-06 20:06:20 +08:00
parent 3cf43b2cc1
commit e93aecabb4
34 changed files with 1313 additions and 296 deletions

View File

@@ -4,6 +4,7 @@ package thresholds
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/node/nodeutils"
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/maps"
@@ -23,6 +24,13 @@ func (this *IndexAction) RunGet(params struct {
}) {
this.Data["nodeId"] = params.NodeId
// 初始化节点信息(用于菜单)
err := nodeutils.InitNodeInfo(this, params.NodeId)
if err != nil {
this.ErrorPage(err)
return
}
// 列出所有阈值
thresholdsResp, err := this.RPC().NodeThresholdRPC().FindAllEnabledNodeThresholds(this.AdminContext(), &pb.FindAllEnabledNodeThresholdsRequest{
Role: "node",