feat(forklift): Add the succeded state

Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
This commit is contained in:
Marcelo Fukumoto 2026-05-07 13:17:25 +02:00
parent 341f7734a9
commit d195c5dd18
No known key found for this signature in database
GPG Key ID: 1CA12189625C2543

View File

@ -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;