mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 04:54:32 +08:00
多处访问日志增加单页显示条数选择
This commit is contained in:
@@ -29,6 +29,8 @@ func (this *IndexAction) RunGet(params struct {
|
||||
|
||||
RequestId string
|
||||
ServerId int64
|
||||
|
||||
PageSize int64
|
||||
}) {
|
||||
if len(params.Day) == 0 {
|
||||
params.Day = timeutil.Format("Y-m-d")
|
||||
@@ -43,13 +45,17 @@ func (this *IndexAction) 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 := params.PageSize
|
||||
if size < 1 {
|
||||
size = 20
|
||||
}
|
||||
|
||||
this.Data["hasError"] = params.HasError
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -24,8 +24,15 @@ func (this *TodayAction) RunGet(params struct {
|
||||
Keyword string
|
||||
Ip string
|
||||
Domain string
|
||||
|
||||
PageSize int
|
||||
}) {
|
||||
size := int64(20)
|
||||
this.Data["pageSize"] = params.PageSize
|
||||
|
||||
size := int64(params.PageSize)
|
||||
if size < 1 {
|
||||
size = 20
|
||||
}
|
||||
|
||||
this.Data["path"] = this.Request.URL.Path
|
||||
this.Data["hasError"] = params.HasError
|
||||
|
||||
Reference in New Issue
Block a user