From 4edca6b6704494a088c694b36713a09d008de357 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Fri, 22 Apr 2022 09:15:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DIPBox=E5=8F=AA=E8=83=BD?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=98=A8=E6=97=A5=E6=97=A5=E5=BF=97=E7=9A=84?= =?UTF-8?q?Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/actions/default/servers/ipbox/index.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/web/actions/default/servers/ipbox/index.go b/internal/web/actions/default/servers/ipbox/index.go index 88d94e56..5b3e0858 100644 --- a/internal/web/actions/default/servers/ipbox/index.go +++ b/internal/web/actions/default/servers/ipbox/index.go @@ -103,6 +103,7 @@ func (this *IndexAction) RunGet(params struct { // 访问日志 var hasAccessLogs = false +Loop: for _, day := range []string{timeutil.Format("Ymd"), timeutil.Format("Ymd", time.Now().AddDate(0, 0, -1))} { partitionsResp, err := this.RPC().HTTPAccessLogRPC().FindHTTPAccessLogPartitions(this.AdminContext(), &pb.FindHTTPAccessLogPartitionsRequest{Day: day}) if err != nil { @@ -125,7 +126,7 @@ func (this *IndexAction) RunGet(params struct { if len(accessLogs) > 0 { this.Data["accessLogs"] = accessLogs hasAccessLogs = true - break + break Loop } } }