WAF看板最新拦截记录增加区域信息

This commit is contained in:
刘祥超
2021-12-08 20:28:26 +08:00
parent 150357441d
commit 4971e25d44

View File

@@ -161,9 +161,17 @@ Tea.context(function () {
this.$post(".wafLogs")
.success(function (resp) {
if (resp.data.accessLogs != null) {
let regions = resp.data.regions
let that = this
resp.data.accessLogs.forEach(function (v) {
that.formatTime(v)
resp.data.accessLogs.forEach(function (accessLog) {
that.formatTime(accessLog)
if (typeof (regions[accessLog.remoteAddr]) == "string") {
accessLog.region = regions[accessLog.remoteAddr]
} else {
accessLog.region = ""
}
})
this.accessLogs = resp.data.accessLogs
}