From 68bbba296c6f99b81d2882e1fef6f37cf4a6bb51 Mon Sep 17 00:00:00 2001 From: Yoshie Muranaka Date: Mon, 18 May 2020 09:49:37 -0700 Subject: Add date filter on Event logs page Created global TableDateFilter component that uses the BootstrapVue Datepicker with a native text input. This will allow users to manually enter a date in ISO format or use the Bootstrap calendar dropdown. Storing language preference from Login to use locale prop on BootstrapVue Datepicker component. Signed-off-by: Yoshie Muranaka Change-Id: I66de9fb04451572c9a90f90d8522934b6204aed2 --- src/store/modules/GlobalStore.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/store') diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js index 1327422a..42e9e2bf 100644 --- a/src/store/modules/GlobalStore.js +++ b/src/store/modules/GlobalStore.js @@ -30,16 +30,20 @@ const GlobalStore = { namespaced: true, state: { bmcTime: null, - hostStatus: 'unreachable' + hostStatus: 'unreachable', + languagePreference: localStorage.getItem('storedLanguage') || 'en-US' }, getters: { hostStatus: state => state.hostStatus, - bmcTime: state => state.bmcTime + bmcTime: state => state.bmcTime, + languagePreference: state => state.languagePreference }, mutations: { setBmcTime: (state, bmcTime) => (state.bmcTime = bmcTime), setHostStatus: (state, hostState) => - (state.hostStatus = hostStateMapper(hostState)) + (state.hostStatus = hostStateMapper(hostState)), + setLanguagePreference: (state, language) => + (state.languagePreference = language) }, actions: { async getBmcTime({ commit }) { -- cgit v1.2.3