mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-08-16 04:39:15 +00:00
feat(forklift): Add the succeded state
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
This commit is contained in:
parent
341f7734a9
commit
d195c5dd18
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user