summaryrefslogtreecommitdiff
path: root/src/store/modules/Control/ServerLedStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/modules/Control/ServerLedStore.js')
-rw-r--r--src/store/modules/Control/ServerLedStore.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/store/modules/Control/ServerLedStore.js b/src/store/modules/Control/ServerLedStore.js
index 2be7722f..51e09206 100644
--- a/src/store/modules/Control/ServerLedStore.js
+++ b/src/store/modules/Control/ServerLedStore.js
@@ -4,24 +4,24 @@ import i18n from '@/i18n';
const ServerLedStore = {
namespaced: true,
state: {
- indicatorValue: 'Off'
+ indicatorValue: 'Off',
},
getters: {
- getIndicatorValue: state => state.indicatorValue
+ getIndicatorValue: (state) => state.indicatorValue,
},
mutations: {
setIndicatorValue(state, indicatorValue) {
state.indicatorValue = indicatorValue;
- }
+ },
},
actions: {
async getIndicatorValue({ commit }) {
return await api
.get('/redfish/v1/Systems/system')
- .then(response => {
+ .then((response) => {
commit('setIndicatorValue', response.data.IndicatorLED);
})
- .catch(error => console.log(error));
+ .catch((error) => console.log(error));
},
async saveIndicatorLedValue({ commit }, payload) {
return await api
@@ -34,7 +34,7 @@ const ServerLedStore = {
return i18n.t('pageServerLed.toast.successServerLedOff');
}
})
- .catch(error => {
+ .catch((error) => {
console.log(error);
if (payload === 'Lit') {
throw new Error(i18n.t('pageServerLed.toast.errorServerLedOn'));
@@ -42,8 +42,8 @@ const ServerLedStore = {
throw new Error(i18n.t('pageServerLed.toast.errorServerLedOff'));
}
});
- }
- }
+ },
+ },
};
export default ServerLedStore;