mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-03 02:10:25 +08:00
实现公用的IP名单
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
<menu-item @click.prevent="createIP('white')">添加IP</menu-item>
|
||||
<span class="item">|</span>
|
||||
<span class="item">ID: {{listId}} <tip-icon content="ID可以用于使用API操作此IP名单"></tip-icon></span>
|
||||
<span class="item">|</span>
|
||||
<div class="item"><ip-list-bind-box :v-http-firewall-policy-id="firewallPolicyId" :v-type="'white'"></ip-list-bind-box></div>
|
||||
</second-menu>
|
||||
|
||||
<p class="ui message warning" v-if="!wafIsOn">当前WAF未启用,设置将在<a :href="'/servers/server/settings/waf?serverId=' + serverId">[启用]</a>后生效。</p>
|
||||
|
||||
@@ -29,7 +29,9 @@ Tea.context(function () {
|
||||
teaweb.popup("/servers/server/settings/waf/ipadmin/createIPPopup?listId=" + this.listId + '&type=' + type, {
|
||||
height: "26em",
|
||||
callback: function () {
|
||||
window.location.reload()
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -56,10 +56,13 @@ Tea.context(function () {
|
||||
* 添加IP名单菜单
|
||||
*/
|
||||
this.createIP = function (type) {
|
||||
let that = this
|
||||
teaweb.popup("/servers/components/waf/ipadmin/createIPPopup?firewallPolicyId=" + this.firewallPolicyId + '&type=' + type, {
|
||||
height: "30em",
|
||||
callback: function () {
|
||||
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + this.firewallPolicyId + "&type=" + type
|
||||
teaweb.success("保存成功", function () {
|
||||
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + that.firewallPolicyId + "&type=" + type
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
<menu-item @click.prevent="createIP('black')">添加IP</menu-item>
|
||||
<span class="item">|</span>
|
||||
<span class="item">ID: {{listId}} <tip-icon content="ID可以用于使用API操作此IP名单"></tip-icon></span>
|
||||
<span class="item">|</span>
|
||||
<div class="item"><ip-list-bind-box :v-http-firewall-policy-id="firewallPolicyId" :v-type="'black'"></ip-list-bind-box></div>
|
||||
</second-menu>
|
||||
|
||||
<p class="ui message warning" v-if="!wafIsOn">当前WAF未启用,设置将在<a :href="'/servers/server/settings/waf?serverId=' + serverId">[启用]</a>后生效。</p>
|
||||
|
||||
@@ -29,7 +29,9 @@ Tea.context(function () {
|
||||
teaweb.popup("/servers/server/settings/waf/ipadmin/createIPPopup?listId=" + this.listId + '&type=' + type, {
|
||||
height: "26em",
|
||||
callback: function () {
|
||||
window.location.reload()
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -42,10 +42,13 @@ Tea.context(function () {
|
||||
* 添加IP名单菜单
|
||||
*/
|
||||
this.createIP = function (type) {
|
||||
let that = this
|
||||
teaweb.popup("/servers/components/waf/ipadmin/createIPPopup?firewallPolicyId=" + this.firewallPolicyId + '&type=' + type, {
|
||||
height: "30em",
|
||||
callback: function () {
|
||||
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + this.firewallPolicyId + "&type=" + type
|
||||
teaweb.success("保存成功", function () {
|
||||
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + that.firewallPolicyId + "&type=" + type
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user