Fixed endpoint for Power PowerControl
Saving power cap value was throwing an error, and it was caused by
incorrect endpoint to PowerControl resource in
Redfish: https://redfish.dmtf.org/schemas/v1/Power.v1_7_1.json
Fixed endpoint for saving Power Cap value
Signed-off-by: Damian Celico <damianx.celico@intel.com>
Change-Id: Ib9117f62548c55eb3f07562b71330675a2101924
diff --git a/src/store/modules/ResourceManagement/PowerControlStore.js b/src/store/modules/ResourceManagement/PowerControlStore.js
index 94c570f..366d3bd 100644
--- a/src/store/modules/ResourceManagement/PowerControlStore.js
+++ b/src/store/modules/ResourceManagement/PowerControlStore.js
@@ -42,7 +42,7 @@
.then((response) => {
const powerControl = response.data.PowerControl;
if (!powerControl || powerControl.length === 0) return;
- const powerCapUri = powerControl[0]['@odata.id'];
+ const powerCapUri = response.data['@odata.id'];
const powerCap = powerControl[0].PowerLimit.LimitInWatts;
// If system is powered off, power consumption does not exist in the PowerControl
const powerConsumption = powerControl[0].PowerConsumedWatts || null;