diff options
author | Derick Montague <derick.montague@ibm.com> | 2020-11-29 21:31:20 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-12-02 22:47:36 +0300 |
commit | 6483544a7be8f86b37ce817b6cb7ac93db6e322a (patch) | |
tree | 6ea995145b730ce26b7321f5d1bfa045cff9560d /src/store/modules/Control/ServerLedStore.js | |
parent | 04d05ea7ce7de68391820c81ac38090c4f671b4b (diff) | |
download | webui-vue-6483544a7be8f86b37ce817b6cb7ac93db6e322a.tar.xz |
Refactor server LED indicator variable naming
- Make name consistent between both Overview and Server LED views
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I36601b603bfeb4e9f2b782641dd2813882466c21
Diffstat (limited to 'src/store/modules/Control/ServerLedStore.js')
-rw-r--r-- | src/store/modules/Control/ServerLedStore.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/store/modules/Control/ServerLedStore.js b/src/store/modules/Control/ServerLedStore.js index 26a32ccb..d7c12344 100644 --- a/src/store/modules/Control/ServerLedStore.js +++ b/src/store/modules/Control/ServerLedStore.js @@ -4,32 +4,35 @@ import i18n from '@/i18n'; const ServerLedStore = { namespaced: true, state: { - indicatorValue: false, + indicatorLedActiveState: false, }, getters: { - getIndicatorValue: (state) => state.indicatorValue, + getIndicatorLedActiveState: (state) => state.indicatorLedActiveState, }, mutations: { - setIndicatorValue(state, indicatorValue) { - state.indicatorValue = indicatorValue; + setIndicatorLedActiveState(state, indicatorLedActiveState) { + state.indicatorLedActiveState = indicatorLedActiveState; }, }, actions: { - async getIndicatorValue({ commit }) { + async getIndicatorLedActiveState({ commit }) { return await api .get('/redfish/v1/Systems/system') .then((response) => { - commit('setIndicatorValue', response.data.LocationIndicatorActive); + commit( + 'setIndicatorLedActiveState', + response.data.LocationIndicatorActive + ); }) .catch((error) => console.log(error)); }, - async saveIndicatorLedValue({ commit }, payload) { + async saveIndicatorLedActiveState({ commit }, payload) { return await api .patch('/redfish/v1/Systems/system', { LocationIndicatorActive: payload, }) .then(() => { - commit('setIndicatorValue', payload); + commit('setIndicatorLedActiveState', payload); if (payload) { return i18n.t('pageServerLed.toast.successServerLedOn'); } else { |