mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-18 23:10:25 +08:00
通过IP看访问日志时优先查询IP被加入名单的时间
This commit is contained in:
@@ -29,11 +29,12 @@ func (this *AccessLogsPopupAction) RunGet(params struct {
|
|||||||
this.NotFound("ipItem", params.ItemId)
|
this.NotFound("ipItem", params.ItemId)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Data["ipFrom"] = item.IpFrom
|
this.Data["ipFrom"] = item.IpFrom
|
||||||
this.Data["ipTo"] = item.IpTo
|
this.Data["ipTo"] = item.IpTo
|
||||||
|
|
||||||
// 多找几个Partition
|
// 多找几个Partition
|
||||||
var day = timeutil.Format("Ymd")
|
var day = timeutil.FormatTime("Ymd", item.CreatedAt)
|
||||||
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 {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
@@ -47,7 +48,7 @@ func (this *AccessLogsPopupAction) RunGet(params struct {
|
|||||||
Partition: partition,
|
Partition: partition,
|
||||||
Day: day,
|
Day: day,
|
||||||
Keyword: "ip:" + item.IpFrom + "," + item.IpTo,
|
Keyword: "ip:" + item.IpFrom + "," + item.IpTo,
|
||||||
Size: 10,
|
Size: 20,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user