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