IP测试时同时也检查绑定的IP名单

This commit is contained in:
GoEdgeLab
2021-07-13 15:50:09 +08:00
parent fc66d527c9
commit bc72b9005d
9 changed files with 56 additions and 57 deletions

View File

@@ -29,7 +29,7 @@ Vue.component("tip-message-box", {
}, },
template: `<div class="ui icon message" v-if="visible"> template: `<div class="ui icon message" v-if="visible">
<i class="icon info circle"></i> <i class="icon info circle"></i>
<i class="close icon" title="取消" @click.prevent="close"></i> <i class="close icon" title="取消" @click.prevent="close" style="margin-top: 1em"></i>
<div class="content"> <div class="content">
<slot></slot> <slot></slot>
</div> </div>

View File

@@ -55,7 +55,7 @@ Vue.component("ip-list-bind-box", {
template: `<div> template: `<div>
<a href="" @click.prevent="bind()">绑定+</a> &nbsp; <span v-if="lists.length > 0"><span class="disabled small">|&nbsp;</span> 已绑定:</span> <a href="" @click.prevent="bind()">绑定+</a> &nbsp; <span v-if="lists.length > 0"><span class="disabled small">|&nbsp;</span> 已绑定:</span>
<div class="ui label basic small" v-for="(list, index) in lists"> <div class="ui label basic small" v-for="(list, index) in lists">
{{list.name}} <a :href="'/servers/iplists/list?listId=' + list.id" title="点击查看详情" style="opacity: 1">{{list.name}}</a>
<a href="" title="删除" @click.prevent="remove(index, list.id)"><i class="icon remove small"></i></a> <a href="" title="删除" @click.prevent="remove(index, list.id)"><i class="icon remove small"></i></a>
</div> </div>
</div>` </div>`

View File

@@ -1,7 +1,7 @@
.ui.message a .icon { .ui.message a .icon {
position: absolute; position: absolute;
right: 1em; right: 1em;
top: 1.8em; top: 2.8em;
} }
.grid { .grid {
margin-top: 2em !important; margin-top: 2em !important;

View File

@@ -3,7 +3,7 @@
.icon { .icon {
position: absolute; position: absolute;
right: 1em; right: 1em;
top: 1.8em; top: 2.8em;
} }
} }
} }

View File

@@ -1,7 +1,7 @@
.ui.message a .icon { .ui.message a .icon {
position: absolute; position: absolute;
right: 1em; right: 1em;
top: 1.8em; top: 2.8em;
} }
.grid { .grid {
margin-top: 2em !important; margin-top: 2em !important;

View File

@@ -3,7 +3,7 @@
.icon { .icon {
position: absolute; position: absolute;
right: 1em; right: 1em;
top: 1.8em; top: 2.8em;
} }
} }
} }

View File

@@ -1,5 +1,4 @@
{$layout} {$layout}
{$template "../waf_menu"} {$template "../waf_menu"}
{$template "menu"} {$template "menu"}
@@ -24,10 +23,10 @@
<div v-if="result.isFound"> <div v-if="result.isFound">
<div v-if="result.item != null"> <div v-if="result.item != null">
<div v-if="result.isAllowed"> <div v-if="result.isAllowed">
<span class="green">白名单<ip-item-text :v-item="result.item"></ip-item-text>&nbsp;<a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span> <span class="green"> {{result.list.name}} <ip-item-text :v-item="result.item"></ip-item-text>&nbsp;<a href="" @click.prevent="updateItem(result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
</div> </div>
<div v-else> <div v-else>
<span class="red">黑名单<ip-item-text :v-item="result.item"></ip-item-text>&nbsp;<a href="" @click.prevent="updateItem(result.list.id, result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span> <span class="red"> {{result.list.name}} <ip-item-text :v-item="result.item"></ip-item-text>&nbsp;<a href="" @click.prevent="updateItem( result.item.id)" title="查看和修改"><i class="icon pencil small"></i></a></span>
</div> </div>
</div> </div>
<div v-if="result.province != null"> <div v-if="result.province != null">

View File

@@ -8,23 +8,23 @@
<table class="ui table selectable celled" v-if="lists.length > 0"> <table class="ui table selectable celled" v-if="lists.length > 0">
<thead> <thead>
<tr> <tr>
<th class="two wide">ID</th> <th class="two wide center">ID</th>
<th>名称</th> <th>名称</th>
<th class="two wide">类型</th> <th class="two wide center">类型</th>
<th>备注</th> <th>备注</th>
<th class="two wide">IP数量</th> <th class="two wide center">IP数量</th>
<th class="two op">操作</th> <th class="two op">操作</th>
</tr> </tr>
</thead> </thead>
<tr v-for="list in lists"> <tr v-for="list in lists">
<td>{{list.id}}</td> <td class="center">{{list.id}}</td>
<td>{{list.name}}</td> <td>{{list.name}}</td>
<td> <td class="center">
<span v-if="list.type == 'black'">黑名单</span> <span v-if="list.type == 'black'">黑名单</span>
<span v-if="list.type == 'white'">白名单</span> <span v-if="list.type == 'white'">白名单</span>
</td> </td>
<td>{{list.description}}</td> <td>{{list.description}}</td>
<td> <td class="center">
<span v-if="list.countItems > 0">{{list.countItems}}</span> <span v-if="list.countItems > 0">{{list.countItems}}</span>
<span v-else class="disabled">0</span> <span v-else class="disabled">0</span>
</td> </td>

View File

@@ -8,23 +8,23 @@
<table class="ui table selectable celled" v-if="lists.length > 0"> <table class="ui table selectable celled" v-if="lists.length > 0">
<thead> <thead>
<tr> <tr>
<th class="one wide">ID</th> <th class="one wide center">ID</th>
<th>名称</th> <th class="three wide">名称</th>
<th class="two wide">类型</th> <th class="two wide center">类型</th>
<th>备注</th> <th>备注</th>
<th class="two wide">IP数量</th> <th class="two wide center">IP数量</th>
<th class="two op">操作</th> <th class="two op">操作</th>
</tr> </tr>
</thead> </thead>
<tr v-for="list in lists"> <tr v-for="list in lists">
<td>{{list.id}}</td> <td class="center">{{list.id}}</td>
<td>{{list.name}}</td> <td>{{list.name}}</td>
<td> <td class="center">
<span v-if="list.type == 'black'">黑名单</span> <span v-if="list.type == 'black'">黑名单</span>
<span v-if="list.type == 'white'">白名单</span> <span v-if="list.type == 'white'">白名单</span>
</td> </td>
<td>{{list.description}}</td> <td>{{list.description}}</td>
<td> <td class="center">
<span v-if="list.countItems > 0">{{list.countItems}}</span> <span v-if="list.countItems > 0">{{list.countItems}}</span>
<span v-else class="disabled">0</span> <span v-else class="disabled">0</span>
</td> </td>