Skip to content

Commit 90c3434

Browse files
Sukanya Pandeyrfrandse
authored andcommitted
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 "[email protected]" from API "/redfish/v1/Systems/system/" Signed-off-by: Sukanya Pandey <[email protected]> Change-Id: Ibfd5d6b1f08e23ddc8d7deb0f6943ab6dd5b3756
1 parent 6167e5d commit 90c3434

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

src/views/Control/ServerPowerOperations/BootSettings.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,11 @@ export default {
9595
},
9696
},
9797
created() {
98-
Promise.all([
99-
this.$store.dispatch('hostBootSettings/getBootSettings'),
100-
this.$store.dispatch('hostBootSettings/getTpmPolicy'),
101-
]).finally(() =>
102-
this.$root.$emit('server-power-operations-boot-settings-complete')
103-
);
98+
this.$store
99+
.dispatch('hostBootSettings/getTpmPolicy')
100+
.finally(() =>
101+
this.$root.$emit('server-power-operations-boot-settings-complete')
102+
);
104103
},
105104
methods: {
106105
handleSubmit() {

src/views/Control/ServerPowerOperations/ServerPowerOperations.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</b-col>
5050
</b-row>
5151
<b-row>
52-
<b-col sm="8" md="6" xl="4">
52+
<b-col v-if="hasBootSourceOptions" sm="8" md="6" xl="4">
5353
<page-section
5454
:section-title="$t('pageServerPowerOperations.hostOsBootSettings')"
5555
>
@@ -182,6 +182,12 @@ export default {
182182
oneTimeBootEnabled() {
183183
return this.$store.getters['hostBootSettings/overrideEnabled'];
184184
},
185+
hasBootSourceOptions() {
186+
let bootOptions = this.$store.getters[
187+
'hostBootSettings/bootSourceOptions'
188+
];
189+
return bootOptions.length !== 0;
190+
},
185191
},
186192
created() {
187193
this.startLoader();
@@ -191,6 +197,7 @@ export default {
191197
);
192198
});
193199
Promise.all([
200+
this.$store.dispatch('hostBootSettings/getBootSettings'),
194201
this.$store.dispatch('controls/getLastPowerOperationTime'),
195202
bootSettingsPromise,
196203
]).finally(() => this.endLoader());

0 commit comments

Comments
 (0)