单个节点支持多个DNS线路

This commit is contained in:
刘祥超
2020-11-16 13:03:45 +08:00
parent 8abf806ce9
commit b466868da1
43 changed files with 348 additions and 124 deletions

View File

@@ -70,6 +70,21 @@ func (this *NodeAction) RunGet(params struct {
})
}
// DNS相关
dnsInfoResp, err := this.RPC().NodeRPC().FindEnabledNodeDNS(this.AdminContext(), &pb.FindEnabledNodeDNSRequest{NodeId: params.NodeId})
if err != nil {
this.ErrorPage(err)
return
}
dnsRouteMaps := []maps.Map{}
for _, dnsInfo := range dnsInfoResp.Node.Routes {
dnsRouteMaps = append(dnsRouteMaps, maps.Map{
"name": dnsInfo.Name,
"code": dnsInfo.Code,
})
}
this.Data["dnsRoutes"] = dnsRouteMaps
// 登录信息
var loginMap maps.Map = nil
if node.Login != nil {