单个节点支持多个DNS线路

This commit is contained in:
GoEdgeLab
2020-11-16 13:03:45 +08:00
parent 4d0f3611a5
commit 71c682470c
43 changed files with 348 additions and 124 deletions

View File

@@ -76,8 +76,8 @@ func (this *CreateNodeAction) RunPost(params struct {
SshHost string
SshPort int
DnsDomainId int64
DnsRoute string
DnsDomainId int64
DnsRoutesJSON []byte
Must *actions.Must
}) {
@@ -94,6 +94,13 @@ func (this *CreateNodeAction) RunPost(params struct {
this.Fail("请选择所在集群")
}
dnsRouteCodes := []string{}
err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)
if err != nil {
this.ErrorPage(err)
return
}
// TODO 检查登录授权
loginInfo := &pb.NodeLogin{
Id: 0,
@@ -113,7 +120,7 @@ func (this *CreateNodeAction) RunPost(params struct {
GroupId: params.GroupId,
Login: loginInfo,
DnsDomainId: params.DnsDomainId,
DnsRoute: params.DnsRoute,
DnsRoutes: dnsRouteCodes,
})
if err != nil {
this.ErrorPage(err)