mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-02-17 21:35:37 +08:00
v1.4.1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<second-menu style="margin-top:-1em">
|
||||
<menu-item :href="'/servers/components/waf/ipadmin?firewallPolicyId=' + firewallPolicyId" :active="subMenuItem == 'region'">国家/地区封禁</menu-item>
|
||||
<menu-item :href="'/servers/components/waf/ipadmin/provinces?firewallPolicyId=' + firewallPolicyId" :active="subMenuItem == 'province'">省份封禁</menu-item>
|
||||
<menu-item :href="'/servers/components/waf/ipadmin/providers?firewallPolicyId=' + firewallPolicyId" :active="subMenuItem == 'provider'">运营商封禁</menu-item>
|
||||
<span class="item disabled">|</span>
|
||||
<menu-item :href="'/servers/components/waf/ipadmin/lists?firewallPolicyId=' + firewallPolicyId + '&type=white'" :active="subMenuItem == 'white'">白名单</menu-item>
|
||||
<menu-item :href="'/servers/components/waf/ipadmin/lists?firewallPolicyId=' + firewallPolicyId + '&type=black'" :active="subMenuItem == 'black'">黑名单</menu-item>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{$layout}
|
||||
|
||||
{$template "../waf_menu"}
|
||||
{$template "menu"}
|
||||
|
||||
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<input type="hidden" name="firewallPolicyId" :value="firewallPolicyId"/>
|
||||
<input type="hidden" name="exceptURLPatternsJSON" :value="JSON.stringify(exceptURLPatterns)"/>
|
||||
<input type="hidden" name="onlyURLPatternsJSON" :value="JSON.stringify(onlyURLPatterns)"/>
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">仅允许的运营商</td>
|
||||
<td>
|
||||
<http-firewall-provider-selector :v-providers="allowedProviders" :v-type="'allow'" @change="changeAllowedProviders"></http-firewall-provider-selector>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="title">仅封禁的运营商</td>
|
||||
<td>
|
||||
<p class="comment" v-if="allowedProviders.length > 0">由于你已设置"仅允许的运营商",所以不需要再设置封禁运营商。</p>
|
||||
<http-firewall-provider-selector :v-providers="deniedProviders" :v-type="'deny'" v-show="allowedProviders.length == 0"></http-firewall-provider-selector>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr>
|
||||
<td>例外URL <tip-icon content="对这些URL将不做任何限制。"></tip-icon></td>
|
||||
<td><url-patterns-box v-model="exceptURLPatterns"></url-patterns-box></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>限制URL <tip-icon content="只对这些URL做限制。"></tip-icon></td>
|
||||
<td><url-patterns-box v-model="onlyURLPatterns"></url-patterns-box></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>提示内容</td>
|
||||
<td>
|
||||
<textarea v-model="providerHTML" name="providerHTML" rows="3"></textarea>
|
||||
<p class="comment">当客户端所在区域被封禁时提示页面的HTML内容;不填则表示使用默认的提示内容;支持请求变量。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,11 @@
|
||||
Tea.context(function () {
|
||||
this.success = function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
|
||||
this.changeAllowedProviders = function (event) {
|
||||
this.allowedProviders = event.providers
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user