mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 04:54:32 +08:00
优化界面
This commit is contained in:
@@ -27,6 +27,14 @@ func (this *CreateAction) RunGet(params struct{}) {
|
|||||||
}
|
}
|
||||||
this.Data["hasDomains"] = hasDomainsResp.Exist
|
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()
|
this.Show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,14 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
this.Data["searchType"] = params.SearchType
|
this.Data["searchType"] = params.SearchType
|
||||||
this.Data["isSearching"] = isSearching
|
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{}
|
latestClusterMaps := []maps.Map{}
|
||||||
if !isSearching {
|
if !isSearching {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<first-menu>
|
<first-menu>
|
||||||
<menu-item href="/clusters" code="index">集群列表</menu-item>
|
<menu-item href="/clusters" code="index">集群列表({{totalNodeClusters}})</menu-item>
|
||||||
|
|
||||||
<menu-item href="/clusters/create" code="create">创建集群</menu-item>
|
<menu-item href="/clusters/create" code="create">创建集群</menu-item>
|
||||||
</first-menu>
|
</first-menu>
|
||||||
|
|||||||
Reference in New Issue
Block a user