summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjason westover <jwestover@nvidia.com>2024-09-13 01:18:59 +0300
committerSurya Venkatesan <suryav@ami.com>2024-10-03 17:16:53 +0300
commit439681af248b3fe2dc224c4fbbb0dca7e2516cfa (patch)
treea87ec6b3462ed38f24ddfbdc637bd0078e91a01f
parenta27fb4c030ded27a286e3394d8827388d0bed302 (diff)
downloadwebui-vue-439681af248b3fe2dc224c4fbbb0dca7e2516cfa.tar.xz
Add default Target to MultipartHttpPush
When no targets are provided, webui will now default to the BMC: i.e. "/redfish/v1/Managers/bmc" The current version of bmcweb requires the Targets parameter. bmcweb will be updated for multipart to match the behavior of simpleupdate: if Targets is empty or missing, default to the BMC. Also, the fwupdate page will be updated soon to allow the selection of Targets from the FirmwareInventory list. This should be a temp webui fix until we are comfortable with the upcoming changes to bmcweb. Change-Id: I630dcb40068b98aad8e1d276d17fe9af4793e788 Signed-off-by: jason westover <jwestover@nvidia.com>
-rw-r--r--src/store/modules/Operations/FirmwareStore.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/store/modules/Operations/FirmwareStore.js b/src/store/modules/Operations/FirmwareStore.js
index 0015486d..78d3b912 100644
--- a/src/store/modules/Operations/FirmwareStore.js
+++ b/src/store/modules/Operations/FirmwareStore.js
@@ -143,7 +143,13 @@ const FirmwareStore = {
const formData = new FormData();
formData.append('UpdateFile', image);
let params = {};
- if (targets != null && targets.length > 0) params.Targets = targets;
+ if (targets != null && targets.length > 0) {
+ params.Targets = targets;
+ } else {
+ // TODO: Should be OK to leave Targets out, remove this clause
+ // when bmcweb is updated
+ params.Targets = [`${await this.dispatch('global/getBmcPath')}`];
+ }
formData.append('UpdateParameters', JSON.stringify(params));
return await api
.post(state.multipartHttpPushUri, formData, {