Skip to content
Snippets Groups Projects
Commit 06e72217 authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Only allow selecting available worker versions

parent b6875f9a
No related branches found
No related tags found
1 merge request!1407Only allow selecting available worker versions
......@@ -98,9 +98,9 @@ export default {
return ago(new Date(date))
},
async addWorkerRun () {
if (!this.selectable) return
if (!this.selectable || !this.isAvailable) return
this.$emit('selected-version', this.version)
if (this.loading || !this.processId || !this.isAvailable) return
if (this.loading || !this.processId) return
this.loading = true
try {
await this.createWorkerRun({ processId: this.processId, workerRun: { worker_version_id: this.version.id, parents: [] } })
......@@ -111,7 +111,7 @@ export default {
}
},
async rmWorkerRun () {
if (this.loading || !this.processId || !this.isAvailable) return
if (!this.selectable || this.loading || !this.processId || !this.isAvailable) return
this.loading = true
try {
const workerRun = Object.values(this.processWorkerRuns[this.processId]).find(run => run.worker_version_id === this.version.id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment