changeset 2493:e3487fa9284d octree-diff

Merged default into octree-diff branch.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 04 Mar 2019 11:56:07 +0100
parents 10681749371d (current diff) 408e0f4d4008 (diff)
children a727e0426240
files
diffstat 4 files changed, 37 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/Sidebar.vue	Mon Mar 04 11:55:29 2019 +0100
+++ b/client/src/components/Sidebar.vue	Mon Mar 04 11:56:07 2019 +0100
@@ -199,10 +199,8 @@
         this.contextBoxContent === item &&
         this.routeName == "mainview"
       );
-    }
-  },
-  mounted() {
-    setTimeout(() => {
+    },
+    updateIndicators() {
       this.$store.dispatch("imports/getStaging").catch(error => {
         const { status, data } = error.response;
         displayError({
@@ -210,7 +208,11 @@
           message: `${status}: ${data.message || data}`
         });
       });
-    }, 15000);
+    }
+  },
+  mounted() {
+    this.updateIndicators();
+    setTimeout(this.updateIndicators, 15000);
   }
 };
 </script>
--- a/client/src/components/identify/formatter.js	Mon Mar 04 11:55:29 2019 +0100
+++ b/client/src/components/identify/formatter.js	Mon Mar 04 11:56:07 2019 +0100
@@ -37,6 +37,9 @@
   },
   stretches_geoserver: {
     label: "Stretch"
+  },
+  gauges_geoserver: {
+    label: "Gauge"
   }
 };
 
--- a/client/src/components/systemconfiguration/PDFTemplates.vue	Mon Mar 04 11:55:29 2019 +0100
+++ b/client/src/components/systemconfiguration/PDFTemplates.vue	Mon Mar 04 11:56:07 2019 +0100
@@ -30,10 +30,7 @@
               <td class="text-right">
                 <button
                   class="btn btn-sm btn-dark"
-                  @click="
-                    deleteTemplate(template);
-                    showSuccessUploadMsg = false;
-                  "
+                  @click="deleteTemplate(template)"
                 >
                   <font-awesome-icon icon="trash" />
                 </button>
@@ -42,13 +39,7 @@
           </transition-group>
         </table>
       </transition>
-      <button
-        class="btn btn-info mt-2"
-        @click="
-          $refs.uploadTemplate.click();
-          showSuccessUploadMsg = false;
-        "
-      >
+      <button class="btn btn-info mt-2" @click="$refs.uploadTemplate.click()">
         <font-awesome-icon
           icon="spinner"
           class="fa-spin fa-fw"
@@ -57,11 +48,6 @@
         <font-awesome-icon icon="upload" class="fa-fw" v-else />
         <translate>Upload new template</translate>
       </button>
-      <div v-if="showSuccessUploadMsg" class="text-center">
-        <p class="text-muted" v-translate>
-          {{ templateToUpload.name }} uploaded successfully
-        </p>
-      </div>
     </div>
   </div>
 </template>
@@ -91,16 +77,14 @@
  * Markus Kottländer <markus@intevation.de>
  */
 import { HTTP } from "@/lib/http";
-import { displayError } from "@/lib/errors.js";
+import { displayError, displayInfo } from "@/lib/errors.js";
 
 export default {
   name: "pdftemplates",
   data() {
     return {
       templates: [],
-      uploading: false,
-      templateToUpload: "",
-      showSuccessUploadMsg: false
+      uploading: false
     };
   },
   methods: {
@@ -135,8 +119,10 @@
           )
             .then(() => {
               this.loadTemplates();
-              this.templateToUpload = template;
-              this.showSuccessUploadMsg = true;
+              displayInfo({
+                message:
+                  template.name + " " + this.$gettext("uploaded successfully")
+              });
             })
             .catch(e => {
               const { status, data } = e.response;
@@ -204,6 +190,10 @@
               );
               if (removeIndex !== -1) {
                 this.templates.splice(removeIndex, 1);
+                displayInfo({
+                  message:
+                    template.name + " " + this.$gettext("deleted successfully")
+                });
               }
             });
           }
--- a/client/src/store/map.js	Mon Mar 04 11:55:29 2019 +0100
+++ b/client/src/store/map.js	Mon Mar 04 11:56:07 2019 +0100
@@ -386,21 +386,21 @@
           }),
           style: function(feature) {
             return new Style({
-                image: new RegularShape({
-                  radius: 6,
-                  fill: new Fill({ color: "rgba(255, 255, 0, 0.1)" }),
-                  stroke: new Stroke({ color: "red", width: 1 }),
-                  points: 3,
-                  rotation: 0,
-                  angle: 0
+              image: new RegularShape({
+                radius: 6,
+                fill: new Fill({ color: "rgba(255, 255, 0, 0.1)" }),
+                stroke: new Stroke({ color: "red", width: 1 }),
+                points: 3,
+                rotation: 0,
+                angle: 0
+              }),
+              text: new Text({
+                font: '10px "Open Sans", "sans-serif"',
+                offsetY: 10,
+                fill: new Fill({
+                  color: "black"
                 }),
-                text: new Text({
-                  font: '10px "Open Sans", "sans-serif"',
-                  offsetY: 10,
-                  fill: new Fill({
-                    color: "black"
-                  }),
-                  text: feature.get("objname")
+                text: feature.get("objname")
               })
             });
           },
@@ -408,7 +408,7 @@
           minResolution: 0
         }),
         isVisible: true,
-        showInLegend: true,
+        showInLegend: true
       },
       {
         name: LAYERS.DRAWTOOL,