From d195c5dd189f072d0cc562a17426466f06ba84d6 Mon Sep 17 00:00:00 2001 From: Marcelo Fukumoto Date: Thu, 7 May 2026 13:17:25 +0200 Subject: [PATCH] feat(forklift): Add the succeded state Signed-off-by: Marcelo Fukumoto --- pkg/harvester/models/forklift.konveyor.io.plan.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/harvester/models/forklift.konveyor.io.plan.js b/pkg/harvester/models/forklift.konveyor.io.plan.js index 0f2a14a1..1632272d 100644 --- a/pkg/harvester/models/forklift.konveyor.io.plan.js +++ b/pkg/harvester/models/forklift.konveyor.io.plan.js @@ -27,6 +27,12 @@ export default class ForkliftPlan extends HarvesterResource { return conditions.some((c) => c.type === 'Canceled' && c.status === 'True'); } + get planSucceeded() { + const migration = this.status?.migration; + + return !!migration?.completed && !this.planFailed && !this.planCanceled; + } + get stateDisplay() { if (this.planFailed) { return 'Error'; @@ -61,7 +67,7 @@ export default class ForkliftPlan extends HarvesterResource { get _availableActions() { const canStop = this.isMigrating && !this.planCanceled; - const canStart = !this.isMigrating || this.planFailed || this.planCanceled; + const canStart = !this.planSucceeded && (!this.isMigrating || this.planFailed || this.planCanceled); const out = super._availableActions;