Update Firmware page interactions when system is powered on
- if isServerPowerOffRequired is true & !isServerOff is true
a warning will be shown that the server must be powered off
to switch images and update the firmware.
- When system power is on,
the switch to "running button" is disabled.
Signed-off-by: Kenneth Fullbright <kennyneedsmilky@gmail.com>
Change-Id: I65a24984c36f6ae39d715f4fa66e9884d031cb20
diff --git a/src/views/Operations/Firmware/Firmware.vue b/src/views/Operations/Firmware/Firmware.vue
index a2acb9b..44a721a 100644
--- a/src/views/Operations/Firmware/Firmware.vue
+++ b/src/views/Operations/Firmware/Firmware.vue
@@ -10,7 +10,10 @@
<b-row>
<b-col xl="10">
<!-- BMC Firmware -->
- <bmc-cards :is-page-disabled="isPageDisabled" />
+ <bmc-cards
+ :is-page-disabled="isPageDisabled"
+ :is-server-off="isServerOff"
+ />
<!-- Host Firmware -->
<host-cards v-if="!isSingleFileUploadEnabled" />
diff --git a/src/views/Operations/Firmware/FirmwareAlertServerPower.vue b/src/views/Operations/Firmware/FirmwareAlertServerPower.vue
index 24aa1d6..08e4ae9 100644
--- a/src/views/Operations/Firmware/FirmwareAlertServerPower.vue
+++ b/src/views/Operations/Firmware/FirmwareAlertServerPower.vue
@@ -39,6 +39,7 @@
isServerOff: {
required: true,
type: Boolean,
+ default: true,
},
},
computed: {
diff --git a/src/views/Operations/Firmware/FirmwareCardsBmc.vue b/src/views/Operations/Firmware/FirmwareCardsBmc.vue
index d79a876..8fb31aa 100644
--- a/src/views/Operations/Firmware/FirmwareCardsBmc.vue
+++ b/src/views/Operations/Firmware/FirmwareCardsBmc.vue
@@ -39,7 +39,7 @@
variant="link"
size="sm"
class="py-0 px-1 mt-2"
- :disabled="isPageDisabled || !backup"
+ :disabled="isPageDisabled || !backup || !isServerOff"
>
<icon-switch class="d-none d-sm-inline-block" />
{{ $t('pageFirmware.cardActionSwitchToRunning') }}
@@ -68,6 +68,11 @@
type: Boolean,
default: false,
},
+ isServerOff: {
+ required: true,
+ type: Boolean,
+ default: false,
+ },
},
data() {
return {