实现完整的集群、域名同步

This commit is contained in:
GoEdgeLab
2020-11-14 21:28:14 +08:00
parent 28325f45a9
commit c1ec6a0319
17 changed files with 279 additions and 61 deletions

View File

@@ -68,10 +68,11 @@ func (this *ClusterAction) RunGet(params struct {
nodeMaps := []maps.Map{}
for _, node := range nodesResp.Nodes {
nodeMaps = append(nodeMaps, maps.Map{
"id": node.Id,
"name": node.Name,
"ipAddr": node.IpAddr,
"route": node.Route,
"id": node.Id,
"name": node.Name,
"ipAddr": node.IpAddr,
"route": node.Route,
"clusterId": node.ClusterId,
})
}
this.Data["nodes"] = nodeMaps
@@ -92,5 +93,13 @@ func (this *ClusterAction) RunGet(params struct {
}
this.Data["servers"] = serverMaps
// 检查解析记录是否有变化
checkChangesResp, err := this.RPC().NodeClusterRPC().CheckNodeClusterDNSChanges(this.AdminContext(), &pb.CheckNodeClusterDNSChangesRequest{NodeClusterId: params.ClusterId})
if err != nil {
this.ErrorPage(err)
return
}
this.Data["dnsHasChanges"] = checkChangesResp.IsChanged
this.Show()
}