Skip to content

Commit 68aac69

Browse files

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

routers/web/repo/actions/view.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ type ViewJob struct {
7575
Name string `json:"name"`
7676
Status string `json:"status"`
7777
CanRerun bool `json:"canRerun"`
78+
Duration string `json:"duration"`
7879
}
7980

8081
type ViewCommit struct {
@@ -144,6 +145,7 @@ func ViewPost(ctx *context_module.Context) {
144145
Name: v.Name,
145146
Status: v.Status.String(),
146147
CanRerun: v.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions),
148+
Duration: v.Duration().String(),
147149
})
148150
}
149151

web_src/js/components/RepoActionView.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<ActionRunStatus :status="job.status"/>
3333
<span class="ui text gt-mx-3">{{ job.name }}</span>
3434
</a>
35+
<span class="step-summary-duration">{{ job.duration }}</span>
3536
<button class="job-brief-rerun" @click="rerunJob(index)" v-if="job.canRerun">
3637
<SvgIcon name="octicon-sync" class="ui text black"/>
3738
</button>
@@ -57,7 +58,7 @@
5758
<ActionRunStatus :status="jobStep.status" class="gt-mr-3"/>
5859

5960
<span class="step-summary-msg">{{ jobStep.summary }}</span>
60-
<span class="step-summary-dur">{{ jobStep.duration }}</span>
61+
<span class="step-summary-duration">{{ jobStep.duration }}</span>
6162
</div>
6263

6364
<!-- the log elements could be a lot, do not use v-if to destroy/reconstruct the DOM -->
@@ -112,6 +113,7 @@ const sfc = {
112113
// name: '',
113114
// status: '',
114115
// canRerun: false,
116+
// duration: '',
115117
// },
116118
],
117119
commit: {
@@ -492,7 +494,7 @@ export function ansiLogToHTML(line) {
492494
flex: 1;
493495
}
494496
495-
.job-step-container .job-step-summary .step-summary-dur {
497+
.job-step-container .job-step-summary .step-summary-duration {
496498
margin-left: 16px;
497499
}
498500

0 commit comments

Comments
 (0)