mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-08 07:50:28 +08:00
修复IPBox只能显示昨日日志的Bug
This commit is contained in:
@@ -103,6 +103,7 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
|
|
||||||
// 访问日志
|
// 访问日志
|
||||||
var hasAccessLogs = false
|
var hasAccessLogs = false
|
||||||
|
Loop:
|
||||||
for _, day := range []string{timeutil.Format("Ymd"), timeutil.Format("Ymd", time.Now().AddDate(0, 0, -1))} {
|
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})
|
partitionsResp, err := this.RPC().HTTPAccessLogRPC().FindHTTPAccessLogPartitions(this.AdminContext(), &pb.FindHTTPAccessLogPartitionsRequest{Day: day})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -125,7 +126,7 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
if len(accessLogs) > 0 {
|
if len(accessLogs) > 0 {
|
||||||
this.Data["accessLogs"] = accessLogs
|
this.Data["accessLogs"] = accessLogs
|
||||||
hasAccessLogs = true
|
hasAccessLogs = true
|
||||||
break
|
break Loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user