mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
introduce VM pending status
Signed-off-by: Andy Lee <andy.lee@suse.com> (cherry picked from commit 05ff8e4f19f91387ecf88e1cc214fdfd2b58d921)
This commit is contained in:
parent
ed8c6e81ca
commit
bb645c00db
@ -700,8 +700,25 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
get isBeingStopped() {
|
get isPending() {
|
||||||
if (this && !this.isVMExpectedRunning && this.isVMCreated && this.vmi?.status?.phase !== VMIPhase.Succeeded) {
|
if (this &&
|
||||||
|
!this.isVMExpectedRunning &&
|
||||||
|
this.isVMCreated &&
|
||||||
|
this.vmi?.status?.phase === VMIPhase.Pending
|
||||||
|
) {
|
||||||
|
return { status: VMIPhase.Pending };
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
get isStopping() {
|
||||||
|
if (this &&
|
||||||
|
!this.isVMExpectedRunning &&
|
||||||
|
this.isVMCreated &&
|
||||||
|
this.vmi?.status?.phase !== VMIPhase.Succeeded &&
|
||||||
|
this.vmi?.status?.phase !== VMIPhase.Pending
|
||||||
|
) {
|
||||||
return { status: STOPPING };
|
return { status: STOPPING };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,7 +753,7 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get isUnschedulable() {
|
get isUnschedulable() {
|
||||||
if (this.isBeingStopped || this.isStarting) {
|
if (this.isStopping || this.isStarting) {
|
||||||
const condition = this.status?.conditions?.find((c) => c.reason === UNSCHEDULABLE);
|
const condition = this.status?.conditions?.find((c) => c.reason === UNSCHEDULABLE);
|
||||||
|
|
||||||
if (!!condition) {
|
if (!!condition) {
|
||||||
@ -852,7 +869,8 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
this.isUnschedulable?.status ||
|
this.isUnschedulable?.status ||
|
||||||
this.isPaused?.status ||
|
this.isPaused?.status ||
|
||||||
this.isVMError?.status ||
|
this.isVMError?.status ||
|
||||||
this.isBeingStopped?.status ||
|
this.isPending?.status ||
|
||||||
|
this.isStopping?.status ||
|
||||||
this.isOff?.status ||
|
this.isOff?.status ||
|
||||||
this.isError?.status ||
|
this.isError?.status ||
|
||||||
this.isRunning?.status ||
|
this.isRunning?.status ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user