diff --git a/web/public/js/components/server/http-firewall-actions-box.js b/web/public/js/components/server/http-firewall-actions-box.js index d614ce24..acaf2ac0 100644 --- a/web/public/js/components/server/http-firewall-actions-box.js +++ b/web/public/js/components/server/http-firewall-actions-box.js @@ -73,6 +73,7 @@ Vue.component("http-firewall-actions-box", { // 动作参数 blockTimeout: "", + blockTimeoutMax: "", blockScope: "global", captchaLife: "", @@ -122,6 +123,14 @@ Vue.component("http-firewall-actions-box", { this.actionOptions["timeout"] = v } }, + blockTimeoutMax: function (v) { + v = parseInt(v) + if (isNaN(v)) { + this.actionOptions["timeoutMax"] = 0 + } else { + this.actionOptions["timeoutMax"] = v + } + }, blockScope: function (v) { this.actionOptions["scope"] = v }, @@ -237,6 +246,7 @@ Vue.component("http-firewall-actions-box", { // 动作参数 this.blockTimeout = "" + this.blockTimeoutMax = "" this.blockScope = "global" this.captchaLife = "" @@ -298,9 +308,13 @@ Vue.component("http-firewall-actions-box", { switch (config.code) { case "block": this.blockTimeout = "" + this.blockTimeoutMax = "" if (config.options.timeout != null || config.options.timeout > 0) { this.blockTimeout = config.options.timeout.toString() } + if (config.options.timeoutMax != null || config.options.timeoutMax > 0) { + this.blockTimeoutMax = config.options.timeoutMax.toString() + } if (config.options.scope != null && config.options.scope.length > 0) { this.blockScope = config.options.scope } else { @@ -584,7 +598,7 @@ Vue.component("http-firewall-actions-box", { {{config.name}} ({{config.code.toUpperCase()}}) - :有效期{{config.options.timeout}}秒 + :封禁时长{{config.options.timeout}}-{{config.options.timeoutMax}}秒 :有效期{{config.options.life}}秒 @@ -642,6 +656,17 @@ Vue.component("http-firewall-actions-box", { + + 封禁范围 + + + 当前服务 + 所有服务 + + 只封禁用户对当前网站服务的访问,其他服务不受影响。 + 封禁用户对所有网站服务的访问。 + + 封禁时长 @@ -652,14 +677,13 @@ Vue.component("http-firewall-actions-box", { - 封禁范围 + 最大封禁时长 - - 当前服务 - 所有服务 - - 只封禁用户对当前网站服务的访问,其他服务不受影响。 - 封禁用户对所有网站服务的访问。 + + + 秒 + + 选填项。如果同时填写了封禁时长和最大封禁时长,则会在两者之间随机选择一个数字作为最终的封禁时长。
只封禁用户对当前网站服务的访问,其他服务不受影响。
封禁用户对所有网站服务的访问。
选填项。如果同时填写了封禁时长和最大封禁时长,则会在两者之间随机选择一个数字作为最终的封禁时长。