From 9f61234ab2e8beea6ebe1f2e9dc445cd3521a0e4 Mon Sep 17 00:00:00 2001 From: Sneha Patel Date: Thu, 2 Sep 2021 12:23:42 -0500 Subject: Location codes on Hardware status-Inventory and LEDs Display location number on hardware inventory items Signed-off-by: Sneha Patel Change-Id: Ib5555191f21ac4546d0b2e2af5b395aaa3a5357e --- src/store/modules/HardwareStatus/BmcStore.js | 2 +- src/store/modules/HardwareStatus/ChassisStore.js | 2 ++ src/store/modules/HardwareStatus/PowerSupplyStore.js | 2 ++ src/store/modules/HardwareStatus/ProcessorStore.js | 4 ++-- src/store/modules/HardwareStatus/SystemStore.js | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/store/modules') diff --git a/src/store/modules/HardwareStatus/BmcStore.js b/src/store/modules/HardwareStatus/BmcStore.js index f58dc635..c042a83a 100644 --- a/src/store/modules/HardwareStatus/BmcStore.js +++ b/src/store/modules/HardwareStatus/BmcStore.js @@ -25,7 +25,7 @@ const BmcStore = { bmc.id = data.Id; bmc.lastResetTime = new Date(data.LastResetTime); bmc.identifyLed = data.LocationIndicatorActive; - bmc.locationNumber = data.LocationNumber; + bmc.locationNumber = data.Location?.PartLocation?.ServiceLabel; bmc.manufacturer = data.manufacturer; bmc.managerType = data.ManagerType; bmc.model = data.Model; diff --git a/src/store/modules/HardwareStatus/ChassisStore.js b/src/store/modules/HardwareStatus/ChassisStore.js index b5edef56..8a08e370 100644 --- a/src/store/modules/HardwareStatus/ChassisStore.js +++ b/src/store/modules/HardwareStatus/ChassisStore.js @@ -25,6 +25,7 @@ const ChassisStore = { MaxPowerWatts, MinPowerWatts, Name, + Location, } = chassis; return { @@ -43,6 +44,7 @@ const ChassisStore = { name: Name, identifyLed: LocationIndicatorActive, uri: chassis['@odata.id'], + locationNumber: Location?.PartLocation?.ServiceLabel, }; }); }, diff --git a/src/store/modules/HardwareStatus/PowerSupplyStore.js b/src/store/modules/HardwareStatus/PowerSupplyStore.js index f7be2809..dc7691da 100644 --- a/src/store/modules/HardwareStatus/PowerSupplyStore.js +++ b/src/store/modules/HardwareStatus/PowerSupplyStore.js @@ -23,6 +23,7 @@ const PowerSupplyStore = { PowerInputWatts, SerialNumber, SparePartNumber, + Location, Status = {}, } = powerSupply; return { @@ -38,6 +39,7 @@ const PowerSupplyStore = { powerInputWatts: PowerInputWatts, name: Name, sparePartNumber: SparePartNumber, + locationNumber: Location?.PartLocation?.ServiceLabel, statusState: Status.State, }; }); diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js index 1c91eacb..d4c99bce 100644 --- a/src/store/modules/HardwareStatus/ProcessorStore.js +++ b/src/store/modules/HardwareStatus/ProcessorStore.js @@ -30,7 +30,7 @@ const ProcessorStore = { MaxSpeedMHz, TotalCores, TotalThreads, - LocationNumber, + Location, LocationIndicatorActive, } = processor; return { @@ -53,7 +53,7 @@ const ProcessorStore = { maxSpeedMHz: MaxSpeedMHz, totalCores: TotalCores, totalThreads: TotalThreads, - locationNumber: LocationNumber, + locationNumber: Location?.PartLocation?.ServiceLabel, identifyLed: LocationIndicatorActive, uri: processor['@odata.id'], }; diff --git a/src/store/modules/HardwareStatus/SystemStore.js b/src/store/modules/HardwareStatus/SystemStore.js index 75b645b6..a94bb14f 100644 --- a/src/store/modules/HardwareStatus/SystemStore.js +++ b/src/store/modules/HardwareStatus/SystemStore.js @@ -19,7 +19,7 @@ const SystemStore = { system.health = data.Status?.Health; system.id = data.Id; system.locationIndicatorActive = data.LocationIndicatorActive; - system.locationNumber = data.LocationNumber; + system.locationNumber = data.Location?.PartLocation?.ServiceLabel; system.manufacturer = data.Manufacturer; system.memorySummaryHealth = data.MemorySummary?.Status.Health; system.memorySummaryHealthRollup = -- cgit v1.2.3