feat(webui): page through task logs

This commit is contained in:
sam committed 2026-10-05 21:03:08 +11:00
1 parent 4cfbcd696c
commit c8b9934f01
11 files changed
+376 -93

No files matched your search

+7 -5
View File
@@ -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
}
+8 -6
View File
@@ -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
}
+2 -1
View File
@@ -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,
}
}