diff options
author | Sandeepa Singh <sandeepa.singh@ibm.com> | 2021-07-06 13:59:10 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2021-08-10 22:20:42 +0300 |
commit | 7affc529b7fba41193c4d48764707e9961cdd22d (patch) | |
tree | d198c2026a40faf07d622492297aed488b17fccb /src/store/modules/Logs | |
parent | 828dda9b187684902710bb11621eca27bf0c6eec (diff) | |
download | webui-vue-7affc529b7fba41193c4d48764707e9961cdd22d.tar.xz |
IA update: Update health section
This is the second update to information architecture changes and
has the following changes:
- Health section is updated to hardware status section
- Hardware status page is updated to inventory and LEDs page
- Route for sensors page has been updated
Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com>
Change-Id: Ia1ba3a15a243a00f59a2ec646132436eb355a999
Diffstat (limited to 'src/store/modules/Logs')
-rw-r--r-- | src/store/modules/Logs/PostCodeLogsStore.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/store/modules/Logs/PostCodeLogsStore.js b/src/store/modules/Logs/PostCodeLogsStore.js new file mode 100644 index 00000000..ac470ece --- /dev/null +++ b/src/store/modules/Logs/PostCodeLogsStore.js @@ -0,0 +1,39 @@ +import api from '@/store/api'; + +const PostCodeLogsStore = { + namespaced: true, + state: { + allPostCodes: [], + }, + getters: { + allPostCodes: (state) => state.allPostCodes, + }, + mutations: { + setAllPostCodes: (state, allPostCodes) => + (state.allPostCodes = allPostCodes), + }, + actions: { + async getPostCodesLogData({ commit }) { + return await api + .get('/redfish/v1/Systems/system/LogServices/PostCodes/Entries') + .then(({ data: { Members = [] } = {} }) => { + const postCodeLogs = Members.map((log) => { + const { Created, MessageArgs, AdditionalDataURI } = log; + return { + date: new Date(Created), + bootCount: MessageArgs[0], + timeStampOffset: MessageArgs[1], + postCode: MessageArgs[2], + uri: AdditionalDataURI, + }; + }); + commit('setAllPostCodes', postCodeLogs); + }) + .catch((error) => { + console.log('POST Codes Log Data:', error); + }); + }, + }, +}; + +export default PostCodeLogsStore; |