From 05bdca11621aadc480ccf4c131bf57ab1a0919f1 Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Thu, 1 Sep 2022 13:55:17 +0300 Subject: upd bmc time only if server status is on --- src/store/modules/GlobalStore.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/store') diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js index 72f1c473..262d1163 100644 --- a/src/store/modules/GlobalStore.js +++ b/src/store/modules/GlobalStore.js @@ -83,7 +83,10 @@ const GlobalStore = { actions: { changeServerStatus({ commit, dispatch }, status) { commit('setServerStatus', status); - dispatch('getBmcTime'); + + if (serverStateMapper(status) === 'on') { + dispatch('getBmcTime'); + } }, initLiveClock({ commit, state }) { if (state.clockInterval) { -- cgit v1.2.3