优化界面

This commit is contained in:
GoEdgeLab
2022-03-17 10:36:30 +08:00
parent 3351c6bb6a
commit a218417688
3 changed files with 18 additions and 1 deletions

View File

@@ -27,6 +27,14 @@ func (this *CreateAction) RunGet(params struct{}) {
}
this.Data["hasDomains"] = hasDomainsResp.Exist
// 集群总数
totalResp, err := this.RPC().NodeClusterRPC().CountAllEnabledNodeClusters(this.AdminContext(), &pb.CountAllEnabledNodeClustersRequest{})
if err != nil {
this.ErrorPage(err)
return
}
this.Data["totalNodeClusters"] = totalResp.Count
this.Show()
}

View File

@@ -29,6 +29,14 @@ func (this *IndexAction) RunGet(params struct {
this.Data["searchType"] = params.SearchType
this.Data["isSearching"] = isSearching
// 集群总数
totalResp, err := this.RPC().NodeClusterRPC().CountAllEnabledNodeClusters(this.AdminContext(), &pb.CountAllEnabledNodeClustersRequest{})
if err != nil {
this.ErrorPage(err)
return
}
this.Data["totalNodeClusters"] = totalResp.Count
// 常用的集群
latestClusterMaps := []maps.Map{}
if !isSearching {