服务访问日志增加关键词搜索

This commit is contained in:
刘祥超
2021-06-04 10:15:31 +08:00
parent 0f5f175f08
commit 98f8fb3bec
7 changed files with 58 additions and 13 deletions

View File

@@ -21,6 +21,7 @@ func (this *HistoryAction) Init() {
func (this *HistoryAction) RunGet(params struct {
ServerId int64
Day string
Keyword string
RequestId string
HasError int
@@ -31,6 +32,7 @@ func (this *HistoryAction) RunGet(params struct {
this.Data["path"] = this.Request.URL.Path
this.Data["day"] = params.Day
this.Data["keyword"] = params.Keyword
this.Data["accessLogs"] = []interface{}{}
this.Data["hasError"] = params.HasError
@@ -48,6 +50,7 @@ func (this *HistoryAction) RunGet(params struct {
ServerId: params.ServerId,
HasError: params.HasError > 0,
Day: day,
Keyword: params.Keyword,
Size: size,
})
if err != nil {
@@ -80,6 +83,7 @@ func (this *HistoryAction) RunGet(params struct {
ServerId: params.ServerId,
HasError: params.HasError > 0,
Day: day,
Keyword: params.Keyword,
Size: size,
Reverse: true,
})