Hide and show boot settings override field
-Hide and show boot settings override field as this field will be
available in few systems.
-Visibility of this field is dependent on API value which is
"BootSourceOverrideTarget@Redfish.AllowableValues" from API
"/redfish/v1/Systems/system/"
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com>
Change-Id: Ibfd5d6b1f08e23ddc8d7deb0f6943ab6dd5b3756
diff --git a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue
index d81510b..4ea7765 100644
--- a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue
+++ b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue
@@ -49,7 +49,7 @@
</b-col>
</b-row>
<b-row>
- <b-col sm="8" md="6" xl="4">
+ <b-col v-if="hasBootSourceOptions" sm="8" md="6" xl="4">
<page-section
:section-title="$t('pageServerPowerOperations.hostOsBootSettings')"
>
@@ -182,6 +182,12 @@
oneTimeBootEnabled() {
return this.$store.getters['hostBootSettings/overrideEnabled'];
},
+ hasBootSourceOptions() {
+ let bootOptions = this.$store.getters[
+ 'hostBootSettings/bootSourceOptions'
+ ];
+ return bootOptions.length !== 0;
+ },
},
created() {
this.startLoader();
@@ -191,6 +197,7 @@
);
});
Promise.all([
+ this.$store.dispatch('hostBootSettings/getBootSettings'),
this.$store.dispatch('controls/getLastPowerOperationTime'),
bootSettingsPromise,
]).finally(() => this.endLoader());