节点IP增加是否启用、是否在线状态

This commit is contained in:
GoEdgeLab
2021-08-18 09:24:03 +08:00
parent 99c0b58924
commit 55192c6f7b
13 changed files with 70 additions and 16 deletions

View File

@@ -84,6 +84,8 @@ func (this *DetailAction) RunGet(params struct {
"name": addr.Name,
"ip": addr.Ip,
"canAccess": addr.CanAccess,
"isOn": addr.IsOn,
"isUp": addr.IsUp,
})
}
@@ -121,7 +123,7 @@ func (this *DetailAction) RunGet(params struct {
}
for _, addr := range ipAddresses {
if !addr.CanAccess {
if !addr.CanAccess || !addr.IsUp || !addr.IsOn {
continue
}
for _, route := range dnsInfo.Routes {

View File

@@ -62,6 +62,8 @@ func (this *UpdateAction) RunGet(params struct {
"name": addr.Name,
"ip": addr.Ip,
"canAccess": addr.CanAccess,
"isOn": addr.IsOn,
"isUp": addr.IsUp,
})
}