2020-10-06 21:02:37 +08:00
|
|
|
Tea.context(function () {
|
|
|
|
|
this.success = NotifySuccess("保存成功", "/servers/components/waf/policy?firewallPolicyId=" + this.firewallPolicyId)
|
2023-08-02 16:58:45 +08:00
|
|
|
|
|
|
|
|
this.maxRequestBodySize = this.firewallPolicy.maxRequestBodySize
|
|
|
|
|
this.maxRequestBodySizeFormat = teaweb.formatBytes(this.maxRequestBodySize)
|
|
|
|
|
if (this.maxRequestBodySize == 0) {
|
|
|
|
|
this.maxRequestBodySizeFormat = ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.changeMaxRequestBodySize = function (v) {
|
|
|
|
|
if (v.toString().length == 0) {
|
|
|
|
|
this.maxRequestBodySize = 0
|
|
|
|
|
this.maxRequestBodySizeFormat = teaweb.formatBytes(this.maxRequestBodySize)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let size = parseInt(v)
|
|
|
|
|
if (!isNaN(size) && size >= 0) {
|
|
|
|
|
this.maxRequestBodySize = size
|
|
|
|
|
this.maxRequestBodySizeFormat = teaweb.formatBytes(this.maxRequestBodySize)
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-10-06 21:02:37 +08:00
|
|
|
})
|