mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-17 05:52:13 +09:00
fix(actions): use gitea's clock for actions durations (#39323)
This commit is contained in:
@@ -46,6 +46,7 @@ type JobStepState = {
|
||||
cursor: string|null,
|
||||
expanded: boolean,
|
||||
manuallyCollapsed: boolean, // whether the user manually collapsed the step, used to avoid auto-expanding it again
|
||||
firstLogTime?: number, // the step's first log line time, what "Show seconds" counts from
|
||||
}
|
||||
|
||||
// one ANSI renderer per step, so an unterminated color carries between that step's lines only
|
||||
@@ -81,7 +82,6 @@ type JobData = {
|
||||
stepsLog?: Array<{
|
||||
step: number;
|
||||
cursor: string | null;
|
||||
started: number;
|
||||
lines: LogLine[];
|
||||
}>;
|
||||
},
|
||||
@@ -355,9 +355,12 @@ async function loadJob() {
|
||||
|
||||
// append logs to the UI
|
||||
for (const stepLogs of jobLogs) {
|
||||
const stepState = currentJobStepsStates.value[stepLogs.step];
|
||||
// save the cursor, it will be passed to backend next time
|
||||
currentJobStepsStates.value[stepLogs.step].cursor = stepLogs.cursor;
|
||||
appendLogs(stepLogs.step, stepLogs.started, stepLogs.lines);
|
||||
stepState.cursor = stepLogs.cursor;
|
||||
if (!stepLogs.lines.length) continue;
|
||||
stepState.firstLogTime ??= stepLogs.lines[0].timestamp;
|
||||
appendLogs(stepLogs.step, stepState.firstLogTime, stepLogs.lines);
|
||||
}
|
||||
|
||||
// auto-scroll to the last log line of the last step
|
||||
|
||||
Reference in New Issue
Block a user