Skip to content

Commit b20442b

Browse files
committed
Fixed issue where single job logs were not able to view
1 parent 45df36e commit b20442b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

frontend/client/views/pipeline/detail.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ export default {
352352
jobLog () {
353353
var jobid = null
354354
if (this.job) {
355-
jobid = this.job.intervalID
355+
jobid = this.job.internalID
356356
}
357357
358358
// Route

handlers/pipeline_run.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,11 @@ func GetJobLogs(c echo.Context) error {
148148
jL.Finished = true
149149
}
150150

151-
return c.JSON(http.StatusOK, *jL)
151+
// We always return an array.
152+
// It makes a bit easier in the frontend.
153+
jobLogsList := []jobLogs{}
154+
jobLogsList = append(jobLogsList, *jL)
155+
return c.JSON(http.StatusOK, jobLogsList)
152156
}
153157
}
154158

0 commit comments

Comments
 (0)