mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-12 19:30:26 +08:00
WAF模板中有新的规则时,可以在界面上收到提醒并点击加入
This commit is contained in:
@@ -20,6 +20,10 @@
|
||||
<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>
|
||||
<div v-if="upgradeItems.length > 0">
|
||||
<div class="ui divider"></div>
|
||||
<a href=""><span class="red">升级提醒:官方提供了新的规则,是否要加入以下规则:<span class="ui label tiny basic" v-for="item in upgradeItems" style="margin-bottom: 0.2em">{{item}}</span></span></a> <a href="" @click.prevent="upgradeTemplate">[加入]</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
11
web/views/@default/servers/components/waf/policy.js
Normal file
11
web/views/@default/servers/components/waf/policy.js
Normal file
@@ -0,0 +1,11 @@
|
||||
Tea.context(function () {
|
||||
this.upgradeTemplate = function () {
|
||||
teaweb.confirm("确定要加入这些新规则吗?", function () {
|
||||
this.$post(".upgradeTemplate")
|
||||
.params({
|
||||
policyId: this.firewallPolicy.id
|
||||
})
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -13,7 +13,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>规则 *</td>
|
||||
<td>
|
||||
<td style="word-break: break-word">
|
||||
<http-firewall-rules-box :v-rules="rules" :v-type="type"></http-firewall-rules-box>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user