From 7affc529b7fba41193c4d48764707e9961cdd22d Mon Sep 17 00:00:00 2001 From: Sandeepa Singh Date: Tue, 6 Jul 2021 16:29:10 +0530 Subject: 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 Change-Id: Ia1ba3a15a243a00f59a2ec646132436eb355a999 --- src/components/AppNavigation/AppNavigationMixin.js | 22 +- src/env/components/AppNavigation/ibm.js | 22 +- src/env/components/AppNavigation/intel.js | 12 +- src/env/router/ibm.js | 24 +- src/env/router/intel.js | 14 +- src/locales/en-US.json | 8 +- src/router/routes.js | 24 +- src/store/index.js | 20 +- src/store/modules/Control/ServerLedStore.js | 55 ---- src/store/modules/HardwareStatus/BmcStore.js | 79 +++++ src/store/modules/HardwareStatus/ChassisStore.js | 89 ++++++ src/store/modules/HardwareStatus/FanStore.js | 50 +++ src/store/modules/HardwareStatus/MemoryStore.js | 39 +++ .../modules/HardwareStatus/PowerSupplyStore.js | 78 +++++ src/store/modules/HardwareStatus/ProcessorStore.js | 104 +++++++ src/store/modules/HardwareStatus/SensorsStore.js | 123 ++++++++ src/store/modules/HardwareStatus/ServerLedStore.js | 55 ++++ src/store/modules/HardwareStatus/SystemStore.js | 72 +++++ src/store/modules/Health/BmcStore.js | 79 ----- src/store/modules/Health/ChassisStore.js | 89 ------ src/store/modules/Health/FanStore.js | 50 --- src/store/modules/Health/MemoryStore.js | 39 --- src/store/modules/Health/PostCodeLogsStore.js | 39 --- src/store/modules/Health/PowerSupplyStore.js | 78 ----- src/store/modules/Health/ProcessorStore.js | 104 ------- src/store/modules/Health/SensorsStore.js | 123 -------- src/store/modules/Health/SystemStore.js | 72 ----- src/store/modules/Logs/PostCodeLogsStore.js | 39 +++ src/views/HardwareStatus/Inventory/Inventory.vue | 180 +++++++++++ .../Inventory/InventoryTableBmcManager.vue | 248 +++++++++++++++ .../Inventory/InventoryTableChassis.vue | 188 +++++++++++ .../Inventory/InventoryTableDimmSlot.vue | 162 ++++++++++ .../Inventory/InventoryTableFans.vue | 187 +++++++++++ .../Inventory/InventoryTablePowerSupplies.vue | 205 ++++++++++++ .../Inventory/InventoryTableProcessors.vue | 248 +++++++++++++++ .../Inventory/InventoryTableSystem.vue | 210 +++++++++++++ src/views/HardwareStatus/Inventory/index.js | 2 + src/views/HardwareStatus/Sensors/Sensors.vue | 253 +++++++++++++++ src/views/HardwareStatus/Sensors/index.js | 2 + src/views/Health/HardwareStatus/HardwareStatus.vue | 174 ----------- .../HardwareStatusTableBmcManager.vue | 252 --------------- .../HardwareStatus/HardwareStatusTableChassis.vue | 188 ----------- .../HardwareStatus/HardwareStatusTableDimmSlot.vue | 162 ---------- .../HardwareStatus/HardwareStatusTableFans.vue | 189 ----------- .../HardwareStatusTablePowerSupplies.vue | 207 ------------- .../HardwareStatusTableProcessors.vue | 250 --------------- .../HardwareStatus/HardwareStatusTableStystem.vue | 210 ------------- src/views/Health/HardwareStatus/index.js | 2 - src/views/Health/PostCodeLogs/PostCodeLogs.vue | 344 --------------------- src/views/Health/PostCodeLogs/index.js | 2 - src/views/Health/Sensors/Sensors.vue | 253 --------------- src/views/Health/Sensors/index.js | 2 - src/views/Logs/PostCodeLogs/PostCodeLogs.vue | 344 +++++++++++++++++++++ src/views/Logs/PostCodeLogs/index.js | 2 + .../unit/__snapshots__/AppNavigation.spec.js.snap | 68 ++-- 55 files changed, 3066 insertions(+), 3070 deletions(-) delete mode 100644 src/store/modules/Control/ServerLedStore.js create mode 100644 src/store/modules/HardwareStatus/BmcStore.js create mode 100644 src/store/modules/HardwareStatus/ChassisStore.js create mode 100644 src/store/modules/HardwareStatus/FanStore.js create mode 100644 src/store/modules/HardwareStatus/MemoryStore.js create mode 100644 src/store/modules/HardwareStatus/PowerSupplyStore.js create mode 100644 src/store/modules/HardwareStatus/ProcessorStore.js create mode 100644 src/store/modules/HardwareStatus/SensorsStore.js create mode 100644 src/store/modules/HardwareStatus/ServerLedStore.js create mode 100644 src/store/modules/HardwareStatus/SystemStore.js delete mode 100644 src/store/modules/Health/BmcStore.js delete mode 100644 src/store/modules/Health/ChassisStore.js delete mode 100644 src/store/modules/Health/FanStore.js delete mode 100644 src/store/modules/Health/MemoryStore.js delete mode 100644 src/store/modules/Health/PostCodeLogsStore.js delete mode 100644 src/store/modules/Health/PowerSupplyStore.js delete mode 100644 src/store/modules/Health/ProcessorStore.js delete mode 100644 src/store/modules/Health/SensorsStore.js delete mode 100644 src/store/modules/Health/SystemStore.js create mode 100644 src/store/modules/Logs/PostCodeLogsStore.js create mode 100644 src/views/HardwareStatus/Inventory/Inventory.vue create mode 100644 src/views/HardwareStatus/Inventory/InventoryTableBmcManager.vue create mode 100644 src/views/HardwareStatus/Inventory/InventoryTableChassis.vue create mode 100644 src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue create mode 100644 src/views/HardwareStatus/Inventory/InventoryTableFans.vue create mode 100644 src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue create mode 100644 src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue create mode 100644 src/views/HardwareStatus/Inventory/InventoryTableSystem.vue create mode 100644 src/views/HardwareStatus/Inventory/index.js create mode 100644 src/views/HardwareStatus/Sensors/Sensors.vue create mode 100644 src/views/HardwareStatus/Sensors/index.js delete mode 100644 src/views/Health/HardwareStatus/HardwareStatus.vue delete mode 100644 src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue delete mode 100644 src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue delete mode 100644 src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue delete mode 100644 src/views/Health/HardwareStatus/HardwareStatusTableFans.vue delete mode 100644 src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue delete mode 100644 src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue delete mode 100644 src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue delete mode 100644 src/views/Health/HardwareStatus/index.js delete mode 100644 src/views/Health/PostCodeLogs/PostCodeLogs.vue delete mode 100644 src/views/Health/PostCodeLogs/index.js delete mode 100644 src/views/Health/Sensors/Sensors.vue delete mode 100644 src/views/Health/Sensors/index.js create mode 100644 src/views/Logs/PostCodeLogs/PostCodeLogs.vue create mode 100644 src/views/Logs/PostCodeLogs/index.js diff --git a/src/components/AppNavigation/AppNavigationMixin.js b/src/components/AppNavigation/AppNavigationMixin.js index 42552da5..10ca5f83 100644 --- a/src/components/AppNavigation/AppNavigationMixin.js +++ b/src/components/AppNavigation/AppNavigationMixin.js @@ -35,27 +35,27 @@ const AppNavigationMixin = { label: this.$t('appNavigation.eventLogs'), route: '/logs/event-logs', }, + { + id: 'post-code-logs', + label: this.$t('appNavigation.postCodeLogs'), + route: '/logs/post-code-logs', + }, ], }, { - id: 'health', - label: this.$t('appNavigation.health'), + id: 'hardware-status', + label: this.$t('appNavigation.hardwareStatus'), icon: 'iconHealth', children: [ { - id: 'hardware-status', - label: this.$t('appNavigation.hardwareStatus'), - route: '/health/hardware-status', - }, - { - id: 'post-code-logs', - label: this.$t('appNavigation.postCodeLogs'), - route: '/health/post-code-logs', + id: 'inventory', + label: this.$t('appNavigation.inventory'), + route: '/hardware-status/inventory', }, { id: 'sensors', label: this.$t('appNavigation.sensors'), - route: '/health/sensors', + route: '/hardware-status/sensors', }, ], }, diff --git a/src/env/components/AppNavigation/ibm.js b/src/env/components/AppNavigation/ibm.js index 8792ccc8..0128d749 100644 --- a/src/env/components/AppNavigation/ibm.js +++ b/src/env/components/AppNavigation/ibm.js @@ -40,27 +40,27 @@ const AppNavigationMixin = { label: this.$t('appNavigation.eventLogs'), route: '/logs/event-logs', }, + { + id: 'post-code-logs', + label: this.$t('appNavigation.postCodeLogs'), + route: '/logs/post-code-logs', + }, ], }, { - id: 'health', - label: this.$t('appNavigation.health'), + id: 'hardware-status', + label: this.$t('appNavigation.hardwareStatus'), icon: 'iconHealth', children: [ { - id: 'hardware-status', - label: this.$t('appNavigation.hardwareStatus'), - route: '/health/hardware-status', - }, - { - id: 'post-code-logs', - label: this.$t('appNavigation.postCodeLogs'), - route: '/health/post-code-logs', + id: 'inventory', + label: this.$t('appNavigation.inventory'), + route: '/hardware-status/inventory', }, { id: 'sensors', label: this.$t('appNavigation.sensors'), - route: '/health/sensors', + route: '/hardware-status/sensors', }, ], }, diff --git a/src/env/components/AppNavigation/intel.js b/src/env/components/AppNavigation/intel.js index 9c3591f5..68557c1b 100644 --- a/src/env/components/AppNavigation/intel.js +++ b/src/env/components/AppNavigation/intel.js @@ -38,19 +38,19 @@ const AppNavigationMixin = { ], }, { - id: 'health', - label: this.$t('appNavigation.health'), + id: 'hardware-status', + label: this.$t('appNavigation.hardwareStatus'), icon: 'iconHealth', children: [ { - id: 'hardware-status', - label: this.$t('appNavigation.hardwareStatus'), - route: '/health/hardware-status', + id: 'inventory', + label: this.$t('appNavigation.inventory'), + route: '/hardware-status/inventory', }, { id: 'sensors', label: this.$t('appNavigation.sensors'), - route: '/health/sensors', + route: '/hardware-status/sensors', }, ], }, diff --git a/src/env/router/ibm.js b/src/env/router/ibm.js index 8b94cf78..208cd976 100644 --- a/src/env/router/ibm.js +++ b/src/env/router/ibm.js @@ -6,7 +6,7 @@ import DateTimeSettings from '@/views/Configuration/DateTimeSettings'; import EventLogs from '@/views/Logs/EventLogs'; import FactoryReset from '@/views/Control/FactoryReset'; import Firmware from '@/views/Configuration/Firmware'; -import HardwareStatus from '@/views/Health/HardwareStatus'; +import Inventory from '@/views/HardwareStatus/Inventory'; import Ldap from '@/views/AccessControl/Ldap'; import LocalUserManagement from '@/views/AccessControl/LocalUserManagement'; import Login from '@/views/Login'; @@ -15,12 +15,12 @@ import ManagePowerUsage from '@/views/Control/ManagePowerUsage'; import NetworkSettings from '@/views/Configuration/NetworkSettings'; import Overview from '@/views/Overview'; import PageNotFound from '@/views/PageNotFound'; -import PostCodeLogs from '@/views/Health/PostCodeLogs'; +import PostCodeLogs from '@/views/Logs/PostCodeLogs'; import PowerRestorePolicy from '@/views/Control/PowerRestorePolicy'; import ProfileSettings from '@/views/ProfileSettings'; import RebootBmc from '@/views/Control/RebootBmc'; import SecuritySettings from '@/views/Configuration/SecuritySettings'; -import Sensors from '@/views/Health/Sensors'; +import Sensors from '@/views/HardwareStatus/Sensors'; import SerialOverLan from '@/views/Control/SerialOverLan'; import SerialOverLanConsole from '@/views/Control/SerialOverLan/SerialOverLanConsole'; import ServerLed from '@/views/Control/ServerLed'; @@ -112,23 +112,23 @@ const routes = [ }, }, { - path: '/health/hardware-status', - name: 'hardware-status', - component: HardwareStatus, + path: '/logs/post-code-logs', + name: 'post-code-logs', + component: PostCodeLogs, meta: { - title: i18n.t('appPageTitle.hardwareStatus'), + title: i18n.t('appPageTitle.postCodeLogs'), }, }, { - path: '/health/post-code-logs', - name: 'post-code-logs', - component: PostCodeLogs, + path: '/hardware-status/inventory', + name: 'inventory', + component: Inventory, meta: { - title: i18n.t('appPageTitle.postCodeLogs'), + title: i18n.t('appPageTitle.inventory'), }, }, { - path: '/health/sensors', + path: '/hardware-status/sensors', name: 'sensors', component: Sensors, meta: { diff --git a/src/env/router/intel.js b/src/env/router/intel.js index 3e3349d0..53ae5d44 100644 --- a/src/env/router/intel.js +++ b/src/env/router/intel.js @@ -5,7 +5,7 @@ import ConsoleLayout from '@/layouts/ConsoleLayout.vue'; import DateTimeSettings from '@/views/Configuration/DateTimeSettings'; import EventLogs from '@/views/Logs/EventLogs'; import Firmware from '@/views/Configuration/Firmware'; -import HardwareStatus from '@/views/Health/HardwareStatus'; +import Inventory from '@/views/HardwareStatus/Inventory'; import Kvm from '@/views/Control/Kvm'; import KvmConsole from '@/views/Control/Kvm/KvmConsole'; import LocalUserManagement from '@/views/AccessControl/LocalUserManagement'; @@ -18,7 +18,7 @@ import PageNotFound from '@/views/PageNotFound'; import ProfileSettings from '@/views/ProfileSettings'; import RebootBmc from '@/views/Control/RebootBmc'; import SecuritySettings from '@/views/Configuration/SecuritySettings'; -import Sensors from '@/views/Health/Sensors'; +import Sensors from '@/views/HardwareStatus/Sensors'; import SerialOverLan from '@/views/Control/SerialOverLan'; import SerialOverLanConsole from '@/views/Control/SerialOverLan/SerialOverLanConsole'; import ServerLed from '@/views/Control/ServerLed'; @@ -108,15 +108,15 @@ const routes = [ }, }, { - path: '/health/hardware-status', - name: 'hardware-status', - component: HardwareStatus, + path: '/hardware-status/inventory', + name: 'inventory', + component: Inventory, meta: { - title: i18n.t('appPageTitle.hardwareStatus'), + title: i18n.t('appPageTitle.Inventory'), }, }, { - path: '/health/sensors', + path: '/hardware-status/sensors', name: 'sensors', component: Sensors, meta: { diff --git a/src/locales/en-US.json b/src/locales/en-US.json index a5fd8202..ee1f6146 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -107,8 +107,8 @@ "eventLogs": "@:appPageTitle.eventLogs", "factoryReset": "@:appPageTitle.factoryReset", "firmware": "@:appPageTitle.firmware", - "hardwareStatus": "@:appPageTitle.hardwareStatus", - "health": "Health", + "hardwareStatus": "Hardware status", + "inventory": "@:appPageTitle.inventory", "kvm": "@:appPageTitle.kvm", "ldap": "@:appPageTitle.ldap", "logs": "Logs", @@ -137,7 +137,7 @@ "eventLogs": "Event logs", "factoryReset": "Factory reset", "firmware": "Firmware", - "hardwareStatus": "Hardware status", + "inventory": "Inventory and LEDs", "kvm": "KVM", "ldap": "LDAP", "localUserManagement": "Local user management", @@ -367,7 +367,7 @@ "verifyUpdateMessage": "Refresh the application to verify firmware updated successfully" } }, - "pageHardwareStatus": { + "pageInventory": { "dimmSlot": "DIMM slot", "fans": "Fans", "powerSupplies": "Power supplies", diff --git a/src/router/routes.js b/src/router/routes.js index 1c5d57b1..3cf10c54 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -5,7 +5,7 @@ import DateTimeSettings from '@/views/Configuration/DateTimeSettings'; import EventLogs from '@/views/Logs/EventLogs'; import FactoryReset from '@/views/Control/FactoryReset'; import Firmware from '@/views/Configuration/Firmware'; -import HardwareStatus from '@/views/Health/HardwareStatus'; +import Inventory from '@/views/HardwareStatus/Inventory'; import Kvm from '@/views/Control/Kvm'; import KvmConsole from '@/views/Control/Kvm/KvmConsole'; import ClientSessions from '../views/AccessControl/ClientSessions'; @@ -17,12 +17,12 @@ import ManagePowerUsage from '@/views/Control/ManagePowerUsage'; import NetworkSettings from '@/views/Configuration/NetworkSettings'; import Overview from '@/views/Overview'; import PageNotFound from '@/views/PageNotFound'; -import PostCodeLogs from '@/views/Health/PostCodeLogs'; +import PostCodeLogs from '@/views/Logs/PostCodeLogs'; import PowerRestorePolicy from '@/views/Control/PowerRestorePolicy'; import ProfileSettings from '@/views/ProfileSettings'; import RebootBmc from '@/views/Control/RebootBmc'; import SecuritySettings from '@/views/Configuration/SecuritySettings'; -import Sensors from '@/views/Health/Sensors'; +import Sensors from '@/views/HardwareStatus/Sensors'; import SerialOverLan from '@/views/Control/SerialOverLan'; import SerialOverLanConsole from '@/views/Control/SerialOverLan/SerialOverLanConsole'; import ServerLed from '@/views/Control/ServerLed'; @@ -112,23 +112,23 @@ const routes = [ }, }, { - path: '/health/hardware-status', - name: 'hardware-status', - component: HardwareStatus, + path: '/logs/post-code-logs', + name: 'post-code-logs', + component: PostCodeLogs, meta: { - title: i18n.t('appPageTitle.hardwareStatus'), + title: i18n.t('appPageTitle.postCodeLogs'), }, }, { - path: '/health/post-code-logs', - name: 'post-code-logs', - component: PostCodeLogs, + path: '/hardware-status/inventory', + name: 'inventory', + component: Inventory, meta: { - title: i18n.t('appPageTitle.postCodeLogs'), + title: i18n.t('appPageTitle.inventory'), }, }, { - path: '/health/sensors', + path: '/hardware-status/sensors', name: 'sensors', component: Sensors, meta: { diff --git a/src/store/index.js b/src/store/index.js index 5aba4663..3ea4c5ab 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -14,16 +14,16 @@ import PowerControlStore from './modules/Control/PowerControlStore'; import PowerPolicyStore from './modules/Control/PowerPolicyStore'; import NetworkSettingStore from './modules/Configuration/NetworkSettingsStore'; import EventLogStore from './modules/Logs/EventLogStore'; -import SensorsStore from './modules/Health/SensorsStore'; -import ServerLedStore from './modules/Control/ServerLedStore'; -import SystemStore from './modules/Health/SystemStore'; -import PowerSupplyStore from './modules/Health/PowerSupplyStore'; -import MemoryStore from './modules/Health/MemoryStore'; -import FanStore from './modules/Health/FanStore'; -import ChassisStore from './modules/Health/ChassisStore'; -import BmcStore from './modules/Health/BmcStore'; -import ProcessorStore from './modules/Health/ProcessorStore'; -import PostCodeLogsStore from './modules/Health/PostCodeLogsStore'; +import SensorsStore from './modules/HardwareStatus/SensorsStore'; +import ServerLedStore from './modules/HardwareStatus/ServerLedStore'; +import SystemStore from './modules/HardwareStatus/SystemStore'; +import PowerSupplyStore from './modules/HardwareStatus/PowerSupplyStore'; +import MemoryStore from './modules/HardwareStatus/MemoryStore'; +import FanStore from './modules/HardwareStatus/FanStore'; +import ChassisStore from './modules/HardwareStatus/ChassisStore'; +import BmcStore from './modules/HardwareStatus/BmcStore'; +import ProcessorStore from './modules/HardwareStatus/ProcessorStore'; +import PostCodeLogsStore from './modules/Logs/PostCodeLogsStore'; import SecuritySettingsStore from './modules/Configuration/SecuritySettingsStore'; import FactoryResetStore from './modules/Control/FactoryResetStore'; diff --git a/src/store/modules/Control/ServerLedStore.js b/src/store/modules/Control/ServerLedStore.js deleted file mode 100644 index a8903e2a..00000000 --- a/src/store/modules/Control/ServerLedStore.js +++ /dev/null @@ -1,55 +0,0 @@ -import api from '@/store/api'; -import i18n from '@/i18n'; - -const ServerLedStore = { - namespaced: true, - state: { - indicatorLedActiveState: false, - }, - getters: { - getIndicatorLedActiveState: (state) => state.indicatorLedActiveState, - }, - mutations: { - setIndicatorLedActiveState(state, indicatorLedActiveState) { - state.indicatorLedActiveState = indicatorLedActiveState; - }, - }, - actions: { - async getIndicatorLedActiveState({ commit }) { - return await api - .get('/redfish/v1/Systems/system') - .then((response) => { - commit( - 'setIndicatorLedActiveState', - response.data.LocationIndicatorActive - ); - }) - .catch((error) => console.log(error)); - }, - async saveIndicatorLedActiveState({ commit }, payload) { - commit('setIndicatorLedActiveState', payload); - return await api - .patch('/redfish/v1/Systems/system', { - LocationIndicatorActive: payload, - }) - .then(() => { - if (payload) { - return i18n.t('pageServerLed.toast.successServerLedOn'); - } else { - return i18n.t('pageServerLed.toast.successServerLedOff'); - } - }) - .catch((error) => { - console.log(error); - commit('setIndicatorLedActiveState', !payload); - if (payload) { - throw new Error(i18n.t('pageServerLed.toast.errorServerLedOn')); - } else { - throw new Error(i18n.t('pageServerLed.toast.errorServerLedOff')); - } - }); - }, - }, -}; - -export default ServerLedStore; diff --git a/src/store/modules/HardwareStatus/BmcStore.js b/src/store/modules/HardwareStatus/BmcStore.js new file mode 100644 index 00000000..f58dc635 --- /dev/null +++ b/src/store/modules/HardwareStatus/BmcStore.js @@ -0,0 +1,79 @@ +import api from '@/store/api'; +import i18n from '@/i18n'; + +const BmcStore = { + namespaced: true, + state: { + bmc: null, + }, + getters: { + bmc: (state) => state.bmc, + }, + mutations: { + setBmcInfo: (state, data) => { + const bmc = {}; + bmc.dateTime = new Date(data.DateTime); + 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.lastResetTime = new Date(data.LastResetTime); + bmc.identifyLed = data.LocationIndicatorActive; + bmc.locationNumber = data.LocationNumber; + bmc.manufacturer = data.manufacturer; + bmc.managerType = data.ManagerType; + bmc.model = data.Model; + bmc.name = data.Name; + 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.sparePartNumber = data.SparePartNumber; + bmc.statusState = data.Status.State; + bmc.uuid = data.UUID; + bmc.uri = data['@odata.id']; + 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)); + }, + async updateIdentifyLedValue({ dispatch }, led) { + const uri = led.uri; + const updatedIdentifyLedValue = { + LocationIndicatorActive: led.identifyLed, + }; + return await api + .patch(uri, updatedIdentifyLedValue) + .then(() => dispatch('getBmcInfo')) + .catch((error) => { + dispatch('getBmcInfo'); + console.log('error', error); + if (led.identifyLed) { + throw new Error( + i18n.t('pageInventory.toast.errorEnableIdentifyLed') + ); + } else { + throw new Error( + i18n.t('pageInventory.toast.errorDisableIdentifyLed') + ); + } + }); + }, + }, +}; + +export default BmcStore; diff --git a/src/store/modules/HardwareStatus/ChassisStore.js b/src/store/modules/HardwareStatus/ChassisStore.js new file mode 100644 index 00000000..b5edef56 --- /dev/null +++ b/src/store/modules/HardwareStatus/ChassisStore.js @@ -0,0 +1,89 @@ +import api from '@/store/api'; +import i18n from '@/i18n'; + +const ChassisStore = { + namespaced: true, + state: { + chassis: [], + }, + getters: { + chassis: (state) => state.chassis, + }, + mutations: { + setChassisInfo: (state, data) => { + state.chassis = data.map((chassis) => { + const { + Id, + Status = {}, + PartNumber, + SerialNumber, + ChassisType, + Manufacturer, + PowerState, + LocationIndicatorActive, + AssetTag, + MaxPowerWatts, + MinPowerWatts, + Name, + } = chassis; + + return { + id: Id, + health: Status.Health, + partNumber: PartNumber, + serialNumber: SerialNumber, + chassisType: ChassisType, + manufacturer: Manufacturer, + powerState: PowerState, + statusState: Status.State, + healthRollup: Status.HealthRollup, + assetTag: AssetTag, + maxPowerWatts: MaxPowerWatts, + minPowerWatts: MinPowerWatts, + name: Name, + identifyLed: LocationIndicatorActive, + uri: chassis['@odata.id'], + }; + }); + }, + }, + actions: { + async getChassisInfo({ commit }) { + return await api + .get('/redfish/v1/Chassis') + .then(({ data: { Members = [] } }) => + Members.map((member) => api.get(member['@odata.id'])) + ) + .then((promises) => api.all(promises)) + .then((response) => { + const data = response.map(({ data }) => data); + commit('setChassisInfo', data); + }) + .catch((error) => console.log(error)); + }, + async updateIdentifyLedValue({ dispatch }, led) { + const uri = led.uri; + const updatedIdentifyLedValue = { + LocationIndicatorActive: led.identifyLed, + }; + return await api + .patch(uri, updatedIdentifyLedValue) + .then(() => dispatch('getChassisInfo')) + .catch((error) => { + dispatch('getChassisInfo'); + console.log('error', error); + if (led.identifyLed) { + throw new Error( + i18n.t('pageInventory.toast.errorEnableIdentifyLed') + ); + } else { + throw new Error( + i18n.t('pageInventory.toast.errorDisableIdentifyLed') + ); + } + }); + }, + }, +}; + +export default ChassisStore; diff --git a/src/store/modules/HardwareStatus/FanStore.js b/src/store/modules/HardwareStatus/FanStore.js new file mode 100644 index 00000000..fca1f326 --- /dev/null +++ b/src/store/modules/HardwareStatus/FanStore.js @@ -0,0 +1,50 @@ +import api from '@/store/api'; + +const FanStore = { + namespaced: true, + state: { + fans: [], + }, + getters: { + fans: (state) => state.fans, + }, + mutations: { + setFanInfo: (state, data) => { + state.fans = data.map((fan) => { + const { + IndicatorLED, + Location, + MemberId, + Name, + Reading, + ReadingUnits, + Status = {}, + PartNumber, + SerialNumber, + } = fan; + return { + id: MemberId, + health: Status.Health, + partNumber: PartNumber, + serialNumber: SerialNumber, + healthRollup: Status.HealthRollup, + identifyLed: IndicatorLED, + locationNumber: Location, + name: Name, + speed: Reading + ' ' + ReadingUnits, + statusState: Status.State, + }; + }); + }, + }, + actions: { + async getFanInfo({ commit }) { + return await api + .get('/redfish/v1/Chassis/chassis/Thermal') + .then(({ data: { Fans = [] } }) => commit('setFanInfo', Fans)) + .catch((error) => console.log(error)); + }, + }, +}; + +export default FanStore; diff --git a/src/store/modules/HardwareStatus/MemoryStore.js b/src/store/modules/HardwareStatus/MemoryStore.js new file mode 100644 index 00000000..cd2478de --- /dev/null +++ b/src/store/modules/HardwareStatus/MemoryStore.js @@ -0,0 +1,39 @@ +import api from '@/store/api'; + +const MemoryStore = { + namespaced: true, + state: { + dimms: [], + }, + getters: { + dimms: (state) => state.dimms, + }, + mutations: { + setMemoryInfo: (state, data) => { + state.dimms = data.map(({ data }) => { + const { Id, Status = {}, PartNumber, SerialNumber } = data; + return { + id: Id, + health: Status.Health, + partNumber: PartNumber, + serialNumber: SerialNumber, + statusState: Status.State, + }; + }); + }, + }, + actions: { + async getDimms({ commit }) { + return await api + .get('/redfish/v1/Systems/system/Memory') + .then(({ data: { Members } }) => { + const promises = Members.map((item) => api.get(item['@odata.id'])); + return api.all(promises); + }) + .then((response) => commit('setMemoryInfo', response)) + .catch((error) => console.log(error)); + }, + }, +}; + +export default MemoryStore; diff --git a/src/store/modules/HardwareStatus/PowerSupplyStore.js b/src/store/modules/HardwareStatus/PowerSupplyStore.js new file mode 100644 index 00000000..f7be2809 --- /dev/null +++ b/src/store/modules/HardwareStatus/PowerSupplyStore.js @@ -0,0 +1,78 @@ +import api from '@/store/api'; + +const PowerSupplyStore = { + namespaced: true, + state: { + powerSupplies: [], + }, + getters: { + powerSupplies: (state) => state.powerSupplies, + }, + mutations: { + setPowerSupply: (state, data) => { + state.powerSupplies = data.map((powerSupply) => { + const { + EfficiencyPercent, + FirmwareVersion, + LocationIndicatorActive, + MemberId, + Manufacturer, + Model, + Name, + PartNumber, + PowerInputWatts, + SerialNumber, + SparePartNumber, + Status = {}, + } = powerSupply; + return { + id: MemberId, + health: Status.Health, + partNumber: PartNumber, + serialNumber: SerialNumber, + efficiencyPercent: EfficiencyPercent, + firmwareVersion: FirmwareVersion, + identifyLed: LocationIndicatorActive, + manufacturer: Manufacturer, + model: Model, + powerInputWatts: PowerInputWatts, + name: Name, + sparePartNumber: SparePartNumber, + statusState: Status.State, + }; + }); + }, + }, + actions: { + async getChassisCollection() { + return await api + .get('/redfish/v1/Chassis') + .then(({ data: { Members } }) => + Members.map((member) => member['@odata.id']) + ) + .catch((error) => console.log(error)); + }, + async getAllPowerSupplies({ dispatch, commit }) { + const collection = await dispatch('getChassisCollection'); + if (!collection) return; + return await api + .all(collection.map((chassis) => dispatch('getChassisPower', chassis))) + .then((supplies) => { + let suppliesList = []; + supplies.forEach( + (supply) => (suppliesList = [...suppliesList, ...supply]) + ); + commit('setPowerSupply', suppliesList); + }) + .catch((error) => console.log(error)); + }, + async getChassisPower(_, id) { + return await api + .get(`${id}/Power`) + .then(({ data: { PowerSupplies } }) => PowerSupplies || []) + .catch((error) => console.log(error)); + }, + }, +}; + +export default PowerSupplyStore; diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js new file mode 100644 index 00000000..c7cbbeea --- /dev/null +++ b/src/store/modules/HardwareStatus/ProcessorStore.js @@ -0,0 +1,104 @@ +import api from '@/store/api'; +import i18n from '@/i18n'; + +const ProcessorStore = { + namespaced: true, + state: { + processors: [], + }, + getters: { + processors: (state) => state.processors, + }, + mutations: { + setProcessorsInfo: (state, data) => { + state.processors = data.map((processor) => { + const { + Id, + Status = {}, + PartNumber, + SerialNumber, + SparePartNumber, + InstructionSet, + Manufacturer, + Model, + Name, + ProcessorArchitecture, + ProcessorType, + Version, + AssetTag, + MinSpeedMHz, + MaxSpeedMHz, + TotalCores, + TotalThreads, + LocationNumber, + LocationIndicatorActive, + } = processor; + return { + id: Id, + health: Status.Health, + healthRollup: Status.HealthRollup, + partNumber: PartNumber, + sparePartNumber: SparePartNumber, + serialNumber: SerialNumber, + statusState: Status.State, + instructionSet: InstructionSet, + manufacturer: Manufacturer, + model: Model, + name: Name, + processorArchitecture: ProcessorArchitecture, + processorType: ProcessorType, + version: Version, + assetTag: AssetTag, + minSpeedMHz: MinSpeedMHz, + maxSpeedMHz: MaxSpeedMHz, + totalCores: TotalCores, + totalThreads: TotalThreads, + locationNumber: LocationNumber, + identifyLed: LocationIndicatorActive, + uri: processor['@odata.id'], + }; + }); + }, + }, + actions: { + async getProcessorsInfo({ commit }) { + return await api + .get('/redfish/v1/Systems/system/Processors') + .then(({ data: { Members = [] } }) => + Members.map((member) => api.get(member['@odata.id'])) + ) + .then((promises) => api.all(promises)) + .then((response) => { + const data = response.map(({ data }) => data); + commit('setProcessorsInfo', data); + }) + .catch((error) => console.log(error)); + }, + // Waiting for the following to be merged to test the Identify Led: + // https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/37045 + async updateIdentifyLedValue({ dispatch }, led) { + const uri = led.uri; + const updatedIdentifyLedValue = { + LocationIndicatorActive: led.identifyLed, + }; + return await api + .patch(uri, updatedIdentifyLedValue) + .then(() => dispatch('getProcessorsInfo')) + .catch((error) => { + dispatch('getProcessorsInfo'); + console.log('error', error); + if (led.identifyLed) { + throw new Error( + i18n.t('pageInventory.toast.errorEnableIdentifyLed') + ); + } else { + throw new Error( + i18n.t('pageInventory.toast.errorDisableIdentifyLed') + ); + } + }); + }, + }, +}; + +export default ProcessorStore; diff --git a/src/store/modules/HardwareStatus/SensorsStore.js b/src/store/modules/HardwareStatus/SensorsStore.js new file mode 100644 index 00000000..0af2a95b --- /dev/null +++ b/src/store/modules/HardwareStatus/SensorsStore.js @@ -0,0 +1,123 @@ +import api from '@/store/api'; +import { uniqBy } from 'lodash'; + +const SensorsStore = { + namespaced: true, + state: { + sensors: [], + }, + getters: { + sensors: (state) => state.sensors, + }, + mutations: { + setSensors: (state, sensors) => { + state.sensors = uniqBy([...state.sensors, ...sensors], 'name'); + }, + }, + actions: { + async getAllSensors({ dispatch }) { + const collection = await dispatch('getChassisCollection'); + if (!collection) return; + const promises = collection.reduce((acc, id) => { + acc.push(dispatch('getSensors', id)); + acc.push(dispatch('getThermalSensors', id)); + acc.push(dispatch('getPowerSensors', id)); + return acc; + }, []); + return await api.all(promises); + }, + async getChassisCollection() { + return await api + .get('/redfish/v1/Chassis') + .then(({ data: { Members } }) => + Members.map((member) => member['@odata.id']) + ) + .catch((error) => console.log(error)); + }, + async getSensors({ commit }, id) { + const sensors = await api + .get(`${id}/Sensors`) + .then((response) => response.data.Members) + .catch((error) => console.log(error)); + if (!sensors) return; + const promises = sensors.map((sensor) => { + return api.get(sensor['@odata.id']).catch((error) => { + console.log(error); + return error; + }); + }); + return await api.all(promises).then( + api.spread((...responses) => { + const sensorData = responses.map(({ data }) => { + return { + name: data.Name, + status: data.Status.Health, + currentValue: data.Reading, + lowerCaution: data.Thresholds?.LowerCaution?.Reading, + upperCaution: data.Thresholds?.UpperCaution?.Reading, + lowerCritical: data.Thresholds?.LowerCritical?.Reading, + upperCritical: data.Thresholds?.UpperCritical?.Reading, + units: data.ReadingUnits, + }; + }); + commit('setSensors', sensorData); + }) + ); + }, + async getThermalSensors({ commit }, id) { + return await api + .get(`${id}/Thermal`) + .then(({ data: { Fans = [], Temperatures = [] } }) => { + const sensorData = []; + Fans.forEach((sensor) => { + sensorData.push({ + name: sensor.Name, + status: sensor.Status.Health, + currentValue: sensor.Reading, + lowerCaution: sensor.LowerThresholdNonCritical, + upperCaution: sensor.UpperThresholdNonCritical, + lowerCritical: sensor.LowerThresholdCritical, + upperCritical: sensor.UpperThresholdCritical, + units: sensor.ReadingUnits, + }); + }); + Temperatures.forEach((sensor) => { + sensorData.push({ + name: sensor.Name, + status: sensor.Status.Health, + currentValue: sensor.ReadingCelsius, + lowerCaution: sensor.LowerThresholdNonCritical, + upperCaution: sensor.UpperThresholdNonCritical, + lowerCritical: sensor.LowerThresholdCritical, + upperCritical: sensor.UpperThresholdCritical, + units: '℃', + }); + }); + commit('setSensors', sensorData); + }) + .catch((error) => console.log(error)); + }, + async getPowerSensors({ commit }, id) { + return await api + .get(`${id}/Power`) + .then(({ data: { Voltages = [] } }) => { + const sensorData = Voltages.map((sensor) => { + return { + name: sensor.Name, + status: sensor.Status.Health, + currentValue: sensor.ReadingVolts, + lowerCaution: sensor.LowerThresholdNonCritical, + upperCaution: sensor.UpperThresholdNonCritical, + lowerCritical: sensor.LowerThresholdCritical, + upperCritical: sensor.UpperThresholdCritical, + units: 'Volts', + }; + }); + commit('setSensors', sensorData); + }) + .catch((error) => console.log(error)); + }, + }, +}; + +export default SensorsStore; diff --git a/src/store/modules/HardwareStatus/ServerLedStore.js b/src/store/modules/HardwareStatus/ServerLedStore.js new file mode 100644 index 00000000..a8903e2a --- /dev/null +++ b/src/store/modules/HardwareStatus/ServerLedStore.js @@ -0,0 +1,55 @@ +import api from '@/store/api'; +import i18n from '@/i18n'; + +const ServerLedStore = { + namespaced: true, + state: { + indicatorLedActiveState: false, + }, + getters: { + getIndicatorLedActiveState: (state) => state.indicatorLedActiveState, + }, + mutations: { + setIndicatorLedActiveState(state, indicatorLedActiveState) { + state.indicatorLedActiveState = indicatorLedActiveState; + }, + }, + actions: { + async getIndicatorLedActiveState({ commit }) { + return await api + .get('/redfish/v1/Systems/system') + .then((response) => { + commit( + 'setIndicatorLedActiveState', + response.data.LocationIndicatorActive + ); + }) + .catch((error) => console.log(error)); + }, + async saveIndicatorLedActiveState({ commit }, payload) { + commit('setIndicatorLedActiveState', payload); + return await api + .patch('/redfish/v1/Systems/system', { + LocationIndicatorActive: payload, + }) + .then(() => { + if (payload) { + return i18n.t('pageServerLed.toast.successServerLedOn'); + } else { + return i18n.t('pageServerLed.toast.successServerLedOff'); + } + }) + .catch((error) => { + console.log(error); + commit('setIndicatorLedActiveState', !payload); + if (payload) { + throw new Error(i18n.t('pageServerLed.toast.errorServerLedOn')); + } else { + throw new Error(i18n.t('pageServerLed.toast.errorServerLedOff')); + } + }); + }, + }, +}; + +export default ServerLedStore; diff --git a/src/store/modules/HardwareStatus/SystemStore.js b/src/store/modules/HardwareStatus/SystemStore.js new file mode 100644 index 00000000..55f37542 --- /dev/null +++ b/src/store/modules/HardwareStatus/SystemStore.js @@ -0,0 +1,72 @@ +import api from '@/store/api'; +import i18n from '@/i18n'; + +const SystemStore = { + namespaced: true, + state: { + systems: [], + }, + getters: { + systems: (state) => state.systems, + }, + mutations: { + setSystemInfo: (state, data) => { + const system = {}; + system.assetTag = data.AssetTag; + system.description = data.Description; + system.firmwareVersion = data.BiosVersion; + system.hardwareType = data.Name; + system.health = data.Status.Health; + system.id = data.Id; + system.locationIndicatorActive = data.LocationIndicatorActive; + system.locationNumber = data.LocationNumber; + system.manufacturer = data.Manufacturer; + system.memorySummaryHealth = data.MemorySummary.Status.Health; + system.memorySummaryHealthRollup = data.MemorySummary.Status.HealthRollup; + system.memorySummaryState = data.MemorySummary.Status.State; + system.model = data.Model; + system.processorSummaryCount = data.ProcessorSummary.Count; + system.processorSummaryHealth = data.ProcessorSummary.Status.Health; + system.processorSummaryHealthRoll = + data.ProcessorSummary.Status.HealthRollup; + system.processorSummaryState = data.ProcessorSummary.Status.State; + system.powerState = data.PowerState; + system.serialNumber = data.SerialNumber; + system.healthRollup = data.Status.HealthRollup; + system.subModel = data.SubModel; + system.statusState = data.Status.State; + system.systemType = data.SystemType; + state.systems = [system]; + }, + }, + actions: { + async getSystem({ commit }) { + return await api + .get('/redfish/v1/Systems/system') + .then(({ data }) => commit('setSystemInfo', data)) + .catch((error) => console.log(error)); + }, + changeIdentifyLedState({ dispatch }, ledState) { + api + .patch('/redfish/v1/Systems/system', { + LocationIndicatorActive: ledState, + }) + .then(() => dispatch('getSystem')) + .catch((error) => { + dispatch('getSystem'); + console.log('error', error); + if (ledState) { + throw new Error( + i18n.t('pageHardwareStatus.toast.errorEnableIdentifyLed') + ); + } else { + throw new Error( + i18n.t('pageHardwareStatus.toast.errorDisableIdentifyLed') + ); + } + }); + }, + }, +}; + +export default SystemStore; diff --git a/src/store/modules/Health/BmcStore.js b/src/store/modules/Health/BmcStore.js deleted file mode 100644 index bbe157eb..00000000 --- a/src/store/modules/Health/BmcStore.js +++ /dev/null @@ -1,79 +0,0 @@ -import api from '@/store/api'; -import i18n from '@/i18n'; - -const BmcStore = { - namespaced: true, - state: { - bmc: null, - }, - getters: { - bmc: (state) => state.bmc, - }, - mutations: { - setBmcInfo: (state, data) => { - const bmc = {}; - bmc.dateTime = new Date(data.DateTime); - 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.lastResetTime = new Date(data.LastResetTime); - bmc.identifyLed = data.LocationIndicatorActive; - bmc.locationNumber = data.LocationNumber; - bmc.manufacturer = data.manufacturer; - bmc.managerType = data.ManagerType; - bmc.model = data.Model; - bmc.name = data.Name; - 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.sparePartNumber = data.SparePartNumber; - bmc.statusState = data.Status.State; - bmc.uuid = data.UUID; - bmc.uri = data['@odata.id']; - 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)); - }, - async updateIdentifyLedValue({ dispatch }, led) { - const uri = led.uri; - const updatedIdentifyLedValue = { - LocationIndicatorActive: led.identifyLed, - }; - return await api - .patch(uri, updatedIdentifyLedValue) - .then(() => dispatch('getBmcInfo')) - .catch((error) => { - dispatch('getBmcInfo'); - console.log('error', error); - if (led.identifyLed) { - throw new Error( - i18n.t('pageHardwareStatus.toast.errorEnableIdentifyLed') - ); - } else { - throw new Error( - i18n.t('pageHardwareStatus.toast.errorDisableIdentifyLed') - ); - } - }); - }, - }, -}; - -export default BmcStore; diff --git a/src/store/modules/Health/ChassisStore.js b/src/store/modules/Health/ChassisStore.js deleted file mode 100644 index 2faddfbf..00000000 --- a/src/store/modules/Health/ChassisStore.js +++ /dev/null @@ -1,89 +0,0 @@ -import api from '@/store/api'; -import i18n from '@/i18n'; - -const ChassisStore = { - namespaced: true, - state: { - chassis: [], - }, - getters: { - chassis: (state) => state.chassis, - }, - mutations: { - setChassisInfo: (state, data) => { - state.chassis = data.map((chassis) => { - const { - Id, - Status = {}, - PartNumber, - SerialNumber, - ChassisType, - Manufacturer, - PowerState, - LocationIndicatorActive, - AssetTag, - MaxPowerWatts, - MinPowerWatts, - Name, - } = chassis; - - return { - id: Id, - health: Status.Health, - partNumber: PartNumber, - serialNumber: SerialNumber, - chassisType: ChassisType, - manufacturer: Manufacturer, - powerState: PowerState, - statusState: Status.State, - healthRollup: Status.HealthRollup, - assetTag: AssetTag, - maxPowerWatts: MaxPowerWatts, - minPowerWatts: MinPowerWatts, - name: Name, - identifyLed: LocationIndicatorActive, - uri: chassis['@odata.id'], - }; - }); - }, - }, - actions: { - async getChassisInfo({ commit }) { - return await api - .get('/redfish/v1/Chassis') - .then(({ data: { Members = [] } }) => - Members.map((member) => api.get(member['@odata.id'])) - ) - .then((promises) => api.all(promises)) - .then((response) => { - const data = response.map(({ data }) => data); - commit('setChassisInfo', data); - }) - .catch((error) => console.log(error)); - }, - async updateIdentifyLedValue({ dispatch }, led) { - const uri = led.uri; - const updatedIdentifyLedValue = { - LocationIndicatorActive: led.identifyLed, - }; - return await api - .patch(uri, updatedIdentifyLedValue) - .then(() => dispatch('getChassisInfo')) - .catch((error) => { - dispatch('getChassisInfo'); - console.log('error', error); - if (led.identifyLed) { - throw new Error( - i18n.t('pageHardwareStatus.toast.errorEnableIdentifyLed') - ); - } else { - throw new Error( - i18n.t('pageHardwareStatus.toast.errorDisableIdentifyLed') - ); - } - }); - }, - }, -}; - -export default ChassisStore; diff --git a/src/store/modules/Health/FanStore.js b/src/store/modules/Health/FanStore.js deleted file mode 100644 index fca1f326..00000000 --- a/src/store/modules/Health/FanStore.js +++ /dev/null @@ -1,50 +0,0 @@ -import api from '@/store/api'; - -const FanStore = { - namespaced: true, - state: { - fans: [], - }, - getters: { - fans: (state) => state.fans, - }, - mutations: { - setFanInfo: (state, data) => { - state.fans = data.map((fan) => { - const { - IndicatorLED, - Location, - MemberId, - Name, - Reading, - ReadingUnits, - Status = {}, - PartNumber, - SerialNumber, - } = fan; - return { - id: MemberId, - health: Status.Health, - partNumber: PartNumber, - serialNumber: SerialNumber, - healthRollup: Status.HealthRollup, - identifyLed: IndicatorLED, - locationNumber: Location, - name: Name, - speed: Reading + ' ' + ReadingUnits, - statusState: Status.State, - }; - }); - }, - }, - actions: { - async getFanInfo({ commit }) { - return await api - .get('/redfish/v1/Chassis/chassis/Thermal') - .then(({ data: { Fans = [] } }) => commit('setFanInfo', Fans)) - .catch((error) => console.log(error)); - }, - }, -}; - -export default FanStore; diff --git a/src/store/modules/Health/MemoryStore.js b/src/store/modules/Health/MemoryStore.js deleted file mode 100644 index cd2478de..00000000 --- a/src/store/modules/Health/MemoryStore.js +++ /dev/null @@ -1,39 +0,0 @@ -import api from '@/store/api'; - -const MemoryStore = { - namespaced: true, - state: { - dimms: [], - }, - getters: { - dimms: (state) => state.dimms, - }, - mutations: { - setMemoryInfo: (state, data) => { - state.dimms = data.map(({ data }) => { - const { Id, Status = {}, PartNumber, SerialNumber } = data; - return { - id: Id, - health: Status.Health, - partNumber: PartNumber, - serialNumber: SerialNumber, - statusState: Status.State, - }; - }); - }, - }, - actions: { - async getDimms({ commit }) { - return await api - .get('/redfish/v1/Systems/system/Memory') - .then(({ data: { Members } }) => { - const promises = Members.map((item) => api.get(item['@odata.id'])); - return api.all(promises); - }) - .then((response) => commit('setMemoryInfo', response)) - .catch((error) => console.log(error)); - }, - }, -}; - -export default MemoryStore; diff --git a/src/store/modules/Health/PostCodeLogsStore.js b/src/store/modules/Health/PostCodeLogsStore.js deleted file mode 100644 index ac470ece..00000000 --- a/src/store/modules/Health/PostCodeLogsStore.js +++ /dev/null @@ -1,39 +0,0 @@ -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; diff --git a/src/store/modules/Health/PowerSupplyStore.js b/src/store/modules/Health/PowerSupplyStore.js deleted file mode 100644 index f7be2809..00000000 --- a/src/store/modules/Health/PowerSupplyStore.js +++ /dev/null @@ -1,78 +0,0 @@ -import api from '@/store/api'; - -const PowerSupplyStore = { - namespaced: true, - state: { - powerSupplies: [], - }, - getters: { - powerSupplies: (state) => state.powerSupplies, - }, - mutations: { - setPowerSupply: (state, data) => { - state.powerSupplies = data.map((powerSupply) => { - const { - EfficiencyPercent, - FirmwareVersion, - LocationIndicatorActive, - MemberId, - Manufacturer, - Model, - Name, - PartNumber, - PowerInputWatts, - SerialNumber, - SparePartNumber, - Status = {}, - } = powerSupply; - return { - id: MemberId, - health: Status.Health, - partNumber: PartNumber, - serialNumber: SerialNumber, - efficiencyPercent: EfficiencyPercent, - firmwareVersion: FirmwareVersion, - identifyLed: LocationIndicatorActive, - manufacturer: Manufacturer, - model: Model, - powerInputWatts: PowerInputWatts, - name: Name, - sparePartNumber: SparePartNumber, - statusState: Status.State, - }; - }); - }, - }, - actions: { - async getChassisCollection() { - return await api - .get('/redfish/v1/Chassis') - .then(({ data: { Members } }) => - Members.map((member) => member['@odata.id']) - ) - .catch((error) => console.log(error)); - }, - async getAllPowerSupplies({ dispatch, commit }) { - const collection = await dispatch('getChassisCollection'); - if (!collection) return; - return await api - .all(collection.map((chassis) => dispatch('getChassisPower', chassis))) - .then((supplies) => { - let suppliesList = []; - supplies.forEach( - (supply) => (suppliesList = [...suppliesList, ...supply]) - ); - commit('setPowerSupply', suppliesList); - }) - .catch((error) => console.log(error)); - }, - async getChassisPower(_, id) { - return await api - .get(`${id}/Power`) - .then(({ data: { PowerSupplies } }) => PowerSupplies || []) - .catch((error) => console.log(error)); - }, - }, -}; - -export default PowerSupplyStore; diff --git a/src/store/modules/Health/ProcessorStore.js b/src/store/modules/Health/ProcessorStore.js deleted file mode 100644 index 15314663..00000000 --- a/src/store/modules/Health/ProcessorStore.js +++ /dev/null @@ -1,104 +0,0 @@ -import api from '@/store/api'; -import i18n from '@/i18n'; - -const ProcessorStore = { - namespaced: true, - state: { - processors: [], - }, - getters: { - processors: (state) => state.processors, - }, - mutations: { - setProcessorsInfo: (state, data) => { - state.processors = data.map((processor) => { - const { - Id, - Status = {}, - PartNumber, - SerialNumber, - SparePartNumber, - InstructionSet, - Manufacturer, - Model, - Name, - ProcessorArchitecture, - ProcessorType, - Version, - AssetTag, - MinSpeedMHz, - MaxSpeedMHz, - TotalCores, - TotalThreads, - LocationNumber, - LocationIndicatorActive, - } = processor; - return { - id: Id, - health: Status.Health, - healthRollup: Status.HealthRollup, - partNumber: PartNumber, - sparePartNumber: SparePartNumber, - serialNumber: SerialNumber, - statusState: Status.State, - instructionSet: InstructionSet, - manufacturer: Manufacturer, - model: Model, - name: Name, - processorArchitecture: ProcessorArchitecture, - processorType: ProcessorType, - version: Version, - assetTag: AssetTag, - minSpeedMHz: MinSpeedMHz, - maxSpeedMHz: MaxSpeedMHz, - totalCores: TotalCores, - totalThreads: TotalThreads, - locationNumber: LocationNumber, - identifyLed: LocationIndicatorActive, - uri: processor['@odata.id'], - }; - }); - }, - }, - actions: { - async getProcessorsInfo({ commit }) { - return await api - .get('/redfish/v1/Systems/system/Processors') - .then(({ data: { Members = [] } }) => - Members.map((member) => api.get(member['@odata.id'])) - ) - .then((promises) => api.all(promises)) - .then((response) => { - const data = response.map(({ data }) => data); - commit('setProcessorsInfo', data); - }) - .catch((error) => console.log(error)); - }, - // Waiting for the following to be merged to test the Identify Led: - // https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/37045 - async updateIdentifyLedValue({ dispatch }, led) { - const uri = led.uri; - const updatedIdentifyLedValue = { - LocationIndicatorActive: led.identifyLed, - }; - return await api - .patch(uri, updatedIdentifyLedValue) - .then(() => dispatch('getProcessorsInfo')) - .catch((error) => { - dispatch('getProcessorsInfo'); - console.log('error', error); - if (led.identifyLed) { - throw new Error( - i18n.t('pageHardwareStatus.toast.errorEnableIdentifyLed') - ); - } else { - throw new Error( - i18n.t('pageHardwareStatus.toast.errorDisableIdentifyLed') - ); - } - }); - }, - }, -}; - -export default ProcessorStore; diff --git a/src/store/modules/Health/SensorsStore.js b/src/store/modules/Health/SensorsStore.js deleted file mode 100644 index 0af2a95b..00000000 --- a/src/store/modules/Health/SensorsStore.js +++ /dev/null @@ -1,123 +0,0 @@ -import api from '@/store/api'; -import { uniqBy } from 'lodash'; - -const SensorsStore = { - namespaced: true, - state: { - sensors: [], - }, - getters: { - sensors: (state) => state.sensors, - }, - mutations: { - setSensors: (state, sensors) => { - state.sensors = uniqBy([...state.sensors, ...sensors], 'name'); - }, - }, - actions: { - async getAllSensors({ dispatch }) { - const collection = await dispatch('getChassisCollection'); - if (!collection) return; - const promises = collection.reduce((acc, id) => { - acc.push(dispatch('getSensors', id)); - acc.push(dispatch('getThermalSensors', id)); - acc.push(dispatch('getPowerSensors', id)); - return acc; - }, []); - return await api.all(promises); - }, - async getChassisCollection() { - return await api - .get('/redfish/v1/Chassis') - .then(({ data: { Members } }) => - Members.map((member) => member['@odata.id']) - ) - .catch((error) => console.log(error)); - }, - async getSensors({ commit }, id) { - const sensors = await api - .get(`${id}/Sensors`) - .then((response) => response.data.Members) - .catch((error) => console.log(error)); - if (!sensors) return; - const promises = sensors.map((sensor) => { - return api.get(sensor['@odata.id']).catch((error) => { - console.log(error); - return error; - }); - }); - return await api.all(promises).then( - api.spread((...responses) => { - const sensorData = responses.map(({ data }) => { - return { - name: data.Name, - status: data.Status.Health, - currentValue: data.Reading, - lowerCaution: data.Thresholds?.LowerCaution?.Reading, - upperCaution: data.Thresholds?.UpperCaution?.Reading, - lowerCritical: data.Thresholds?.LowerCritical?.Reading, - upperCritical: data.Thresholds?.UpperCritical?.Reading, - units: data.ReadingUnits, - }; - }); - commit('setSensors', sensorData); - }) - ); - }, - async getThermalSensors({ commit }, id) { - return await api - .get(`${id}/Thermal`) - .then(({ data: { Fans = [], Temperatures = [] } }) => { - const sensorData = []; - Fans.forEach((sensor) => { - sensorData.push({ - name: sensor.Name, - status: sensor.Status.Health, - currentValue: sensor.Reading, - lowerCaution: sensor.LowerThresholdNonCritical, - upperCaution: sensor.UpperThresholdNonCritical, - lowerCritical: sensor.LowerThresholdCritical, - upperCritical: sensor.UpperThresholdCritical, - units: sensor.ReadingUnits, - }); - }); - Temperatures.forEach((sensor) => { - sensorData.push({ - name: sensor.Name, - status: sensor.Status.Health, - currentValue: sensor.ReadingCelsius, - lowerCaution: sensor.LowerThresholdNonCritical, - upperCaution: sensor.UpperThresholdNonCritical, - lowerCritical: sensor.LowerThresholdCritical, - upperCritical: sensor.UpperThresholdCritical, - units: '℃', - }); - }); - commit('setSensors', sensorData); - }) - .catch((error) => console.log(error)); - }, - async getPowerSensors({ commit }, id) { - return await api - .get(`${id}/Power`) - .then(({ data: { Voltages = [] } }) => { - const sensorData = Voltages.map((sensor) => { - return { - name: sensor.Name, - status: sensor.Status.Health, - currentValue: sensor.ReadingVolts, - lowerCaution: sensor.LowerThresholdNonCritical, - upperCaution: sensor.UpperThresholdNonCritical, - lowerCritical: sensor.LowerThresholdCritical, - upperCritical: sensor.UpperThresholdCritical, - units: 'Volts', - }; - }); - commit('setSensors', sensorData); - }) - .catch((error) => console.log(error)); - }, - }, -}; - -export default SensorsStore; diff --git a/src/store/modules/Health/SystemStore.js b/src/store/modules/Health/SystemStore.js deleted file mode 100644 index 55f37542..00000000 --- a/src/store/modules/Health/SystemStore.js +++ /dev/null @@ -1,72 +0,0 @@ -import api from '@/store/api'; -import i18n from '@/i18n'; - -const SystemStore = { - namespaced: true, - state: { - systems: [], - }, - getters: { - systems: (state) => state.systems, - }, - mutations: { - setSystemInfo: (state, data) => { - const system = {}; - system.assetTag = data.AssetTag; - system.description = data.Description; - system.firmwareVersion = data.BiosVersion; - system.hardwareType = data.Name; - system.health = data.Status.Health; - system.id = data.Id; - system.locationIndicatorActive = data.LocationIndicatorActive; - system.locationNumber = data.LocationNumber; - system.manufacturer = data.Manufacturer; - system.memorySummaryHealth = data.MemorySummary.Status.Health; - system.memorySummaryHealthRollup = data.MemorySummary.Status.HealthRollup; - system.memorySummaryState = data.MemorySummary.Status.State; - system.model = data.Model; - system.processorSummaryCount = data.ProcessorSummary.Count; - system.processorSummaryHealth = data.ProcessorSummary.Status.Health; - system.processorSummaryHealthRoll = - data.ProcessorSummary.Status.HealthRollup; - system.processorSummaryState = data.ProcessorSummary.Status.State; - system.powerState = data.PowerState; - system.serialNumber = data.SerialNumber; - system.healthRollup = data.Status.HealthRollup; - system.subModel = data.SubModel; - system.statusState = data.Status.State; - system.systemType = data.SystemType; - state.systems = [system]; - }, - }, - actions: { - async getSystem({ commit }) { - return await api - .get('/redfish/v1/Systems/system') - .then(({ data }) => commit('setSystemInfo', data)) - .catch((error) => console.log(error)); - }, - changeIdentifyLedState({ dispatch }, ledState) { - api - .patch('/redfish/v1/Systems/system', { - LocationIndicatorActive: ledState, - }) - .then(() => dispatch('getSystem')) - .catch((error) => { - dispatch('getSystem'); - console.log('error', error); - if (ledState) { - throw new Error( - i18n.t('pageHardwareStatus.toast.errorEnableIdentifyLed') - ); - } else { - throw new Error( - i18n.t('pageHardwareStatus.toast.errorDisableIdentifyLed') - ); - } - }); - }, - }, -}; - -export default SystemStore; 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; diff --git a/src/views/HardwareStatus/Inventory/Inventory.vue b/src/views/HardwareStatus/Inventory/Inventory.vue new file mode 100644 index 00000000..d8b46b25 --- /dev/null +++ b/src/views/HardwareStatus/Inventory/Inventory.vue @@ -0,0 +1,180 @@ + + + diff --git a/src/views/HardwareStatus/Inventory/InventoryTableBmcManager.vue b/src/views/HardwareStatus/Inventory/InventoryTableBmcManager.vue new file mode 100644 index 00000000..6533fd90 --- /dev/null +++ b/src/views/HardwareStatus/Inventory/InventoryTableBmcManager.vue @@ -0,0 +1,248 @@ + + + diff --git a/src/views/HardwareStatus/Inventory/InventoryTableChassis.vue b/src/views/HardwareStatus/Inventory/InventoryTableChassis.vue new file mode 100644 index 00000000..0d535027 --- /dev/null +++ b/src/views/HardwareStatus/Inventory/InventoryTableChassis.vue @@ -0,0 +1,188 @@ + + + diff --git a/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue b/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue new file mode 100644 index 00000000..ed370b53 --- /dev/null +++ b/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue @@ -0,0 +1,162 @@ + + + diff --git a/src/views/HardwareStatus/Inventory/InventoryTableFans.vue b/src/views/HardwareStatus/Inventory/InventoryTableFans.vue new file mode 100644 index 00000000..8f1003fe --- /dev/null +++ b/src/views/HardwareStatus/Inventory/InventoryTableFans.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue b/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue new file mode 100644 index 00000000..1ef5aa71 --- /dev/null +++ b/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue @@ -0,0 +1,205 @@ + + + diff --git a/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue b/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue new file mode 100644 index 00000000..85f12723 --- /dev/null +++ b/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue @@ -0,0 +1,248 @@ + + + diff --git a/src/views/HardwareStatus/Inventory/InventoryTableSystem.vue b/src/views/HardwareStatus/Inventory/InventoryTableSystem.vue new file mode 100644 index 00000000..54129d1f --- /dev/null +++ b/src/views/HardwareStatus/Inventory/InventoryTableSystem.vue @@ -0,0 +1,210 @@ + + + diff --git a/src/views/HardwareStatus/Inventory/index.js b/src/views/HardwareStatus/Inventory/index.js new file mode 100644 index 00000000..c9fde8d2 --- /dev/null +++ b/src/views/HardwareStatus/Inventory/index.js @@ -0,0 +1,2 @@ +import Inventory from './Inventory.vue'; +export default Inventory; diff --git a/src/views/HardwareStatus/Sensors/Sensors.vue b/src/views/HardwareStatus/Sensors/Sensors.vue new file mode 100644 index 00000000..c69532a6 --- /dev/null +++ b/src/views/HardwareStatus/Sensors/Sensors.vue @@ -0,0 +1,253 @@ + + + diff --git a/src/views/HardwareStatus/Sensors/index.js b/src/views/HardwareStatus/Sensors/index.js new file mode 100644 index 00000000..fc71b611 --- /dev/null +++ b/src/views/HardwareStatus/Sensors/index.js @@ -0,0 +1,2 @@ +import Sensors from './Sensors.vue'; +export default Sensors; diff --git a/src/views/Health/HardwareStatus/HardwareStatus.vue b/src/views/Health/HardwareStatus/HardwareStatus.vue deleted file mode 100644 index 3da79dce..00000000 --- a/src/views/Health/HardwareStatus/HardwareStatus.vue +++ /dev/null @@ -1,174 +0,0 @@ - - - diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue b/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue deleted file mode 100644 index 07157448..00000000 --- a/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue +++ /dev/null @@ -1,252 +0,0 @@ - - - diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue b/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue deleted file mode 100644 index 6b783c0f..00000000 --- a/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue +++ /dev/null @@ -1,188 +0,0 @@ - - - diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue b/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue deleted file mode 100644 index ca9e949c..00000000 --- a/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue b/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue deleted file mode 100644 index fb998a38..00000000 --- a/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue +++ /dev/null @@ -1,189 +0,0 @@ - - - diff --git a/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue b/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue deleted file mode 100644 index a3d07655..00000000 --- a/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue +++ /dev/null @@ -1,207 +0,0 @@ - - - diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue b/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue deleted file mode 100644 index e3b5735d..00000000 --- a/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue +++ /dev/null @@ -1,250 +0,0 @@ - - - diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue b/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue deleted file mode 100644 index 1dccd51c..00000000 --- a/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - diff --git a/src/views/Health/HardwareStatus/index.js b/src/views/Health/HardwareStatus/index.js deleted file mode 100644 index 25d4551c..00000000 --- a/src/views/Health/HardwareStatus/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import HardwareStatus from './HardwareStatus.vue'; -export default HardwareStatus; diff --git a/src/views/Health/PostCodeLogs/PostCodeLogs.vue b/src/views/Health/PostCodeLogs/PostCodeLogs.vue deleted file mode 100644 index 1154cbff..00000000 --- a/src/views/Health/PostCodeLogs/PostCodeLogs.vue +++ /dev/null @@ -1,344 +0,0 @@ - - - diff --git a/src/views/Health/PostCodeLogs/index.js b/src/views/Health/PostCodeLogs/index.js deleted file mode 100644 index ab591124..00000000 --- a/src/views/Health/PostCodeLogs/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import PostCodeLogs from './PostCodeLogs.vue'; -export default PostCodeLogs; diff --git a/src/views/Health/Sensors/Sensors.vue b/src/views/Health/Sensors/Sensors.vue deleted file mode 100644 index c69532a6..00000000 --- a/src/views/Health/Sensors/Sensors.vue +++ /dev/null @@ -1,253 +0,0 @@ - - - diff --git a/src/views/Health/Sensors/index.js b/src/views/Health/Sensors/index.js deleted file mode 100644 index fc71b611..00000000 --- a/src/views/Health/Sensors/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Sensors from './Sensors.vue'; -export default Sensors; diff --git a/src/views/Logs/PostCodeLogs/PostCodeLogs.vue b/src/views/Logs/PostCodeLogs/PostCodeLogs.vue new file mode 100644 index 00000000..1154cbff --- /dev/null +++ b/src/views/Logs/PostCodeLogs/PostCodeLogs.vue @@ -0,0 +1,344 @@ + + + diff --git a/src/views/Logs/PostCodeLogs/index.js b/src/views/Logs/PostCodeLogs/index.js new file mode 100644 index 00000000..ab591124 --- /dev/null +++ b/src/views/Logs/PostCodeLogs/index.js @@ -0,0 +1,2 @@ +import PostCodeLogs from './PostCodeLogs.vue'; +export default PostCodeLogs; diff --git a/tests/unit/__snapshots__/AppNavigation.spec.js.snap b/tests/unit/__snapshots__/AppNavigation.spec.js.snap index 04410ca9..92f69509 100644 --- a/tests/unit/__snapshots__/AppNavigation.spec.js.snap +++ b/tests/unit/__snapshots__/AppNavigation.spec.js.snap @@ -117,6 +117,15 @@ exports[`AppNavigation.vue should render correctly 1`] = ` appNavigation.eventLogs + + + appNavigation.postCodeLogs + + @@ -125,10 +134,10 @@ exports[`AppNavigation.vue should render correctly 1`] = ` class="nav-item" >