summaryrefslogtreecommitdiff
path: root/src/env
diff options
context:
space:
mode:
authorYoshie Muranaka <yoshiemuranaka@gmail.com>2021-02-11 19:27:36 +0300
committerDerick Montague <derick.montague@ibm.com>2021-02-17 00:00:41 +0300
commitfc387aa2963042f4cb75c000811c99aa66abb8ff (patch)
treea41aaf3348bf490dcc99d93d3497a4292e3c6104 /src/env
parentd4ebc2a7a9732d0bb22b51ae8159d6facb2ae1ab (diff)
downloadwebui-vue-fc387aa2963042f4cb75c000811c99aa66abb8ff.tar.xz
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 <yoshiemuranaka@gmail.com> Change-Id: I006e7500855b0acfd0db918e80fffd79a1ec6986
Diffstat (limited to 'src/env')
-rw-r--r--src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue b/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue
index 1089e7a5..54a2bb15 100644
--- a/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue
+++ b/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue
@@ -1,7 +1,7 @@
<template>
<b-container fluid="xl">
<page-title />
- <b-row>
+ <b-row v-if="isServerPowerOffRequired">
<b-col xl="10">
<!-- Operation in progress alert -->
<alert v-if="isOperationInProgress" variant="info" class="mb-5">
@@ -166,7 +166,7 @@
{{ $t('pageFirmware.singleFileUpload.startUpdate') }}
</b-btn>
<alert
- v-if="!isHostOff"
+ v-if="isServerPowerOffRequired && !isHostOff"
variant="warning"
:small="true"
class="mt-4"
@@ -239,6 +239,8 @@ export default {
tftpFileAddress: null,
timeoutId: null,
loading,
+ isServerPowerOffRequired:
+ process.env.VUE_APP_SERVER_OFF_REQUIRED === 'true',
};
},
computed: {
@@ -258,7 +260,10 @@ export default {
'systemFirmwareVersion',
]),
isPageDisabled() {
- return !this.isHostOff || this.loading || this.isOperationInProgress;
+ if (this.isServerPowerOffRequired) {
+ return !this.isHostOff || this.loading || this.isOperationInProgress;
+ }
+ return this.loading || this.isOperationInProgress;
},
showBackupImageStatus() {
return (