Resolve bug for identify LED switch in processor table
Bug: While toggling identify LED for cpu0, in return other identify LEDs are also getting toggled which belongs
to different CPUs.
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com>
Change-Id: Ic48eba7b391a28f861e38f306233387819ad944c
diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js
index c7cbbee..1c91eac 100644
--- a/src/store/modules/HardwareStatus/ProcessorStore.js
+++ b/src/store/modules/HardwareStatus/ProcessorStore.js
@@ -81,22 +81,17 @@
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')
- );
- }
- });
+ return await api.patch(uri, updatedIdentifyLedValue).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')
+ );
+ }
+ });
},
},
};