summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Zhang <xiazhang@nvidia.com>2024-09-27 11:39:50 +0300
committerSurya Venkatesan <suryav@ami.com>2024-10-03 17:48:12 +0300
commit343cf0d96479e928798d42ffeddfc0a0cdb2c16c (patch)
treec64a5ec5cc5a8f74ab435f3b894a273c67dac3ae
parentab05b9ad3c95d736a0c2d215740405a9fd5959ef (diff)
downloadwebui-vue-343cf0d96479e928798d42ffeddfc0a0cdb2c16c.tar.xz
Fix event entry download
Event entry should be downloaded with specific http header of "Accept: application/octet-stream" or "*/*", but the default http header is set to "Accept: application/json", so need to specify the header for event downloading. Refer: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/40136 Tested: Event entry data can be downloaded with the fix. Change-Id: Ia45123340da79a54fc4229470e6822206b8df808 Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
-rw-r--r--src/store/modules/Logs/EventLogStore.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/store/modules/Logs/EventLogStore.js b/src/store/modules/Logs/EventLogStore.js
index 67407c23..360fbf5d 100644
--- a/src/store/modules/Logs/EventLogStore.js
+++ b/src/store/modules/Logs/EventLogStore.js
@@ -226,7 +226,11 @@ const EventLogStore = {
},
async downloadEntry(_, uri) {
return await api
- .get(uri)
+ .get(uri, {
+ headers: {
+ Accept: 'application/octet-stream',
+ },
+ })
.then((response) => {
const blob = new Blob([response.data], {
type: response.headers['content-type'],