改进界面

This commit is contained in:
GoEdgeLab
2021-06-05 16:53:26 +08:00
parent 47edae4490
commit b0dedb653e
33 changed files with 575 additions and 115 deletions

View File

@@ -29,13 +29,7 @@ func (this *IndexAction) RunGet(params struct {
this.Data["searchType"] = params.SearchType
this.Data["isSearching"] = isSearching
// 搜索节点
if params.SearchType == "node" && len(params.Keyword) > 0 {
this.searchNodes(params.Keyword)
return
}
// 常用的节点
// 常用的集群
latestClusterMaps := []maps.Map{}
if !isSearching {
clustersResp, err := this.RPC().NodeClusterRPC().FindLatestNodeClusters(this.AdminContext(), &pb.FindLatestNodeClustersRequest{Size: 6})
@@ -52,6 +46,12 @@ func (this *IndexAction) RunGet(params struct {
}
this.Data["latestClusters"] = latestClusterMaps
// 搜索节点
if params.SearchType == "node" && len(params.Keyword) > 0 {
this.searchNodes(params.Keyword)
return
}
// 搜索集群
countResp, err := this.RPC().NodeClusterRPC().CountAllEnabledNodeClusters(this.AdminContext(), &pb.CountAllEnabledNodeClustersRequest{
Keyword: params.Keyword,