summaryrefslogtreecommitdiff
path: root/src/store
diff options
context:
space:
mode:
authorDerick Montague <derick.montague@ibm.com>2020-11-29 21:31:20 +0300
committerYoshie Muranaka <yoshiemuranaka@gmail.com>2020-12-02 22:47:36 +0300
commit6483544a7be8f86b37ce817b6cb7ac93db6e322a (patch)
tree6ea995145b730ce26b7321f5d1bfa045cff9560d /src/store
parent04d05ea7ce7de68391820c81ac38090c4f671b4b (diff)
downloadwebui-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')
-rw-r--r--src/store/modules/Control/ServerLedStore.js19
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 {