Skip to content
Snippets Groups Projects
Commit b93a9567 authored by ml bonhomme's avatar ml bonhomme :bee:
Browse files

Add unavailable model version warning to template selection

parent 93ed68bb
No related branches found
No related tags found
1 merge request!1483Add unavailable model version warning to template selection
......@@ -8,6 +8,9 @@
<div class="notification is-warning" v-if="hasUnavailableWorkerVersions">
This template cannot be applied to a process because it uses one or more worker versions that are not in an Available state.
</div>
<div class="notification is-warning" v-if="hasUnavailableModelVersions">
This template cannot be applied to a process because it uses one or more model versions that are not in an Available state.
</div>
<WorkerRunWithParents
v-for="(workerRun, index) in currentProcessWorkerRuns"
read-only
......@@ -70,6 +73,9 @@ export default {
},
hasUnavailableWorkerVersions () {
return this.currentProcessWorkerRuns.some(run => run.worker_version.state !== 'available')
},
hasUnavailableModelVersions () {
return this.currentProcessWorkerRuns.some(run => run.model_version?.state !== 'available')
}
},
methods: {
......
......@@ -149,7 +149,7 @@ export default {
* - the template only has available worker versions
*/
canApply () {
return this.canSelect && this.selectedTemplateId && !this.loading && !this.hasUnavailableWorkerVersions
return this.canSelect && this.selectedTemplateId && !this.loading && !this.hasUnavailableWorkerVersions && !this.hasUnavailableModelVersions
},
selectedTemplate () {
return this.processes?.[this.selectedTemplateId]
......@@ -158,6 +158,11 @@ export default {
if (this.selectedTemplateId === null) return false
const runs = ensureArray(this.processWorkerRuns[this.selectedTemplateId])
return runs.some(run => run.worker_version.state !== 'available')
},
hasUnavailableModelVersions () {
if (this.selectedTemplateId === null) return false
const runs = ensureArray(this.processWorkerRuns[this.selectedTemplateId])
return runs.some(run => run.model_version?.state !== 'available')
}
},
methods: {
......
......@@ -27,6 +27,13 @@
>
{{ workerRun.worker_version.state }}
</div>
<div
v-if="workerRun.model_vesion?.state !== 'available'"
class="has-text-warning"
title="This worker run uses an unavailable model version"
>
<i class="icon-warning"></i>
</div>
</div>
<ConfigurationsList
v-if="canEdit"
......
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