summaryrefslogtreecommitdiff
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
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
-rw-r--r--.env.ibm3
-rw-r--r--src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue11
2 files changed, 10 insertions, 4 deletions
diff --git a/.env.ibm b/.env.ibm
index 4fe4ab49..34204623 100644
--- a/.env.ibm
+++ b/.env.ibm
@@ -4,4 +4,5 @@ VUE_APP_COMPANY_NAME="IBM"
CUSTOM_STYLES=true
CUSTOM_APP_NAV=true
CUSTOM_ROUTER=true
-CUSTOM_STORE=true \ No newline at end of file
+CUSTOM_STORE=true
+VUE_APP_SERVER_OFF_REQUIRED=true \ No newline at end of file
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 (