Location codes on Hardware status-Inventory and LEDs
Display location number on hardware inventory items
Signed-off-by: Sneha Patel <Snehaben.Patel@ibm.com>
Change-Id: Ib5555191f21ac4546d0b2e2af5b395aaa3a5357e
diff --git a/src/store/modules/HardwareStatus/BmcStore.js b/src/store/modules/HardwareStatus/BmcStore.js
index f58dc63..c042a83 100644
--- a/src/store/modules/HardwareStatus/BmcStore.js
+++ b/src/store/modules/HardwareStatus/BmcStore.js
@@ -25,7 +25,7 @@
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 b5edef5..8a08e37 100644
--- a/src/store/modules/HardwareStatus/ChassisStore.js
+++ b/src/store/modules/HardwareStatus/ChassisStore.js
@@ -25,6 +25,7 @@
MaxPowerWatts,
MinPowerWatts,
Name,
+ Location,
} = chassis;
return {
@@ -43,6 +44,7 @@
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 f7be280..dc7691d 100644
--- a/src/store/modules/HardwareStatus/PowerSupplyStore.js
+++ b/src/store/modules/HardwareStatus/PowerSupplyStore.js
@@ -23,6 +23,7 @@
PowerInputWatts,
SerialNumber,
SparePartNumber,
+ Location,
Status = {},
} = powerSupply;
return {
@@ -38,6 +39,7 @@
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 1c91eac..d4c99bc 100644
--- a/src/store/modules/HardwareStatus/ProcessorStore.js
+++ b/src/store/modules/HardwareStatus/ProcessorStore.js
@@ -30,7 +30,7 @@
MaxSpeedMHz,
TotalCores,
TotalThreads,
- LocationNumber,
+ Location,
LocationIndicatorActive,
} = processor;
return {
@@ -53,7 +53,7 @@
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 75b645b..a94bb14 100644
--- a/src/store/modules/HardwareStatus/SystemStore.js
+++ b/src/store/modules/HardwareStatus/SystemStore.js
@@ -19,7 +19,7 @@
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 =