Add ability to view all the dumps

The story is integration of these two API responses
for their respective dumps:

1.Resource and Hostboot dumps:
redfish/v1/Systems/system/LogServices/Dump/Entries
2.BMC Dumps: /redfish/v1/Managers/bmc/LogServices/Dump/Entries

Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com>
Change-Id: I24ded733e682d21904e92e2e8be1951e46d33b09
diff --git a/src/store/modules/Logs/DumpsStore.js b/src/store/modules/Logs/DumpsStore.js
index ac61d2d..746733a 100644
--- a/src/store/modules/Logs/DumpsStore.js
+++ b/src/store/modules/Logs/DumpsStore.js
@@ -10,7 +10,7 @@
     allDumps: (state) => state.allDumps,
   },
   mutations: {
-    setBmcDumps: (state, dumps) => {
+    setAllDumps: (state, dumps) => {
       state.allDumps = dumps.map((dump) => ({
         data: dump.AdditionalDataURI,
         dateTime: new Date(dump.Created),
@@ -22,10 +22,35 @@
     },
   },
   actions: {
-    async getBmcDumpEntries({ commit }) {
+    async getBmcDumpEntries() {
+      return api
+        .get('/redfish/v1/')
+        .then((response) => api.get(response.data.Managers['@odata.id']))
+        .then((response) => api.get(`${response.data['@odata.id']}/bmc`))
+        .then((response) => api.get(response.data.LogServices['@odata.id']))
+        .then((response) => api.get(`${response.data['@odata.id']}/Dump`))
+        .then((response) => api.get(response.data.Entries['@odata.id']))
+        .catch((error) => console.log(error));
+    },
+    async getSystemDumpEntries() {
+      return api
+        .get('/redfish/v1/')
+        .then((response) => api.get(response.data.Systems['@odata.id']))
+        .then((response) => api.get(`${response.data['@odata.id']}/system`))
+        .then((response) => api.get(response.data.LogServices['@odata.id']))
+        .then((response) => api.get(`${response.data['@odata.id']}/Dump`))
+        .then((response) => api.get(response.data.Entries['@odata.id']))
+        .catch((error) => console.log(error));
+    },
+    async getAllDumps({ commit, dispatch }) {
       return await api
-        .get('/redfish/v1/Managers/bmc/LogServices/Dump/Entries')
-        .then(({ data = {} }) => commit('setBmcDumps', data.Members || []))
+        .all([dispatch('getBmcDumpEntries'), dispatch('getSystemDumpEntries')])
+        .then((response) => {
+          const bmcDumpEntries = response[0].data?.Members || [];
+          const systemDumpEntries = response[1].data?.Members || [];
+          const allDumps = [...bmcDumpEntries, ...systemDumpEntries];
+          commit('setAllDumps', allDumps);
+        })
         .catch((error) => console.log(error));
     },
     async createBmcDump() {
@@ -66,7 +91,7 @@
       return await api
         .all(promises)
         .then((response) => {
-          dispatch('getBmcDumpEntries');
+          dispatch('getAllDumps');
           return response;
         })
         .then(
@@ -95,13 +120,13 @@
         );
     },
     async deleteAllDumps({ commit, state }) {
-      const totalDumpCount = state.bmcDumps.length;
+      const totalDumpCount = state.allDumps.length;
       return await api
         .post(
           '/redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.ClearLog'
         )
         .then(() => {
-          commit('setBmcDumps', []);
+          commit('setAllDumps', []);
           return i18n.tc('pageDumps.toast.successDeleteDump', totalDumpCount);
         })
         .catch((error) => {