changeset 3696:982816fca381

client: keep components in contextboxx alive
author Markus Kottlaender <markus@intevation.de>
date Wed, 19 Jun 2019 11:13:23 +0200
parents 5754793ff9b0
children 9ef98342ffe7
files client/src/components/Contextbox.vue client/src/components/importoverview/ImportOverview.vue
diffstat 2 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/Contextbox.vue	Wed Jun 19 08:53:48 2019 +0200
+++ b/client/src/components/Contextbox.vue	Wed Jun 19 11:13:23 2019 +0200
@@ -1,11 +1,13 @@
 <template>
   <div :class="style">
-    <Bottlenecks v-if="contextBoxContent === 'bottlenecks'" />
-    <Staging v-if="contextBoxContent === 'staging'" />
-    <Stretches v-if="contextBoxContent === 'stretches'" />
-    <Sections v-if="contextBoxContent === 'sections'" />
-    <ImportOverview v-if="contextBoxContent === 'importoverview'" />
-    <ImportConfiguration v-if="contextBoxContent === 'importconfiguration'" />
+    <keep-alive>
+      <Bottlenecks v-if="contextBoxContent === 'bottlenecks'" />
+      <Staging v-if="contextBoxContent === 'staging'" />
+      <Stretches v-if="contextBoxContent === 'stretches'" />
+      <Sections v-if="contextBoxContent === 'sections'" />
+      <ImportOverview v-if="contextBoxContent === 'importoverview'" />
+      <ImportConfiguration v-if="contextBoxContent === 'importconfiguration'" />
+    </keep-alive>
   </div>
 </template>
 
--- a/client/src/components/importoverview/ImportOverview.vue	Wed Jun 19 08:53:48 2019 +0200
+++ b/client/src/components/importoverview/ImportOverview.vue	Wed Jun 19 11:13:23 2019 +0200
@@ -447,7 +447,6 @@
   },
   mounted() {
     this.loadUpdatedLogs();
-    this.selectedInterval = this.$options.LAST_HOUR;
     this.$store.dispatch("usermanagement/loadUsers").catch(error => {
       const { status, data } = error.response;
       displayError({
@@ -462,6 +461,9 @@
       this.$store.commit("application/searchQuery", "");
       this.loadLogs();
     }
+  },
+  activated() {
+    this.loadUpdatedLogs();
   }
 };
 </script>