运行日志可以使用集群、节点筛选

This commit is contained in:
GoEdgeLab
2022-01-11 14:59:19 +08:00
parent bad5856c0f
commit 97e8d8bd26
12 changed files with 102 additions and 73 deletions

View File

@@ -7,7 +7,6 @@ import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/lists"
"github.com/iwind/TeaGo/maps"
timeutil "github.com/iwind/TeaGo/utils/time"
"regexp"
"strings"
@@ -153,20 +152,5 @@ func (this *IndexAction) RunGet(params struct {
}
this.Data["regions"] = regionMap
// 集群列表
var clusterMaps = []maps.Map{}
clusterResp, err := this.RPC().NodeClusterRPC().FindAllEnabledNodeClusters(this.AdminContext(), &pb.FindAllEnabledNodeClustersRequest{})
if err != nil {
this.ErrorPage(err)
return
}
for _, cluster := range clusterResp.NodeClusters {
clusterMaps = append(clusterMaps, maps.Map{
"id": cluster.Id,
"name": cluster.Name,
})
}
this.Data["clusters"] = clusterMaps
this.Show()
}