mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 05:30:27 +08:00
[集群]显示集群有节点需要升级
This commit is contained in:
@@ -54,6 +54,13 @@ func (this *IndexAction) RunGet(params struct{}) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 需要升级的节点
|
||||||
|
countUpgradeNodesResp, err := this.RPC().NodeRPC().CountAllUpgradeNodesWithClusterId(this.AdminContext(), &pb.CountAllUpgradeNodesWithClusterIdRequest{ClusterId: cluster.Id})
|
||||||
|
if err != nil {
|
||||||
|
this.ErrorPage(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// DNS
|
// DNS
|
||||||
dnsDomainName := ""
|
dnsDomainName := ""
|
||||||
if cluster.DnsDomainId > 0 {
|
if cluster.DnsDomainId > 0 {
|
||||||
@@ -68,14 +75,15 @@ func (this *IndexAction) RunGet(params struct{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clusterMaps = append(clusterMaps, maps.Map{
|
clusterMaps = append(clusterMaps, maps.Map{
|
||||||
"id": cluster.Id,
|
"id": cluster.Id,
|
||||||
"name": cluster.Name,
|
"name": cluster.Name,
|
||||||
"installDir": cluster.InstallDir,
|
"installDir": cluster.InstallDir,
|
||||||
"countAllNodes": countNodesResp.Count,
|
"countAllNodes": countNodesResp.Count,
|
||||||
"countActiveNodes": countActiveNodesResp.Count,
|
"countActiveNodes": countActiveNodesResp.Count,
|
||||||
"dnsDomainId": cluster.DnsDomainId,
|
"countUpgradeNodes": countUpgradeNodesResp.Count,
|
||||||
"dnsName": cluster.DnsName,
|
"dnsDomainId": cluster.DnsDomainId,
|
||||||
"dnsDomainName": dnsDomainName,
|
"dnsName": cluster.DnsName,
|
||||||
|
"dnsDomainName": dnsDomainName,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>集群名称</th>
|
<th>集群名称</th>
|
||||||
<th class="center">节点数量</th>
|
<th class="center width10">节点数量</th>
|
||||||
<th class="center">在线节点数量</th>
|
<th class="center width10">在线节点数量</th>
|
||||||
<th>DNS域名</th>
|
<th>DNS域名</th>
|
||||||
<th class="two op">操作</th>
|
<th class="two op">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -18,6 +18,10 @@
|
|||||||
<td class="center">
|
<td class="center">
|
||||||
<a :href="'/clusters/cluster?clusterId=' + cluster.id" v-if="cluster.countAllNodes > 0"><span :class="{red:cluster.countAllNodes > cluster.countActiveNodes}">{{cluster.countAllNodes}}</span></a>
|
<a :href="'/clusters/cluster?clusterId=' + cluster.id" v-if="cluster.countAllNodes > 0"><span :class="{red:cluster.countAllNodes > cluster.countActiveNodes}">{{cluster.countAllNodes}}</span></a>
|
||||||
<span class="disabled" v-else="">-</span>
|
<span class="disabled" v-else="">-</span>
|
||||||
|
|
||||||
|
<div v-if="cluster.countUpgradeNodes > 0" style="margin-top:0.5em">
|
||||||
|
<a :href="'/clusters/cluster/upgradeRemote?clusterId=' + cluster.id" title="点击进入远程升级页面"><span class="red">有节点需要升级</span></a>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<a :href="'/clusters/cluster?clusterId=' + cluster.id + '&activeState=1'" v-if="cluster.countActiveNodes > 0"><span class="green">{{cluster.countActiveNodes}}</span></a>
|
<a :href="'/clusters/cluster?clusterId=' + cluster.id + '&activeState=1'" v-if="cluster.countActiveNodes > 0"><span class="green">{{cluster.countActiveNodes}}</span></a>
|
||||||
|
|||||||
Reference in New Issue
Block a user