mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-08-16 12:49:14 +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');
|
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() {
|
get stateDisplay() {
|
||||||
if (this.planFailed) {
|
if (this.planFailed) {
|
||||||
return 'Error';
|
return 'Error';
|
||||||
@ -61,7 +67,7 @@ export default class ForkliftPlan extends HarvesterResource {
|
|||||||
|
|
||||||
get _availableActions() {
|
get _availableActions() {
|
||||||
const canStop = this.isMigrating && !this.planCanceled;
|
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;
|
const out = super._availableActions;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user