diff --git a/web/public/js/components/server/http-access-log-box.js b/web/public/js/components/server/http-access-log-box.js
index 939085b5..823d061f 100644
--- a/web/public/js/components/server/http-access-log-box.js
+++ b/web/public/js/components/server/http-access-log-box.js
@@ -49,7 +49,7 @@ Vue.component("http-access-log-box", {
}
},
template: `
-
[{{accessLog.region}}] {{accessLog.remoteAddr}} [{{accessLog.timeLocal}}]
"{{accessLog.requestMethod}} {{accessLog.scheme}}://{{accessLog.host}} {{accessLog.requestURI}} {{accessLog.proto}}" {{accessLog.status}} cache hit waf {{accessLog.attrs['waf.action']}} - 耗时:{{formatCost(accessLog.requestTime)}} ms
({{accessLog.humanTime}})
+
[{{accessLog.region}}] {{accessLog.remoteAddr}} [{{accessLog.timeLocal}}]
"{{accessLog.requestMethod}} {{accessLog.scheme}}://{{accessLog.host}} {{accessLog.requestURI}} {{accessLog.proto}}" {{accessLog.status}} cache hit waf {{accessLog.firewallActions}} - {{tag}} - 耗时:{{formatCost(accessLog.requestTime)}} ms
({{accessLog.humanTime}})
`
})
\ No newline at end of file
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 db1678be..b0d8c731 100644
--- a/web/public/js/components/server/http-firewall-actions-box.js
+++ b/web/public/js/components/server/http-firewall-actions-box.js
@@ -62,7 +62,7 @@ Vue.component("http-firewall-actions-box", {
ipListLevels: [],
// 动作参数
- blockLife: "",
+ blockTimeout: "",
captchaLife: "",
get302Life: "",
post307Life: "",
@@ -89,12 +89,12 @@ Vue.component("http-firewall-actions-box", {
})
this.actionOptions = {}
},
- blockLife: function (v) {
+ blockTimeout: function (v) {
v = parseInt(v)
if (isNaN(v)) {
- this.actionOptions["life"] = 0
+ this.actionOptions["timeout"] = 0
} else {
- this.actionOptions["life"] = v
+ this.actionOptions["timeout"] = v
}
},
captchaLife: function (v) {
@@ -121,7 +121,7 @@ Vue.component("http-firewall-actions-box", {
this.actionOptions["life"] = v
}
},
- recordIPType: function () {
+ recordIPType: function (v) {
this.recordIPListId = 0
},
recordIPTimeout: function (v) {
@@ -168,7 +168,7 @@ Vue.component("http-firewall-actions-box", {
this.actionOptions = {}
// 动作参数
- this.blockLife = ""
+ this.blockTimeout = ""
this.captchaLife = ""
this.get302Life = ""
this.post307Life = ""
@@ -192,8 +192,13 @@ Vue.component("http-firewall-actions-box", {
this.action = this.vActions.$find(function (k, v) {
return v.code == that.actionCode
})
+
+ // 滚到界面底部
+ this.scroll()
},
remove: function (index) {
+ this.isAdding = false
+ this.editingIndex = -1
this.configs.$remove(index)
},
update: function (index, config) {
@@ -211,9 +216,9 @@ Vue.component("http-firewall-actions-box", {
switch (config.code) {
case "block":
- this.blockLife = ""
- if (config.options.life != null || config.options.life > 0) {
- this.blockLife = config.options.life.toString()
+ this.blockTimeout = ""
+ if (config.options.timeout != null || config.options.timeout > 0) {
+ this.blockTimeout = config.options.timeout.toString()
}
break
case "allow":
@@ -247,8 +252,13 @@ Vue.component("http-firewall-actions-box", {
if (config.options.timeout > 0) {
this.recordIPTimeout = config.options.timeout.toString()
}
- this.recordIPListId = config.options.ipListId
- this.recordIPListName = config.options.ipListName
+ let that = this
+
+ // VUE需要在函数执行完之后才会调用watch函数,这样会导致设置的值被覆盖,所以这里使用setTimeout
+ setTimeout(function () {
+ that.recordIPListId = config.options.ipListId
+ that.recordIPListName = config.options.ipListName
+ })
}
break
case "tag":
@@ -274,18 +284,25 @@ Vue.component("http-firewall-actions-box", {
return v.id == config.options.groupId
})
- this.goSetId = config.options.setId
- if (this.goGroup != null) {
- let set = this.goGroup.sets.$find(function (k, v) {
- return v.id == config.options.setId
- })
- if (set != null) {
- this.goSetName = set.name
+ // VUE需要在函数执行完之后才会调用watch函数,这样会导致设置的值被覆盖,所以这里使用setTimeout
+ let that = this
+ setTimeout(function () {
+ that.goSetId = config.options.setId
+ if (that.goGroup != null) {
+ let set = that.goGroup.sets.$find(function (k, v) {
+ return v.id == config.options.setId
+ })
+ if (set != null) {
+ that.goSetName = set.name
+ }
}
- }
+ })
}
break
}
+
+ // 滚到界面底部
+ this.scroll()
},
cancel: function () {
this.isAdding = false
@@ -335,7 +352,7 @@ Vue.component("http-firewall-actions-box", {
return
}
this.actionOptions = {
- groupId: groupId,
+ groupId: groupId.toString(),
groupName: this.goGroupName
}
} else if (this.actionCode == "go_set") { // go_set
@@ -358,9 +375,9 @@ Vue.component("http-firewall-actions-box", {
return
}
this.actionOptions = {
- groupId: groupId,
+ groupId: groupId.toString(),
groupName: this.goGroupName,
- setId: setId,
+ setId: setId.toString(),
setName: this.goSetName
}
}
@@ -419,6 +436,14 @@ Vue.component("http-firewall-actions-box", {
callback()
})
document.head.appendChild(jsFile)
+ },
+ scroll: function () {
+ setTimeout(function () {
+ let mainDiv = document.getElementsByClassName("main")
+ if (mainDiv.length > 0) {
+ mainDiv[0].scrollTo(0, 1000)
+ }
+ }, 10)
}
},
template: `
@@ -427,6 +452,18 @@ Vue.component("http-firewall-actions-box", {
-
+
@@ -514,7 +551,7 @@ Vue.component("http-firewall-actions-box", {
- 选择IP名单
+ 选择IP名单 *
+
@@ -533,7 +570,7 @@ Vue.component("http-firewall-actions-box", {
超时时间
-
+
秒
@@ -585,5 +622,6 @@ Vue.component("http-firewall-actions-box", {
+
+
`
})
\ No newline at end of file
diff --git a/web/views/@default/servers/components/waf/createSetPopup.html b/web/views/@default/servers/components/waf/createSetPopup.html
index 92ac5bea..dd04ea08 100644
--- a/web/views/@default/servers/components/waf/createSetPopup.html
+++ b/web/views/@default/servers/components/waf/createSetPopup.html
@@ -12,7 +12,7 @@
- 规则
+ 规则 *
diff --git a/web/views/@default/servers/components/waf/groups.html b/web/views/@default/servers/components/waf/groups.html
index e8d46f3c..297ac034 100644
--- a/web/views/@default/servers/components/waf/groups.html
+++ b/web/views/@default/servers/components/waf/groups.html
@@ -1,44 +1,44 @@
{$layout}
- {$template "waf_menu"}
+{$template "waf_menu"}
-
- [添加分组]
-
+
+ [添加分组]
+
-
+
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/web/views/@default/servers/components/waf/updateSetPopup.html b/web/views/@default/servers/components/waf/updateSetPopup.html
index d3fb5078..90f981f6 100644
--- a/web/views/@default/servers/components/waf/updateSetPopup.html
+++ b/web/views/@default/servers/components/waf/updateSetPopup.html
@@ -12,7 +12,7 @@
- 规则
+ 规则 *
diff --git a/web/views/@default/servers/server/settings/waf/group.html b/web/views/@default/servers/server/settings/waf/group.html
index 690d52f1..d0bb4e2e 100644
--- a/web/views/@default/servers/server/settings/waf/group.html
+++ b/web/views/@default/servers/server/settings/waf/group.html
@@ -33,7 +33,7 @@
规则集名称
规则
- 关系
+ 关系
动作
操作
@@ -52,11 +52,12 @@
暂时还没有规则
- {{set.connector.toUpperCase()}}
- {{set.actionName}}[{{set.action.toUpperCase()}}]
-
+
+ 或 和
+ ({{set.connector.toUpperCase()}})
+
+
+
修改 停用 启用 删除