mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-04-14 21:45:18 +08:00
访问日志可以使用分表查询
This commit is contained in:
@@ -33,6 +33,8 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
ClusterId int64
|
||||
NodeId int64
|
||||
|
||||
Partition int32 `default:"-1"`
|
||||
|
||||
PageSize int
|
||||
}) {
|
||||
if len(params.Day) == 0 {
|
||||
@@ -65,6 +67,7 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
this.Data["hasError"] = params.HasError
|
||||
|
||||
resp, err := this.RPC().HTTPAccessLogRPC().ListHTTPAccessLogs(this.AdminContext(), &pb.ListHTTPAccessLogsRequest{
|
||||
Partition: params.Partition,
|
||||
RequestId: params.RequestId,
|
||||
ServerId: params.ServerId,
|
||||
HasError: params.HasError > 0,
|
||||
@@ -105,6 +108,7 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
if len(params.RequestId) > 0 {
|
||||
this.Data["hasPrev"] = true
|
||||
prevResp, err := this.RPC().HTTPAccessLogRPC().ListHTTPAccessLogs(this.AdminContext(), &pb.ListHTTPAccessLogsRequest{
|
||||
Partition: params.Partition,
|
||||
RequestId: params.RequestId,
|
||||
ServerId: params.ServerId,
|
||||
HasError: params.HasError > 0,
|
||||
|
||||
@@ -57,10 +57,13 @@ func (this *IndexAction) RunPost(params struct {
|
||||
ClusterId int64
|
||||
NodeId int64
|
||||
|
||||
Partition int32 `default:"-1"`
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
isReverse := len(params.RequestId) > 0
|
||||
accessLogsResp, err := this.RPC().HTTPAccessLogRPC().ListHTTPAccessLogs(this.AdminContext(), &pb.ListHTTPAccessLogsRequest{
|
||||
Partition: params.Partition,
|
||||
ServerId: params.ServerId,
|
||||
RequestId: params.RequestId,
|
||||
Size: 20,
|
||||
|
||||
@@ -27,6 +27,8 @@ func (this *TodayAction) RunGet(params struct {
|
||||
ClusterId int64
|
||||
NodeId int64
|
||||
|
||||
Partition int32 `default:"-1"`
|
||||
|
||||
PageSize int
|
||||
}) {
|
||||
this.Data["pageSize"] = params.PageSize
|
||||
@@ -46,6 +48,7 @@ func (this *TodayAction) RunGet(params struct {
|
||||
this.Data["nodeId"] = params.NodeId
|
||||
|
||||
resp, err := this.RPC().HTTPAccessLogRPC().ListHTTPAccessLogs(this.AdminContext(), &pb.ListHTTPAccessLogsRequest{
|
||||
Partition: params.Partition,
|
||||
RequestId: params.RequestId,
|
||||
ServerId: params.ServerId,
|
||||
HasError: params.HasError > 0,
|
||||
@@ -85,6 +88,7 @@ func (this *TodayAction) RunGet(params struct {
|
||||
if len(params.RequestId) > 0 {
|
||||
this.Data["hasPrev"] = true
|
||||
prevResp, err := this.RPC().HTTPAccessLogRPC().ListHTTPAccessLogs(this.AdminContext(), &pb.ListHTTPAccessLogsRequest{
|
||||
Partition: params.Partition,
|
||||
RequestId: params.RequestId,
|
||||
ServerId: params.ServerId,
|
||||
HasError: params.HasError > 0,
|
||||
|
||||
Reference in New Issue
Block a user