mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-10 16:30:24 +08:00
多处访问日志增加单页显示条数选择
This commit is contained in:
@@ -28,6 +28,8 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
|
||||
RequestId string
|
||||
HasError int
|
||||
|
||||
PageSize int
|
||||
}) {
|
||||
if len(params.Day) == 0 {
|
||||
params.Day = timeutil.Format("Y-m-d")
|
||||
@@ -41,13 +43,17 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
this.Data["accessLogs"] = []interface{}{}
|
||||
this.Data["hasError"] = params.HasError
|
||||
this.Data["hasWAF"] = params.HasWAF
|
||||
this.Data["pageSize"] = params.PageSize
|
||||
|
||||
day := params.Day
|
||||
ipList := []string{}
|
||||
|
||||
if len(day) > 0 && regexp.MustCompile(`\d{4}-\d{2}-\d{2}`).MatchString(day) {
|
||||
day = strings.ReplaceAll(day, "-", "")
|
||||
size := int64(20)
|
||||
size := int64(params.PageSize)
|
||||
if size < 1 {
|
||||
size = 20
|
||||
}
|
||||
|
||||
this.Data["hasError"] = params.HasError
|
||||
|
||||
|
||||
Reference in New Issue
Block a user