@@ -19,8 +19,8 @@ import (
19
19
var (
20
20
// used to ensure embed import
21
21
_ embed.FS
22
- //go:embed templates/result .html
23
- resultTemplate string
22
+ //go:embed templates/task .html
23
+ taskTemplate string
24
24
)
25
25
26
26
// VolumesHandler expose volumes of a task
@@ -65,7 +65,7 @@ func (a *Application) VolumesHandler(basePathLen int, latest bool) http.HandlerF
65
65
if _ , err := os .Stat (fullPath ); os .IsNotExist (err ) {
66
66
l .Warn ("Path not found" , zap .Error (err ))
67
67
68
- data , err := NewResultFromTask (t , "No result for this task" , a .GitlabURL )
68
+ data , err := NewTaskPage (t , "No result for this task" , a .GitlabURL , "Task Result" , "container task-output" )
69
69
if err != nil {
70
70
l .Error ("when creating result from a task" , zap .Error (err ))
71
71
w .WriteHeader (http .StatusInternalServerError )
@@ -76,7 +76,7 @@ func (a *Application) VolumesHandler(basePathLen int, latest bool) http.HandlerF
76
76
Domain : a .Domain ,
77
77
Detail : fmt .Sprintf ("%s / %s" , t .Service , t .Commit ),
78
78
Partial : html.Partial {
79
- Template : resultTemplate ,
79
+ Template : taskTemplate ,
80
80
Data : data ,
81
81
}}
82
82
@@ -128,13 +128,13 @@ func (a *Application) renderResultPageForTask(t *task.Task, filePath string, w h
128
128
return err
129
129
}
130
130
131
- data , err := NewResultFromTask (t , template .HTML (content ), a .GitlabURL )
131
+ data , err := NewTaskPage (t , template .HTML (content ), a .GitlabURL , "Task Result" , "container task-output" )
132
132
// create the page
133
133
p := html.Page {
134
134
Domain : a .Domain ,
135
135
Detail : fmt .Sprintf ("%s / %s" , t .Service , t .Commit ),
136
136
Partial : html.Partial {
137
- Template : resultTemplate ,
137
+ Template : taskTemplate ,
138
138
Data : data ,
139
139
},
140
140
}
0 commit comments