diff options
author | Sukanya Pandey <sukapan1@in.ibm.com> | 2021-08-19 15:38:22 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2021-08-20 16:34:03 +0300 |
commit | c000265df8ad027b36d13c6f9dcbd6f347533bcb (patch) | |
tree | 1da7780147b9839bb08368a0caed8a43c3cea640 /src | |
parent | 05388966bc9ff2d65e7696c209a5827e82d61297 (diff) | |
download | webui-vue-c000265df8ad027b36d13c6f9dcbd6f347533bcb.tar.xz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/store/modules/HardwareStatus/ProcessorStore.js | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js index c7cbbeea..1c91eacb 100644 --- a/src/store/modules/HardwareStatus/ProcessorStore.js +++ b/src/store/modules/HardwareStatus/ProcessorStore.js @@ -81,22 +81,17 @@ const ProcessorStore = { 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') + ); + } + }); }, }, }; |