mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 05:00:25 +08:00
单个节点支持多个DNS线路
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user