mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-02 03:40:27 +08:00
IP检查也支持灰名单
This commit is contained in:
@@ -66,6 +66,7 @@ func (this *TestAction) RunPost(params struct {
|
||||
"expiredTime": timeutil.FormatTime("Y-m-d H:i:s", resp.IpItem.ExpiredAt),
|
||||
"type": resp.IpItem.Type,
|
||||
"eventLevelName": firewallconfigs.FindFirewallEventLevelName(resp.IpItem.EventLevel),
|
||||
"listType": resp.IpItem.ListType,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ func (this *TestAction) RunPost(params struct {
|
||||
"expiredTime": timeutil.FormatTime("Y-m-d H:i:s", resp.IpItem.ExpiredAt),
|
||||
"type": resp.IpItem.Type,
|
||||
"eventLevelName": firewallconfigs.FindFirewallEventLevelName(resp.IpItem.EventLevel),
|
||||
"listType": resp.IpItem.ListType,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ func (this *TestAction) RunPost(params struct {
|
||||
return
|
||||
}
|
||||
|
||||
resultMap := maps.Map{
|
||||
var resultMap = maps.Map{
|
||||
"isDone": true,
|
||||
"isFound": resp.IsFound,
|
||||
"isOk": resp.IsOk,
|
||||
@@ -67,6 +67,7 @@ func (this *TestAction) RunPost(params struct {
|
||||
"expiredTime": timeutil.FormatTime("Y-m-d H:i:s", resp.IpItem.ExpiredAt),
|
||||
"type": resp.IpItem.Type,
|
||||
"eventLevelName": firewallconfigs.FindFirewallEventLevelName(resp.IpItem.EventLevel),
|
||||
"listType": resp.IpItem.ListType,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ func (this *TestAction) RunPost(params struct {
|
||||
return
|
||||
}
|
||||
|
||||
resultMap := maps.Map{
|
||||
var resultMap = maps.Map{
|
||||
"isDone": true,
|
||||
"isFound": resp.IsFound,
|
||||
"isOk": resp.IsOk,
|
||||
@@ -79,6 +79,7 @@ func (this *TestAction) RunPost(params struct {
|
||||
"expiredTime": timeutil.FormatTime("Y-m-d H:i:s", resp.IpItem.ExpiredAt),
|
||||
"type": resp.IpItem.Type,
|
||||
"eventLevelName": firewallconfigs.FindFirewallEventLevelName(resp.IpItem.EventLevel),
|
||||
"listType": resp.IpItem.ListType,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
<div v-if="result.isFound">
|
||||
<div v-if="result.item != null">
|
||||
<div v-if="result.isAllowed">
|
||||
<span class="green">在白名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
<span class="green" v-if="result.item.listType == 'white'">在白名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
<span class="grey" v-if="result.item.listType == 'grey'">在灰名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span class="red">在黑名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
<div v-if="result.isFound">
|
||||
<div v-if="result.item != null">
|
||||
<div v-if="result.isAllowed">
|
||||
<span class="green">在白名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
<span class="green" v-if="result.item.listType == 'white'">在白名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
<span class="grey" v-if="result.item.listType == 'grey'">在灰名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span class="red">在黑名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
<div v-if="result.isFound">
|
||||
<div v-if="result.item != null">
|
||||
<div v-if="result.isAllowed">
|
||||
<span class="green">在白名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
<span class="green" v-if="result.item.listType == 'white'">在白名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
<span class="grey" v-if="result.item.listType == 'grey'">在灰名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span class="red">在黑名单中 <ip-item-text :v-item="result.item"></ip-item-text> <a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
|
||||
|
||||
Reference in New Issue
Block a user