feat(webui): page through task logs
This commit is contained in:
11 files changed
+376
-93
No files matched your search
@@ -775,11 +775,13 @@ func (c *Client) TaskLog(ctx context.Context, taskID int64, attempt int, q loggi
|
||||
components = []string{}
|
||||
}
|
||||
return logging.TaskLogPage{
|
||||
Entries: mapValues(r.Entries, taskLogEntryValue),
|
||||
Truncated: r.Truncated,
|
||||
File: r.File,
|
||||
Found: true,
|
||||
Components: components,
|
||||
Entries: mapValues(r.Entries, taskLogEntryValue),
|
||||
Truncated: r.Truncated,
|
||||
MoreAvailable: r.MoreAvailable,
|
||||
Cursor: r.Cursor,
|
||||
File: r.File,
|
||||
Found: true,
|
||||
Components: components,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1128,12 +1128,14 @@ func (s *server) ReadTaskLog(ctx context.Context, r *pb.ReadTaskLogRequest) (*pb
|
||||
return &pb.ReadTaskLogResponse{Attempt: r.Attempt}, nil
|
||||
}
|
||||
return &pb.ReadTaskLogResponse{
|
||||
Entries: mapValues(page.Entries, taskLogEntryProto),
|
||||
Truncated: page.Truncated,
|
||||
Attempt: r.Attempt,
|
||||
Found: true,
|
||||
Components: page.Components,
|
||||
File: page.File,
|
||||
Entries: mapValues(page.Entries, taskLogEntryProto),
|
||||
Truncated: page.Truncated,
|
||||
MoreAvailable: page.MoreAvailable,
|
||||
Cursor: page.Cursor,
|
||||
Attempt: r.Attempt,
|
||||
Found: true,
|
||||
Components: page.Components,
|
||||
File: page.File,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -661,7 +661,7 @@ func taskLogRequestProto(taskID int64, attempt int, q logging.Query) *pb.ReadTas
|
||||
return &pb.ReadTaskLogRequest{
|
||||
TaskId: taskID, Attempt: int64(attempt), Limit: int64(q.Limit),
|
||||
Levels: q.Levels, Component: q.Component, Stage: q.Stage, Contains: q.Contains,
|
||||
Since: timestamp(q.Since), Until: timestamp(q.Until),
|
||||
Since: timestamp(q.Since), Until: timestamp(q.Until), BeforeId: q.BeforeID,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,5 +674,6 @@ func taskLogQueryValue(r *pb.ReadTaskLogRequest) logging.Query {
|
||||
Limit: int(r.Limit),
|
||||
Since: timeValue(r.Since),
|
||||
Until: timeValue(r.Until),
|
||||
BeforeID: r.BeforeId,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user