Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added extra check if pipeline has no jobs #102

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions frontend/client/views/pipeline/detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ export default {
jobs = pipeline.jobs
}

// check if this pipeline has jobs
if (!jobs) {
return
}

// Check if something has changed
if (this.nodes) {
var redraw = false
Expand Down Expand Up @@ -360,11 +365,13 @@ export default {

checkPipelineArgs () {
// check if this pipeline has args
for (let x = 0, y = this.pipeline.jobs.length; x < y; x++) {
if (this.pipeline.jobs[x].args && this.pipeline.jobs[x].args.type !== 'vault') {
// we found args. Redirect user to params view.
this.$router.push({path: '/pipeline/params', query: { pipelineid: this.pipeline.id }})
return
if (this.pipeline.jobs) {
for (let x = 0, y = this.pipeline.jobs.length; x < y; x++) {
if (this.pipeline.jobs[x].args && this.pipeline.jobs[x].args.type !== 'vault') {
// we found args. Redirect user to params view.
this.$router.push({path: '/pipeline/params', query: { pipelineid: this.pipeline.id }})
return
}
}
}

Expand Down