From c312745354245c5f5c25cb90b5a7a6208953a1f5 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Sat, 30 Mar 2019 20:31:06 +0000 Subject: [webapp] fix bug in groups; remember filters in systemlog --- webapp/src/components/GroupModule.vue | 22 ++++-- webapp/src/components/LogModule.vue | 145 ++++++++++++++++------------------ webapp/src/config/store.js | 4 +- webapp/src/store/log.js | 18 +++++ 4 files changed, 105 insertions(+), 84 deletions(-) create mode 100644 webapp/src/store/log.js (limited to 'webapp') diff --git a/webapp/src/components/GroupModule.vue b/webapp/src/components/GroupModule.vue index f351a6b..ccd98cf 100644 --- a/webapp/src/components/GroupModule.vue +++ b/webapp/src/components/GroupModule.vue @@ -68,14 +68,10 @@ export default { }, watch: { activeTab (index) { - const item = this.tabChain[index] - if (item === undefined) return - if (item.tabType !== this.$route.name.replace('GroupModule.', '') || String(item.id) !== this.$route.params.id) { - this.$router.push({ - name: 'GroupModule.' + item.tabType, - params: { id: item.id !== undefined ? item.id : 'create', noReload: true } - }) - } + this.updateUrl() + }, + tabChain (value) { + this.updateUrl() } }, methods: { @@ -90,6 +86,16 @@ export default { const action = type === 'group' ? 'loadGroup' : type === 'client' ? 'loadClient' : null if (action) this.$store.dispatch('groups/' + action, { id, tabIndex: id === 0 ? 0 : 1, switchTab: true }) } + }, + updateUrl () { + const item = this.tabChain[this.activeTab] + if (item === undefined) return + if (item.tabType !== this.$route.name.replace('GroupModule.', '') || String(item.id) !== this.$route.params.id) { + this.$router.push({ + name: 'GroupModule.' + item.tabType, + params: { id: item.id !== undefined ? item.id : 'create', noReload: true } + }) + } } }, created () { diff --git a/webapp/src/components/LogModule.vue b/webapp/src/components/LogModule.vue index dde9975..e30d28e 100644 --- a/webapp/src/components/LogModule.vue +++ b/webapp/src/components/LogModule.vue @@ -49,13 +49,14 @@ {{ $t('filter') }} - + today - {{ toDate ? toDate : $t('today') }} + {{ filter.toDate ? filter.toDate : $t('today') }}