Skip to content

Commit fc387aa

Browse files
yoshiemuranakaderick-montague
authored andcommitted
Update single file firmware page alerts
Create a dotenv variable to determine whether or not the firmware update is disabled when server is powered on. This is part of an effort to make the firmware page more dynamic. These changes are only visible with the ibm dotenv variables. Signed-off-by: Yoshie Muranaka <[email protected]> Change-Id: I006e7500855b0acfd0db918e80fffd79a1ec6986
1 parent d4ebc2a commit fc387aa

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.env.ibm

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ VUE_APP_COMPANY_NAME="IBM"
44
CUSTOM_STYLES=true
55
CUSTOM_APP_NAV=true
66
CUSTOM_ROUTER=true
7-
CUSTOM_STORE=true
7+
CUSTOM_STORE=true
8+
VUE_APP_SERVER_OFF_REQUIRED=true

src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<b-container fluid="xl">
33
<page-title />
4-
<b-row>
4+
<b-row v-if="isServerPowerOffRequired">
55
<b-col xl="10">
66
<!-- Operation in progress alert -->
77
<alert v-if="isOperationInProgress" variant="info" class="mb-5">
@@ -166,7 +166,7 @@
166166
{{ $t('pageFirmware.singleFileUpload.startUpdate') }}
167167
</b-btn>
168168
<alert
169-
v-if="!isHostOff"
169+
v-if="isServerPowerOffRequired && !isHostOff"
170170
variant="warning"
171171
:small="true"
172172
class="mt-4"
@@ -239,6 +239,8 @@ export default {
239239
tftpFileAddress: null,
240240
timeoutId: null,
241241
loading,
242+
isServerPowerOffRequired:
243+
process.env.VUE_APP_SERVER_OFF_REQUIRED === 'true',
242244
};
243245
},
244246
computed: {
@@ -258,7 +260,10 @@ export default {
258260
'systemFirmwareVersion',
259261
]),
260262
isPageDisabled() {
261-
return !this.isHostOff || this.loading || this.isOperationInProgress;
263+
if (this.isServerPowerOffRequired) {
264+
return !this.isHostOff || this.loading || this.isOperationInProgress;
265+
}
266+
return this.loading || this.isOperationInProgress;
262267
},
263268
showBackupImageStatus() {
264269
return (

0 commit comments

Comments
 (0)