diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-06-12 18:29:42 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-06-18 00:18:37 +0300 |
commit | 54c6bfc2d40def4db1bc3a13ab92ee71091b1e4f (patch) | |
tree | 19b739c20f1a61a3459ad130180e6ca376bced32 /src/store/modules/Health | |
parent | 09e8b5d478f212c094b7bea66c570fe0e673756e (diff) | |
download | webui-vue-54c6bfc2d40def4db1bc3a13ab92ee71091b1e4f.tar.xz |
Add BMC manager table to hardware status page
Add properties at /redfish/v1/Managers/bmc endpoint in a
table with expandable row to view details.
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Ieb32a9b2a535ddd7d24edcb68761c51eace2e5a8
Diffstat (limited to 'src/store/modules/Health')
-rw-r--r-- | src/store/modules/Health/BmcStore.js | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/store/modules/Health/BmcStore.js b/src/store/modules/Health/BmcStore.js new file mode 100644 index 00000000..784bd449 --- /dev/null +++ b/src/store/modules/Health/BmcStore.js @@ -0,0 +1,47 @@ +import api from '@/store/api'; + +const ChassisStore = { + namespaced: true, + state: { + bmc: null + }, + getters: { + bmc: state => state.bmc + }, + mutations: { + setBmcInfo: (state, data) => { + const bmc = {}; + bmc.description = data.Description; + bmc.firmwareVersion = data.FirmwareVersion; + bmc.graphicalConsoleConnectTypes = + data.GraphicalConsole.ConnectTypesSupported; + bmc.graphicalConsoleEnabled = data.GraphicalConsole.ServiceEnabled; + bmc.graphicalConsoleMaxSessions = + data.GraphicalConsole.MaxConcurrentSessions; + bmc.health = data.Status.Health; + bmc.healthRollup = data.Status.HealthRollup; + bmc.id = data.Id; + bmc.model = data.Model; + bmc.partNumber = data.PartNumber; + bmc.powerState = data.PowerState; + bmc.serialConsoleConnectTypes = data.SerialConsole.ConnectTypesSupported; + bmc.serialConsoleEnabled = data.SerialConsole.ServiceEnabled; + bmc.serialConsoleMaxSessions = data.SerialConsole.MaxConcurrentSessions; + bmc.serialNumber = data.SerialNumber; + bmc.serviceEntryPointUuid = data.ServiceEntryPointUUID; + bmc.statusState = data.Status.State; + bmc.uuid = data.UUID; + state.bmc = bmc; + } + }, + actions: { + async getBmcInfo({ commit }) { + return await api + .get('/redfish/v1/Managers/bmc') + .then(({ data }) => commit('setBmcInfo', data)) + .catch(error => console.log(error)); + } + } +}; + +export default ChassisStore; |