summaryrefslogtreecommitdiff
path: root/src/store/modules/HardwareStatus
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/modules/HardwareStatus')
-rw-r--r--src/store/modules/HardwareStatus/BmcStore.js2
-rw-r--r--src/store/modules/HardwareStatus/MemoryStore.js2
-rw-r--r--src/store/modules/HardwareStatus/ProcessorStore.js2
-rw-r--r--src/store/modules/HardwareStatus/ServerLedStore.js4
-rw-r--r--src/store/modules/HardwareStatus/SystemStore.js7
5 files changed, 7 insertions, 10 deletions
diff --git a/src/store/modules/HardwareStatus/BmcStore.js b/src/store/modules/HardwareStatus/BmcStore.js
index d96926ea..f0e4cf96 100644
--- a/src/store/modules/HardwareStatus/BmcStore.js
+++ b/src/store/modules/HardwareStatus/BmcStore.js
@@ -47,7 +47,7 @@ const BmcStore = {
actions: {
async getBmcInfo({ commit }) {
return await api
- .get('/redfish/v1/Managers/bmc')
+ .get(`${await this.dispatch('global/getBmcPath')}`)
.then(({ data }) => commit('setBmcInfo', data))
.catch((error) => console.log(error));
},
diff --git a/src/store/modules/HardwareStatus/MemoryStore.js b/src/store/modules/HardwareStatus/MemoryStore.js
index 787a0502..d9a107d3 100644
--- a/src/store/modules/HardwareStatus/MemoryStore.js
+++ b/src/store/modules/HardwareStatus/MemoryStore.js
@@ -60,7 +60,7 @@ const MemoryStore = {
actions: {
async getDimms({ commit }) {
return await api
- .get('/redfish/v1/Systems/system/Memory')
+ .get(`${await this.dispatch('global/getSystemPath')}/Memory`)
.then(({ data: { Members } }) => {
const promises = Members.map((item) => api.get(item['@odata.id']));
return api.all(promises);
diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js
index 49f96208..446fdb9c 100644
--- a/src/store/modules/HardwareStatus/ProcessorStore.js
+++ b/src/store/modules/HardwareStatus/ProcessorStore.js
@@ -63,7 +63,7 @@ const ProcessorStore = {
actions: {
async getProcessorsInfo({ commit }) {
return await api
- .get('/redfish/v1/Systems/system/Processors')
+ .get(`${await this.dispatch('global/getSystemPath')}/Processors`)
.then(({ data: { Members = [] } }) =>
Members.map((member) => api.get(member['@odata.id'])),
)
diff --git a/src/store/modules/HardwareStatus/ServerLedStore.js b/src/store/modules/HardwareStatus/ServerLedStore.js
index af228022..d4af0648 100644
--- a/src/store/modules/HardwareStatus/ServerLedStore.js
+++ b/src/store/modules/HardwareStatus/ServerLedStore.js
@@ -17,7 +17,7 @@ const ServerLedStore = {
actions: {
async getIndicatorLedActiveState({ commit }) {
return await api
- .get('/redfish/v1/Systems/system')
+ .get(`${await this.dispatch('global/getSystemPath')}`)
.then((response) => {
commit(
'setIndicatorLedActiveState',
@@ -29,7 +29,7 @@ const ServerLedStore = {
async saveIndicatorLedActiveState({ commit }, payload) {
commit('setIndicatorLedActiveState', payload);
return await api
- .patch('/redfish/v1/Systems/system', {
+ .patch(`${await this.dispatch('global/getSystemPath')}`, {
LocationIndicatorActive: payload,
})
.catch((error) => {
diff --git a/src/store/modules/HardwareStatus/SystemStore.js b/src/store/modules/HardwareStatus/SystemStore.js
index ea519d73..87d2810b 100644
--- a/src/store/modules/HardwareStatus/SystemStore.js
+++ b/src/store/modules/HardwareStatus/SystemStore.js
@@ -37,16 +37,13 @@ const SystemStore = {
actions: {
async getSystem({ commit }) {
return await api
- .get('/redfish/v1')
- .then((response) =>
- api.get(`${response.data.Systems['@odata.id']}/system`),
- )
+ .get(`${await this.dispatch('global/getSystemPath')}`)
.then(({ data }) => commit('setSystemInfo', data))
.catch((error) => console.log(error));
},
async changeIdentifyLedState({ commit }, ledState) {
return await api
- .patch('/redfish/v1/Systems/system', {
+ .patch(`${await this.dispatch('global/getSystemPath')}`, {
LocationIndicatorActive: ledState,
})
.then(() => {