diff --git a/web/public/js/components.js b/web/public/js/components.js index c7e21aba..55796d04 100755 --- a/web/public/js/components.js +++ b/web/public/js/components.js @@ -2215,25 +2215,27 @@ Vue.component("http-request-scripts-config-box", { } }, methods: { - changeInitScript: function (scriptConfig) { - this.config.onInitScript = scriptConfig + changeInitGroup: function (group) { + this.config.initGroup = group this.$forceUpdate() }, - changeRequestScript: function (scriptConfig) { - this.config.onRequestScript = scriptConfig + changeRequestGroup: function (group) { + this.config.requestGroup = group this.$forceUpdate() } }, template: `
在请求刚初始化时调用,此时自定义Header等尚未生效。
在准备执行请求或者转发请求之前调用,此时自定义Header、源站等已准备好。
验证通过后在这个时间内不再验证,默认600秒。
@@ -5560,7 +5562,7 @@ Vue.component("http-firewall-actions-box", {验证通过后在这个时间内不再验证。
@@ -5572,7 +5574,7 @@ Vue.component("http-firewall-actions-box", {验证通过后在这个时间内不再验证。
@@ -5609,7 +5611,7 @@ Vue.component("http-firewall-actions-box", {0表示不超时。
@@ -9630,6 +9632,45 @@ Vue.component("server-group-selector", { ` }) +Vue.component("script-group-config-box", { + props: ["v-group"], + data: function () { + let group = this.vGroup + if (group == null) { + group = { + isPrior: false, + isOn: true, + scripts: [] + } + } + if (group.scripts == null) { + group.scripts = [] + } + + let script = null + if (group.scripts.length > 0) { + script = group.scripts[group.scripts.length - 1] + } + + return { + group: group, + script: script + } + }, + methods: { + changeScript: function (script) { + this.group.scripts = [script] // 目前只支持单个脚本 + this.change() + }, + change: function () { + this.$emit("change", this.group) + } + }, + template: `