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 8026f1a1..4ecf6b82 100644 --- a/web/public/js/components/server/http-firewall-actions-box.js +++ b/web/public/js/components/server/http-firewall-actions-box.js @@ -46,6 +46,14 @@ Vue.component("http-firewall-actions-box", { }) } + var defaultPageBody = ` + +
+403 Forbidden + +` + + return { id: id, @@ -76,6 +84,10 @@ Vue.component("http-firewall-actions-box", { tagTags: [], + pageStatus: 403, + pageBody: defaultPageBody, + defaultPageBody: defaultPageBody, + goGroupName: "", goGroupId: 0, goGroup: null, @@ -187,6 +199,9 @@ Vue.component("http-firewall-actions-box", { this.tagTags = [] + this.pageStatus = 403 + this.pageBody = this.defaultPageBody + this.goGroupName = "" this.goGroupId = 0 this.goGroup = null @@ -277,6 +292,17 @@ Vue.component("http-firewall-actions-box", { if (config.options.tags != null) { this.tagTags = config.options.tags } + break + case "page": + this.pageStatus = 403 + this.pageBody = this.defaultPageBody + if (config.options.status != null) { + this.pageStatus = config.options.status + } + if (config.options.body != null) { + this.pageBody = config.options.body + } + break case "go_group": if (config.options != null) { @@ -351,6 +377,18 @@ Vue.component("http-firewall-actions-box", { this.actionOptions = { tags: this.tagTags } + } else if (this.actionCode == "page") { + let pageStatus = this.pageStatus.toString() + if (!pageStatus.match(/^\d{3}$/)) { + pageStatus = 403 + } else { + pageStatus = parseInt(pageStatus) + } + + this.actionOptions = { + status: pageStatus, + body: this.pageBody + } } else if (this.actionCode == "go_group") { // go_group let groupId = this.goGroupId if (typeof (groupId) == "string") { @@ -481,6 +519,9 @@ Vue.component("http-firewall-actions-box", { :{{config.options.tags.join(", ")}} + + :[{{config.options.status}}] + :{{config.options.groupName}} @@ -612,6 +653,18 @@ Vue.component("http-firewall-actions-box", { + +