From ed7d643aa5e7c275db65bf3fc07bbe5e8a1ccf67 Mon Sep 17 00:00:00 2001 From: Zettat123 Date: Mon, 29 May 2023 14:40:39 +0800 Subject: [PATCH] add step start time --- routers/web/repo/actions/view.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index 211433861295e..7c2e9d63d6d32 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -106,9 +106,10 @@ type ViewJobStep struct { } type ViewStepLog struct { - Step int `json:"step"` - Cursor int64 `json:"cursor"` - Lines []*ViewStepLogLine `json:"lines"` + Step int `json:"step"` + Cursor int64 `json:"cursor"` + Lines []*ViewStepLogLine `json:"lines"` + Started int64 `json:"started"` } type ViewStepLogLine struct { @@ -241,9 +242,10 @@ func ViewPost(ctx *context_module.Context) { } resp.Logs.StepsLog = append(resp.Logs.StepsLog, &ViewStepLog{ - Step: cursor.Step, - Cursor: cursor.Cursor + int64(len(logLines)), - Lines: logLines, + Step: cursor.Step, + Cursor: cursor.Cursor + int64(len(logLines)), + Lines: logLines, + Started: int64(step.Started), }) } }