changeset 2717:5b990f612420

import_review: rename overview to review. More space for logs
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 19 Mar 2019 10:00:34 +0100
parents eadf9ebc0d6b
children eae8ec732101
files client/src/components/Sidebar.vue client/src/components/importoverview/AdditionalLog.vue client/src/components/importoverview/ApprovedGaugeMeasurementDetail.vue client/src/components/importoverview/BottleneckDetail.vue client/src/components/importoverview/ImportOverview.vue client/src/components/importoverview/SoundingResultDetail.vue client/src/components/importoverview/StretchDetails.vue
diffstat 7 files changed, 78 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/Sidebar.vue	Mon Mar 18 18:52:41 2019 +0100
+++ b/client/src/components/Sidebar.vue	Tue Mar 19 10:00:34 2019 +0100
@@ -34,7 +34,7 @@
               fixed-width
               icon="clipboard-check"
             ></font-awesome-icon>
-            <span class="fix-trans-space" v-translate>Import events</span>
+            <span class="fix-trans-space" v-translate>Import review</span>
             <span class="indicator" v-if="showSidebar && stagingNotifications">
               {{ stagingNotifications }}
             </span>
--- a/client/src/components/importoverview/AdditionalLog.vue	Mon Mar 18 18:52:41 2019 +0100
+++ b/client/src/components/importoverview/AdditionalLog.vue	Tue Mar 19 10:00:34 2019 +0100
@@ -1,5 +1,16 @@
 <template>
-  <div class="additionallog d-flex flex-column text-left">
+  <div
+    :class="[
+      'additionallog',
+      'd-flex',
+      'flex-column',
+      'text-left',
+      {
+        full: showAdditional === $options.NODETAILS,
+        split: showAdditional !== $options.NODETAILS
+      }
+    ]"
+  >
     <div class="d-flex flex-row" v-for="(line, index) in logLines" :key="index">
       <span
         :class="[
@@ -52,6 +63,8 @@
  * Author(s):
  * Thomas Junk <thomas.junk@intevation.de>
  */
+import { mapState } from "vuex";
+
 export default {
   name: "additionallogs",
   props: ["details"],
@@ -59,16 +72,28 @@
     return {
       logLines: this.details.entries
     };
-  }
+  },
+  computed: {
+    ...mapState("imports", ["showAdditional"])
+  },
+  NODETAILS: -1
 };
 </script>
 
 <style lang="scss" scoped>
 .additionallog {
   width: 600px;
-  max-height: 20vh;
   overflow-y: auto;
 }
+
+.split {
+  max-height: 35vh;
+}
+
+.full {
+  max-height: 70vh;
+}
+
 .kind {
   width: 9%;
 }
--- a/client/src/components/importoverview/ApprovedGaugeMeasurementDetail.vue	Mon Mar 18 18:52:41 2019 +0100
+++ b/client/src/components/importoverview/ApprovedGaugeMeasurementDetail.vue	Tue Mar 19 10:00:34 2019 +0100
@@ -1,5 +1,11 @@
 <template>
-  <div class="diffs">
+  <div
+    :class="{
+      diffs: true,
+      full: showLogs === $options.NODETAILS,
+      split: showLogs !== $options.NODETAILS
+    }"
+  >
     <div v-for="(result, index) in details.summary" :key="index">
       <div class="pl-2 d-flex flex-row">
         <div
@@ -100,6 +106,7 @@
  * Author(s):
  * Thomas Junk <thomas.junk@intevation.de>
  */
+import { mapState } from "vuex";
 
 const NODIFF = -1;
 
@@ -111,6 +118,9 @@
       showDiff: NODIFF
     };
   },
+  computed: {
+    ...mapState("imports", ["showLogs"])
+  },
   methods: {
     toggleDiff(number) {
       if (this.showDiff !== number || this.showDiff == NODIFF) {
@@ -119,7 +129,8 @@
         this.showDiff = NODIFF;
       }
     }
-  }
+  },
+  NODETAILS: -1
 };
 </script>
 
@@ -141,4 +152,12 @@
 .agmdetailsvalues {
   width: 33%;
 }
+
+.split {
+  max-height: 35vh;
+}
+
+.full {
+  max-height: 70vh;
+}
 </style>
--- a/client/src/components/importoverview/BottleneckDetail.vue	Mon Mar 18 18:52:41 2019 +0100
+++ b/client/src/components/importoverview/BottleneckDetail.vue	Tue Mar 19 10:00:34 2019 +0100
@@ -1,5 +1,11 @@
 <template>
-  <div class="bottleneckdetails">
+  <div
+    :class="{
+      bottleneckdetails: true,
+      full: showLogs === $options.NODETAILS,
+      split: showLogs !== $options.NODETAILS
+    }"
+  >
     <div
       v-for="(bottleneck, index) in bottlenecks"
       :key="index"
@@ -68,6 +74,7 @@
 import { WFS } from "ol/format.js";
 import { or as orFilter, equalTo as equalToFilter } from "ol/format/filter.js";
 import { displayError } from "@/lib/errors.js";
+import { mapState } from "vuex";
 
 const NO_BOTTLENECK = -1;
 
@@ -83,6 +90,9 @@
   mounted() {
     this.loadBottlenecks();
   },
+  computed: {
+    ...mapState("imports", ["showLogs"])
+  },
   methods: {
     loadBottlenecks() {
       const generateFilter = () => {
@@ -144,14 +154,22 @@
       }
       this.showBottleneckDetail = index;
     }
-  }
+  },
+  NODETAILS: -1
 };
 </script>
 
 <style lang="scss" scoped>
 .bottleneckdetails {
   width: 615px;
-  max-height: 15vh;
   overflow-y: auto;
 }
+
+.split {
+  max-height: 35vh;
+}
+
+.full {
+  max-height: 70vh;
+}
 </style>
--- a/client/src/components/importoverview/ImportOverview.vue	Mon Mar 18 18:52:41 2019 +0100
+++ b/client/src/components/importoverview/ImportOverview.vue	Tue Mar 19 10:00:34 2019 +0100
@@ -2,7 +2,7 @@
   <div class="overview">
     <UIBoxHeader
       icon="clipboard-check"
-      title="Import events"
+      title="Import review"
       :closeCallback="$parent.close"
       :actions="[{ callback: loadLogs, icon: 'redo' }]"
     />
--- a/client/src/components/importoverview/SoundingResultDetail.vue	Mon Mar 18 18:52:41 2019 +0100
+++ b/client/src/components/importoverview/SoundingResultDetail.vue	Tue Mar 19 10:00:34 2019 +0100
@@ -24,6 +24,9 @@
 export default {
   name: "soundingresultdetails",
   props: ["entry", "details"],
+  mounted() {
+    this.$store.commit("imports/hideAdditionalInfo");
+  },
   methods: {
     moveMap(coordinates) {
       this.$store.commit("map/moveMap", {
--- a/client/src/components/importoverview/StretchDetails.vue	Mon Mar 18 18:52:41 2019 +0100
+++ b/client/src/components/importoverview/StretchDetails.vue	Tue Mar 19 10:00:34 2019 +0100
@@ -27,6 +27,9 @@
 export default {
   name: "stretchdetails",
   props: ["entry", "details"],
+  mounted() {
+    this.$store.commit("imports/hideAdditionalInfo");
+  },
   methods: {
     moveToExtent(feature) {
       this.$store.commit("map/moveToExtent", {