[集群]显示集群有节点需要升级

This commit is contained in:
GoEdgeLab
2020-11-27 10:41:54 +08:00
parent edf34e0d0e
commit 037d4b8c22
2 changed files with 22 additions and 10 deletions

View File

@@ -54,6 +54,13 @@ func (this *IndexAction) RunGet(params struct{}) {
return
}
// 需要升级的节点
countUpgradeNodesResp, err := this.RPC().NodeRPC().CountAllUpgradeNodesWithClusterId(this.AdminContext(), &pb.CountAllUpgradeNodesWithClusterIdRequest{ClusterId: cluster.Id})
if err != nil {
this.ErrorPage(err)
return
}
// DNS
dnsDomainName := ""
if cluster.DnsDomainId > 0 {
@@ -68,14 +75,15 @@ func (this *IndexAction) RunGet(params struct{}) {
}
clusterMaps = append(clusterMaps, maps.Map{
"id": cluster.Id,
"name": cluster.Name,
"installDir": cluster.InstallDir,
"countAllNodes": countNodesResp.Count,
"countActiveNodes": countActiveNodesResp.Count,
"dnsDomainId": cluster.DnsDomainId,
"dnsName": cluster.DnsName,
"dnsDomainName": dnsDomainName,
"id": cluster.Id,
"name": cluster.Name,
"installDir": cluster.InstallDir,
"countAllNodes": countNodesResp.Count,
"countActiveNodes": countActiveNodesResp.Count,
"countUpgradeNodes": countUpgradeNodesResp.Count,
"dnsDomainId": cluster.DnsDomainId,
"dnsName": cluster.DnsName,
"dnsDomainName": dnsDomainName,
})
}
}