管理平台也可以单独管理某个服务的黑白名单

This commit is contained in:
刘祥超
2021-01-18 17:09:35 +08:00
parent b235b57392
commit 6c3a130afe
28 changed files with 1157 additions and 1 deletions

View File

@@ -0,0 +1,52 @@
Tea.context(function () {
this.isCheckingAll = false
this.countSelectedProvinces = this.provinces.$count(function (k, province) {
return province.isChecked
})
this.selectProvince = function (province) {
province.isChecked = !province.isChecked
this.change()
}
this.deselectProvince = function (province) {
province.isChecked = false
this.change()
}
this.checkAll = function () {
this.isCheckingAll = !this.isCheckingAll
let that = this
this.provinces.forEach(function (province) {
province.isChecked = that.isCheckingAll
})
this.change()
}
this.success = function () {
teaweb.success("保存成功", function () {
teaweb.reload()
})
}
this.change = function () {
this.countSelectedProvinces = this.provinces.$count(function (k, province) {
return province.isChecked
})
}
/**
* 添加IP名单菜单
*/
this.createIP = function (type) {
teaweb.popup("/servers/components/waf/ipadmin/createIPPopup?firewallPolicyId=" + this.firewallPolicyId + '&type=' + type, {
height: "23em",
callback: function () {
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + this.firewallPolicyId + "&type=" + type
}
})
}
})