Skip to content

Commit

Permalink
Fixed issue where single job logs were not able to view
Browse files Browse the repository at this point in the history
  • Loading branch information
michelvocks committed Jun 14, 2018
1 parent 45df36e commit b20442b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/client/views/pipeline/detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ export default {
jobLog () {
var jobid = null
if (this.job) {
jobid = this.job.intervalID
jobid = this.job.internalID
}
// Route
Expand Down
6 changes: 5 additions & 1 deletion handlers/pipeline_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ func GetJobLogs(c echo.Context) error {
jL.Finished = true
}

return c.JSON(http.StatusOK, *jL)
// We always return an array.
// It makes a bit easier in the frontend.
jobLogsList := []jobLogs{}
jobLogsList = append(jobLogsList, *jL)
return c.JSON(http.StatusOK, jobLogsList)
}
}

Expand Down

0 comments on commit b20442b

Please sign in to comment.