mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-02-22 17:15:36 +08:00
访问日志搜索增加域名和IP搜索
This commit is contained in:
@@ -22,6 +22,8 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
ServerId int64
|
||||
Day string
|
||||
Keyword string
|
||||
Ip string
|
||||
Domain string
|
||||
|
||||
RequestId string
|
||||
HasError int
|
||||
@@ -33,6 +35,8 @@ 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["ip"] = params.Ip
|
||||
this.Data["domain"] = params.Domain
|
||||
this.Data["accessLogs"] = []interface{}{}
|
||||
this.Data["hasError"] = params.HasError
|
||||
|
||||
@@ -51,6 +55,8 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
HasError: params.HasError > 0,
|
||||
Day: day,
|
||||
Keyword: params.Keyword,
|
||||
Ip: params.Ip,
|
||||
Domain: params.Domain,
|
||||
Size: size,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -84,6 +90,8 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
HasError: params.HasError > 0,
|
||||
Day: day,
|
||||
Keyword: params.Keyword,
|
||||
Ip: params.Ip,
|
||||
Domain: params.Domain,
|
||||
Size: size,
|
||||
Reverse: true,
|
||||
})
|
||||
|
||||
@@ -20,10 +20,14 @@ func (this *IndexAction) Init() {
|
||||
func (this *IndexAction) RunGet(params struct {
|
||||
ServerId int64
|
||||
RequestId string
|
||||
Ip string
|
||||
Domain string
|
||||
Keyword string
|
||||
}) {
|
||||
this.Data["serverId"] = params.ServerId
|
||||
this.Data["requestId"] = params.RequestId
|
||||
this.Data["ip"] = params.Ip
|
||||
this.Data["domain"] = params.Domain
|
||||
this.Data["keyword"] = params.Keyword
|
||||
this.Data["path"] = this.Request.URL.Path
|
||||
|
||||
@@ -44,6 +48,8 @@ func (this *IndexAction) RunPost(params struct {
|
||||
ServerId int64
|
||||
RequestId string
|
||||
Keyword string
|
||||
Ip string
|
||||
Domain string
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
@@ -54,6 +60,8 @@ func (this *IndexAction) RunPost(params struct {
|
||||
Size: 20,
|
||||
Day: timeutil.Format("Ymd"),
|
||||
Keyword: params.Keyword,
|
||||
Ip: params.Ip,
|
||||
Domain: params.Domain,
|
||||
Reverse: isReverse,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -21,12 +21,16 @@ func (this *TodayAction) RunGet(params struct {
|
||||
ServerId int64
|
||||
HasError int
|
||||
Keyword string
|
||||
Ip string
|
||||
Domain string
|
||||
}) {
|
||||
size := int64(10)
|
||||
|
||||
this.Data["path"] = this.Request.URL.Path
|
||||
this.Data["hasError"] = params.HasError
|
||||
this.Data["keyword"] = params.Keyword
|
||||
this.Data["ip"] = params.Ip
|
||||
this.Data["domain"] = params.Domain
|
||||
|
||||
resp, err := this.RPC().HTTPAccessLogRPC().ListHTTPAccessLogs(this.AdminContext(), &pb.ListHTTPAccessLogsRequest{
|
||||
RequestId: params.RequestId,
|
||||
@@ -34,6 +38,8 @@ func (this *TodayAction) RunGet(params struct {
|
||||
HasError: params.HasError > 0,
|
||||
Day: timeutil.Format("Ymd"),
|
||||
Keyword: params.Keyword,
|
||||
Ip: params.Ip,
|
||||
Domain: params.Domain,
|
||||
Size: size,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -67,6 +73,9 @@ func (this *TodayAction) RunGet(params struct {
|
||||
ServerId: params.ServerId,
|
||||
HasError: params.HasError > 0,
|
||||
Day: timeutil.Format("Ymd"),
|
||||
Keyword: params.Keyword,
|
||||
Ip: params.Ip,
|
||||
Domain: params.Domain,
|
||||
Size: size,
|
||||
Reverse: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user