Files
EdgeAdmin/web/views/@default/servers/components/waf/index.html

60 lines
2.5 KiB
HTML
Raw Normal View History

2020-09-13 20:37:07 +08:00
{$layout}
2021-06-07 08:58:54 +08:00
<first-menu>
<menu-item href="/servers/components/waf" code="index">列表</menu-item>
<span class="item">|</span>
<a href="" class="item" @click.prevent="createPolicy()">[创建]</a>
</first-menu>
2020-10-06 21:02:37 +08:00
2021-06-07 08:58:54 +08:00
<!-- 搜索 -->
<div class="margin"></div>
<form class="ui form" method="get" action="/servers/components/waf">
<div class="ui fields inline">
<div class="ui field">
<input type="text" name="keyword" v-model="keyword" placeholder="策略名称..."/>
</div>
<div class="ui field">
<button type="submit" class="ui button">搜索</button>
2021-09-12 20:21:32 +08:00
&nbsp;
<a :href="Tea.url('.')" v-if="keyword.length > 0">[清除条件]</a>
2021-06-07 08:58:54 +08:00
</div>
</div>
</form>
2020-10-06 21:02:37 +08:00
2021-06-07 08:58:54 +08:00
<!-- 列表 -->
<p class="comment" v-if="policies.length == 0">暂时还没有WAF策略。</p>
2020-10-06 21:02:37 +08:00
2021-06-07 08:58:54 +08:00
<table class="ui table selectable celled" v-if="policies.length > 0">
<thead>
<tr>
<th>策略名称</th>
<th class="center">入站规则分组</th>
<th class="center">出站规则分组</th>
<th class="center">集群数</th>
<th class="two wide center">状态</th>
<th class="two op">操作</th>
</tr>
</thead>
<tr v-for="policy in policies">
2021-08-16 14:44:32 +08:00
<td><a :href="'/servers/components/waf/policy?firewallPolicyId=' + policy.id"><keyword :v-word="keyword">{{policy.name}}</keyword></a></td>
<td class="center">
<a :href="'/servers/components/waf/groups?firewallPolicyId=' + policy.id + '&type=inbound'"><span :class="{disabled:policy.countInbound == 0 }">{{policy.countInbound}}</span></a>
</td>
<td class="center">
<a :href="'/servers/components/waf/groups?firewallPolicyId=' + policy.id + '&type=outbound'"><span :class="{disabled:policy.countOutbound == 0 }">{{policy.countOutbound}}</span></a>
</td>
2021-06-07 08:58:54 +08:00
<td class="center">{{policy.countClusters}}</td>
<td class="center">
<span v-if="!policy.isOn" class="red">已停用</span>
<div v-else-if="policy.modeInfo != null">
2021-10-07 13:55:00 +08:00
<span :class="{green: policy.modeInfo.code == 'defend', blue: policy.modeInfo.code == 'observe', grey: policy.modeInfo.code == 'bypass'}">{{policy.modeInfo.name}}</span>
</div>
</td>
2021-06-07 08:58:54 +08:00
<td>
<a :href="'/servers/components/waf/policy?firewallPolicyId=' + policy.id">详情</a> &nbsp;
<a href="" @click.prevent="deletePolicy(policy.id)">删除</a>
</td>
</tr>
</table>
<div class="page" v-html="page"></div>