节点根据健康检查自动上下线

This commit is contained in:
刘祥超
2020-11-15 21:17:52 +08:00
parent e09f1575b4
commit 120aff71a5
17 changed files with 213 additions and 48 deletions

View File

@@ -29,6 +29,8 @@ func (this *UpdateClusterPopupAction) RunGet(params struct {
return
}
this.Data["dnsName"] = dnsResp.Name
this.Data["nodesAutoSync"] = dnsResp.NodesAutoSync
this.Data["serversAutoSync"] = dnsResp.ServersAutoSync
if dnsResp.Domain != nil {
this.Data["domainId"] = dnsResp.Domain.Id
this.Data["domain"] = dnsResp.Domain.Name
@@ -63,9 +65,11 @@ func (this *UpdateClusterPopupAction) RunGet(params struct {
}
func (this *UpdateClusterPopupAction) RunPost(params struct {
ClusterId int64
DnsName string
DomainId int64
ClusterId int64
DnsName string
DomainId int64
NodesAutoSync bool
ServersAutoSync bool
Must *actions.Must
CSRF *actionutils.CSRF
@@ -94,9 +98,11 @@ func (this *UpdateClusterPopupAction) RunPost(params struct {
}
_, err = this.RPC().NodeClusterRPC().UpdateNodeClusterDNS(this.AdminContext(), &pb.UpdateNodeClusterDNSRequest{
NodeClusterId: params.ClusterId,
DnsName: params.DnsName,
DnsDomainId: params.DomainId,
NodeClusterId: params.ClusterId,
DnsName: params.DnsName,
DnsDomainId: params.DomainId,
NodesAutoSync: params.NodesAutoSync,
ServersAutoSync: params.ServersAutoSync,
})
if err != nil {
this.ErrorPage(err)