File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ type ViewResponse struct {
51
51
Run struct {
52
52
Link string `json:"link"`
53
53
Title string `json:"title"`
54
+ Status string `json:"status"`
54
55
CanCancel bool `json:"canCancel"`
55
56
Done bool `json:"done"`
56
57
Jobs []* ViewJob `json:"jobs"`
@@ -109,6 +110,7 @@ func ViewPost(ctx *context_module.Context) {
109
110
resp .State .Run .CanCancel = ! run .Status .IsDone () && ctx .Repo .CanWrite (unit .TypeActions )
110
111
resp .State .Run .Done = run .Status .IsDone ()
111
112
resp .State .Run .Jobs = make ([]* ViewJob , 0 , len (jobs )) // marshal to '[]' instead fo 'null' in json
113
+ resp .State .Run .Status = run .Status .String ()
112
114
for _ , v := range jobs {
113
115
resp .State .Run .Jobs = append (resp .State .Run .Jobs , & ViewJob {
114
116
ID : v .ID ,
Original file line number Diff line number Diff line change 2
2
<div class =" action-view-container" >
3
3
<div class =" action-view-header" >
4
4
<div class =" action-info-summary" >
5
- {{ run.title }}
5
+ <SvgIcon name =" octicon-check-circle-fill" size =" 20" class =" green" v-if =" run.status === 'success'" />
6
+ <SvgIcon name =" octicon-clock" size =" 20" class =" ui text yellow" v-else-if =" run.status === 'waiting'" />
7
+ <SvgIcon name =" octicon-meter" size =" 20" class =" ui text yellow" class-name =" job-status-rotate" v-else-if =" run.status === 'running'" />
8
+ <SvgIcon name =" octicon-x-circle-fill" size =" 20" class =" red" v-else />
9
+ <div class =" action-title" >
10
+ {{ run.title }}
11
+ </div >
6
12
<button class =" run_cancel" @click =" cancelRun()" v-if =" run.canCancel" >
7
13
<i class =" stop circle outline icon" />
8
14
</button >
@@ -95,6 +101,7 @@ const sfc = {
95
101
run: {
96
102
link: ' ' ,
97
103
title: ' ' ,
104
+ status: ' ' ,
98
105
canCancel: false ,
99
106
done: false ,
100
107
jobs: [
You can’t perform that action at this time.
0 commit comments