mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-03 02:10:25 +08:00
集群可以设置默认的WAF策略、缓存策略
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<th>策略名称</th>
|
||||
<th class="center">入站规则分组</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>
|
||||
@@ -23,7 +23,7 @@
|
||||
<td>{{policy.name}}</td>
|
||||
<td class="center">{{policy.countInbound}}</td>
|
||||
<td class="center">{{policy.countOutbound}}</td>
|
||||
<td class="center">{{policy.countServers}}</td>
|
||||
<td class="center">{{policy.countClusters}}</td>
|
||||
<td class="center"><label-on :v-is-on="policy.isOn"></label-on></td>
|
||||
<td>
|
||||
<a :href="'/servers/components/waf/policy?firewallPolicyId=' + policy.id">详情</a>
|
||||
|
||||
@@ -1,55 +1,54 @@
|
||||
{$layout}
|
||||
{$template "waf_menu"}
|
||||
|
||||
{$template "waf_menu"}
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">策略名称</td>
|
||||
<td>{{firewallPolicy.name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否启用</td>
|
||||
<td>
|
||||
<label-on :v-is-on="firewallPolicy.isOn"></label-on>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>预置的规则分组</td>
|
||||
<td>
|
||||
<span class="ui label tiny basic" v-for="group in firewallPolicy.groups" style="margin-bottom:0.5em" :class="{disabled:!group.isOn}">{{group.name}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>阻止动作设置</td>
|
||||
<td>
|
||||
<span v-if="firewallPolicy.blockOptions == null" class="disabled">还没有设置。</span>
|
||||
<div v-else>
|
||||
<table class="ui table">
|
||||
<tr>
|
||||
<td class="title">状态码</td>
|
||||
<td>{{firewallPolicy.blockOptions.statusCode}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>提示内容</td>
|
||||
<td>{{firewallPolicy.blockOptions.body}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>描述</td>
|
||||
<td>
|
||||
<span v-if="firewallPolicy.description.length > 0">{{firewallPolicy.description}}</span>
|
||||
<span v-else class="disabled">暂时还没有描述。</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">策略名称</td>
|
||||
<td>{{firewallPolicy.name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否启用</td>
|
||||
<td>
|
||||
<label-on :v-is-on="firewallPolicy.isOn"></label-on>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>预置的规则分组</td>
|
||||
<td>
|
||||
<span class="ui label tiny basic" v-for="group in firewallPolicy.groups" style="margin-bottom:0.5em" :class="{disabled:!group.isOn}">{{group.name}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>阻止动作设置</td>
|
||||
<td>
|
||||
<span v-if="firewallPolicy.blockOptions == null" class="disabled">还没有设置。</span>
|
||||
<div v-else>
|
||||
<table class="ui table">
|
||||
<tr>
|
||||
<td class="title">状态码</td>
|
||||
<td>{{firewallPolicy.blockOptions.statusCode}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>提示内容</td>
|
||||
<td>{{firewallPolicy.blockOptions.body}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>描述</td>
|
||||
<td>
|
||||
<span v-if="firewallPolicy.description.length > 0">{{firewallPolicy.description}}</span>
|
||||
<span v-else class="disabled">暂时还没有描述。</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>使用此策略的服务</h4>
|
||||
<p class="comment" v-if="servers.length == 0">暂时还没有代理服务使用此策略。</p>
|
||||
<table class="ui table selectable" v-if="servers.length > 0">
|
||||
<tr v-for="server in servers">
|
||||
<td>{{server.name}}<link-icon :href="'/servers/server?serverId=' + server.id"></link-icon></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>使用此策略的集群</h4>
|
||||
<p class="comment" v-if="clusters.length == 0">暂时还没有集群使用此策略。</p>
|
||||
<table class="ui table selectable" v-if="clusters.length > 0">
|
||||
<tr v-for="cluster in clusters">
|
||||
<td>{{cluster.name}}<link-icon :href="'/clusters/cluster?clusterId=' + cluster.id"></link-icon></td>
|
||||
</tr>
|
||||
</table>
|
||||
24
web/views/@default/servers/components/waf/selectPopup.html
Normal file
24
web/views/@default/servers/components/waf/selectPopup.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>选择WAF策略</h3>
|
||||
<table class="ui table selectable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>策略名称</th>
|
||||
<th style="width: 7em">状态</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="policy in policies">
|
||||
<td>{{policy.name}}</td>
|
||||
<td>
|
||||
<label-on :v-is-on="policy.isOn"></label-on>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="policy.isOn">
|
||||
<a href="" @click.prevent="selectPolicy(policy)">选择</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="page" v-html="page"></div>
|
||||
11
web/views/@default/servers/components/waf/selectPopup.js
Normal file
11
web/views/@default/servers/components/waf/selectPopup.js
Normal file
@@ -0,0 +1,11 @@
|
||||
Tea.context(function () {
|
||||
this.selectPolicy = function (firewallPolicy) {
|
||||
NotifyPopup({
|
||||
code: 200,
|
||||
data: {
|
||||
firewallPolicy: firewallPolicy
|
||||
},
|
||||
message: ""
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user