diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-05-18 19:49:37 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2020-06-13 07:49:18 +0300 |
commit | 68bbba296c6f99b81d2882e1fef6f37cf4a6bb51 (patch) | |
tree | f07d9fef5079ef7e9728bcbfc71a4dd3e5cc5aa3 /src/store | |
parent | 71724befc716d373e2fd6396fcd6934277f38f66 (diff) | |
download | webui-vue-68bbba296c6f99b81d2882e1fef6f37cf4a6bb51.tar.xz |
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 <yoshiemuranaka@gmail.com>
Change-Id: I66de9fb04451572c9a90f90d8522934b6204aed2
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/modules/GlobalStore.js | 10 |
1 files changed, 7 insertions, 3 deletions
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 }) { |