From 2ca31ffcb4e68311b88615fb7a947abccf3b721e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sun, 31 Jan 2021 16:09:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=98=BE=E7=A4=BA=E6=97=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E7=BA=BF=E8=B7=AF=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/actions/default/clusters/cluster/node/node.go | 6 ++++++ web/views/@default/clusters/cluster/node/node.html | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/internal/web/actions/default/clusters/cluster/node/node.go b/internal/web/actions/default/clusters/cluster/node/node.go index d0dbb198..2d7edee0 100644 --- a/internal/web/actions/default/clusters/cluster/node/node.go +++ b/internal/web/actions/default/clusters/cluster/node/node.go @@ -89,6 +89,12 @@ func (this *NodeAction) RunGet(params struct { }) } } + if len(dnsRouteMaps) == 0 { + dnsRouteMaps = append(dnsRouteMaps, maps.Map{ + "name": "", + "code": "", + }) + } this.Data["dnsRoutes"] = dnsRouteMaps this.Data["dnsRecordName"] = recordName this.Data["dnsRecordValue"] = recordValue diff --git a/web/views/@default/clusters/cluster/node/node.html b/web/views/@default/clusters/cluster/node/node.html index 409b7a8d..36cd3af1 100644 --- a/web/views/@default/clusters/cluster/node/node.html +++ b/web/views/@default/clusters/cluster/node/node.html @@ -29,7 +29,7 @@ - + DNS线路 {{route.name}} @@ -51,7 +51,10 @@ {{dnsRecordName}} A - {{route.name}} + + {{route.name}} + 默认 + {{address.ip}}