mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-03-21 20:51:45 +00:00
fix: changed logic to use power status from underlying inventory (#707)
Signed-off-by: Gaurav Mehta <gaurav.mehta@suse.com>
This commit is contained in:
parent
93f027a57c
commit
c2df13ad73
@ -536,8 +536,7 @@ export default class HciNode extends HarvesterResource {
|
|||||||
get isStopped() {
|
get isStopped() {
|
||||||
const inventory = this.inventory || {};
|
const inventory = this.inventory || {};
|
||||||
|
|
||||||
return inventory.spec?.powerActionRequested === 'shutdown' &&
|
return inventory.status?.machinePowerState === 'off';
|
||||||
inventory.status?.powerAction?.actionStatus === 'complete';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get isStopping() {
|
get isStopping() {
|
||||||
@ -553,8 +552,7 @@ export default class HciNode extends HarvesterResource {
|
|||||||
get isStarted() {
|
get isStarted() {
|
||||||
const inventory = this.inventory || {};
|
const inventory = this.inventory || {};
|
||||||
|
|
||||||
return inventory.spec?.powerActionRequested === 'poweron' &&
|
return inventory.status?.machinePowerState === 'on';
|
||||||
inventory.status?.powerAction?.actionStatus === 'complete';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get isStarting() {
|
get isStarting() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user