From 4971e25d44ca0c1aafb58fcf368a054379d36982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 8 Dec 2021 20:28:26 +0800 Subject: [PATCH] =?UTF-8?q?WAF=E7=9C=8B=E6=9D=BF=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E6=8B=A6=E6=88=AA=E8=AE=B0=E5=BD=95=E5=A2=9E=E5=8A=A0=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/views/@default/dashboard/boards/waf.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web/views/@default/dashboard/boards/waf.js b/web/views/@default/dashboard/boards/waf.js index 2017e345..edfa9fce 100644 --- a/web/views/@default/dashboard/boards/waf.js +++ b/web/views/@default/dashboard/boards/waf.js @@ -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 }