优化界面

This commit is contained in:
GoEdgeLab
2020-12-23 19:44:10 +08:00
parent cb006446a3
commit 119882b6d7
14 changed files with 92 additions and 32 deletions

View File

@@ -224,6 +224,19 @@ func (this *UpdateAction) RunPost(params struct {
this.Fail("请选择所在集群")
}
// IP地址
ipAddresses := []maps.Map{}
if len(params.IPAddressesJSON) > 0 {
err := json.Unmarshal(params.IPAddressesJSON, &ipAddresses)
if err != nil {
this.ErrorPage(err)
return
}
}
if len(ipAddresses) == 0 {
this.Fail("请至少输入一个IP地址")
}
dnsRouteCodes := []string{}
if len(params.DnsRoutesJSON) > 0 {
err := json.Unmarshal(params.DnsRoutesJSON, &dnsRouteCodes)