Update single file firmware TFTP upload option
Adds API check for the UpdateService allowable values to determine
whether or not a TFTP upload option is available in UI.
This is part of an effort to make the firmware page more dynamic.
These changes are only visisble with ibm dotenv variables.
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Ied8ac5fa9f0441b1a0762c7a5267e298294eea32
diff --git a/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue b/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue
index 54a2bb1..b7ad4c5 100644
--- a/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue
+++ b/src/env/components/FirmwareSingleImage/FirmwareSingleImage.vue
@@ -101,6 +101,7 @@
<div class="form-background p-3">
<b-form @submit.prevent="onSubmitUpload">
<b-form-group
+ v-if="isTftpUploadAvailable"
:label="$t('pageFirmware.singleFileUpload.fileSource')"
:disabled="isPageDisabled"
>
@@ -258,6 +259,7 @@
'backupFirmwareVersion',
'isRebootFromBackupAvailable',
'systemFirmwareVersion',
+ 'isTftpUploadAvailable',
]),
isPageDisabled() {
if (this.isServerPowerOffRequired) {
@@ -281,7 +283,7 @@
},
created() {
this.startLoader();
- this.$store.dispatch('firmwareSingleImage/getUpdateServiceApplyTime');
+ this.$store.dispatch('firmwareSingleImage/getUpdateServiceSettings');
Promise.all([
this.$store.dispatch('global/getHostStatus'),
this.$store.dispatch('firmwareSingleImage/getFirmwareInformation'),