changeset 5277:3bab0e19f08b

Merged multi-geoms branch.
author Sascha Wilde <sascha.wilde@intevation.de>
date Thu, 11 Jun 2020 10:09:28 +0200
parents 6f56d17c0291 (diff) 9a903cdebd97 (current diff)
children 8d19d4701f0c
files pkg/imports/fd.go
diffstat 9 files changed, 14 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ScheduledImports.vue	Wed Jun 10 20:41:41 2020 +0200
+++ b/client/src/components/importconfiguration/ScheduledImports.vue	Thu Jun 11 10:09:28 2020 +0200
@@ -473,7 +473,7 @@
  * SPDX-License-Identifier: AGPL-3.0-or-later
  * License-Filename: LICENSES/AGPL-3.0.txt
  *
- * Copyright (C) 2018, 2019 by via donau
+ * Copyright (C) 2018, 2019, 2020 by via donau
  *   – Österreichische Wasserstraßen-Gesellschaft mbH
  * Software engineering by Intevation GmbH
  *
@@ -611,18 +611,6 @@
           return false;
       }
     },
-    isSortbyRequired() {
-      switch (this.import_) {
-        case this.$options.IMPORTTYPES.WATERWAYAXIS:
-        case this.$options.IMPORTTYPES.WATERWAYAREA:
-        case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
-        case this.$options.IMPORTTYPES.FAIRWAYMARKS:
-        case this.$options.IMPORTTYPES.DISTANCEMARKSASHORE:
-          return true;
-        default:
-          return false;
-      }
-    },
     isToleranceRequired() {
       switch (this.import_) {
         case this.$options.IMPORTTYPES.BOTTLENECK:
@@ -653,7 +641,6 @@
       if (this.directImport && !this.uploadFile) return false;
       else if (!this.directImport) {
         if (this.isURLRequired && !this.url) return false;
-        if (this.isSortbyRequired && !this.sortBy) return false;
         if (this.isFeatureTypeRequired && !this.featureType) return false;
         if (this.isCredentialsRequired && !this.usernamePasswordFilled)
           return false;
@@ -894,10 +881,6 @@
         if (!this.featureType) return;
         data["feature-type"] = this.featureType;
       }
-      if (this.isSortbyRequired) {
-        if (!this.sortBy) return;
-        data["sort-by"] = this.sortBy;
-      }
       if (this.isToleranceRequired) {
         if (!this.tolerance) return;
         data["tolerance"] = parseFloat(this.tolerance);
@@ -977,10 +960,6 @@
         config["url"] = this.url;
         config["insecure"] = this.insecure;
       }
-      if (this.isSortbyRequired) {
-        if (!this.sortBy) return;
-        config["sort-by"] = this.sortBy;
-      }
       if (this.isFeatureTypeRequired) {
         if (!this.featureType) return;
         config["feature-type"] = this.featureType;
--- a/client/src/components/importconfiguration/types/Distancemarksashore.vue	Wed Jun 10 20:41:41 2020 +0200
+++ b/client/src/components/importconfiguration/types/Distancemarksashore.vue	Thu Jun 11 10:09:28 2020 +0200
@@ -53,13 +53,6 @@
             :value="sortBy"
           />
         </div>
-        <div v-if="!sortBy" class="d-flex flex-row">
-          <small
-            ><translate class="text-danger"
-              >Please enter SortBy</translate
-            ></small
-          >
-        </div>
       </div>
     </div>
   </div>
@@ -72,7 +65,7 @@
  * SPDX-License-Identifier: AGPL-3.0-or-later
  * License-Filename: LICENSES/AGPL-3.0.txt
  *
- * Copyright (C) 2018 by via donau
+ * Copyright (C) 2018, 2019, 2020 by via donau
  *   – Österreichische Wasserstraßen-Gesellschaft mbH
  * Software engineering by Intevation GmbH
  *
--- a/client/src/components/importconfiguration/types/Fairwaydimensions.vue	Wed Jun 10 20:41:41 2020 +0200
+++ b/client/src/components/importconfiguration/types/Fairwaydimensions.vue	Thu Jun 11 10:09:28 2020 +0200
@@ -53,13 +53,6 @@
             :value="sortBy"
           />
         </div>
-        <div v-if="!sortBy" class="d-flex flex-row">
-          <small
-            ><translate class="text-danger"
-              >Please enter SortBy</translate
-            ></small
-          >
-        </div>
       </div>
     </div>
     <div class="d-flex px-2">
@@ -183,7 +176,7 @@
  * SPDX-License-Identifier: AGPL-3.0-or-later
  * License-Filename: LICENSES/AGPL-3.0.txt
  *
- * Copyright (C) 2018 by via donau
+ * Copyright (C) 2018, 2019, 2020 by via donau
  *   – Österreichische Wasserstraßen-Gesellschaft mbH
  * Software engineering by Intevation GmbH
  *
--- a/client/src/components/importconfiguration/types/Fairwaymarks.vue	Wed Jun 10 20:41:41 2020 +0200
+++ b/client/src/components/importconfiguration/types/Fairwaymarks.vue	Thu Jun 11 10:09:28 2020 +0200
@@ -72,13 +72,6 @@
             :value="sortBy"
           />
         </div>
-        <div v-if="!sortBy" class="d-flex flex-row">
-          <small
-            ><translate class="text-danger"
-              >Please enter SortBy</translate
-            ></small
-          >
-        </div>
       </div>
     </div>
   </div>
@@ -91,7 +84,7 @@
  * SPDX-License-Identifier: AGPL-3.0-or-later
  * License-Filename: LICENSES/AGPL-3.0.txt
  *
- * Copyright (C) 2018 by via donau
+ * Copyright (C) 2018, 2019, 2020 by via donau
  *   – Österreichische Wasserstraßen-Gesellschaft mbH
  * Software engineering by Intevation GmbH
  *
--- a/client/src/components/importconfiguration/types/WaterwayProfiles.vue	Wed Jun 10 20:41:41 2020 +0200
+++ b/client/src/components/importconfiguration/types/WaterwayProfiles.vue	Thu Jun 11 10:09:28 2020 +0200
@@ -75,13 +75,6 @@
               v-model="sortBy"
             />
           </div>
-          <div v-if="!sortBy" class="d-flex flex-row">
-            <small
-              ><translate class="text-danger"
-                >Please enter SortBy</translate
-              ></small
-            >
-          </div>
         </div>
       </div>
     </div>
@@ -124,7 +117,7 @@
  * SPDX-License-Identifier: AGPL-3.0-or-later
  * License-Filename: LICENSES/AGPL-3.0.txt
  *
- * Copyright (C) 2018 by via donau
+ * Copyright (C) 2018, 2019, 2020 by via donau
  *   – Österreichische Wasserstraßen-Gesellschaft mbH
  * Software engineering by Intevation GmbH
  *
@@ -166,7 +159,7 @@
       this.uploadFile = files[0];
     },
     submit() {
-      if (!this.url || !this.featureType || !this.sortBy || !this.uploadFile)
+      if (!this.url || !this.featureType || !this.uploadFile)
         return;
       let formData = new FormData();
       formData.append("wp", this.uploadFile);
--- a/client/src/components/importconfiguration/types/Waterwayarea.vue	Wed Jun 10 20:41:41 2020 +0200
+++ b/client/src/components/importconfiguration/types/Waterwayarea.vue	Thu Jun 11 10:09:28 2020 +0200
@@ -53,13 +53,6 @@
             :value="sortBy"
           />
         </div>
-        <div v-if="!sortBy" class="d-flex flex-row">
-          <small
-            ><translate class="text-danger"
-              >Please enter SortBy</translate
-            ></small
-          >
-        </div>
       </div>
     </div>
   </div>
@@ -72,7 +65,7 @@
  * SPDX-License-Identifier: AGPL-3.0-or-later
  * License-Filename: LICENSES/AGPL-3.0.txt
  *
- * Copyright (C) 2018 by via donau
+ * Copyright (C) 2018, 2019, 2020 by via donau
  *   – Österreichische Wasserstraßen-Gesellschaft mbH
  * Software engineering by Intevation GmbH
  *
--- a/client/src/components/importconfiguration/types/Waterwayaxis.vue	Wed Jun 10 20:41:41 2020 +0200
+++ b/client/src/components/importconfiguration/types/Waterwayaxis.vue	Thu Jun 11 10:09:28 2020 +0200
@@ -53,13 +53,6 @@
             :value="sortBy"
           />
         </div>
-        <div v-if="!sortBy" class="d-flex flex-row">
-          <small
-            ><translate class="text-danger"
-              >Please enter SortBy</translate
-            ></small
-          >
-        </div>
       </div>
     </div>
   </div>
@@ -72,7 +65,7 @@
  * SPDX-License-Identifier: AGPL-3.0-or-later
  * License-Filename: LICENSES/AGPL-3.0.txt
  *
- * Copyright (C) 2018 by via donau
+ * Copyright (C) 2018, 2019, 2020 by via donau
  *   – Österreichische Wasserstraßen-Gesellschaft mbH
  * Software engineering by Intevation GmbH
  *
--- a/pkg/imports/fd.go	Wed Jun 10 20:41:41 2020 +0200
+++ b/pkg/imports/fd.go	Thu Jun 11 10:09:28 2020 +0200
@@ -4,7 +4,7 @@
 // SPDX-License-Identifier: AGPL-3.0-or-later
 // License-Filename: LICENSES/AGPL-3.0.txt
 //
-// Copyright (C) 2018 by via donau
+// Copyright (C) 2018, 2019, 2020 by via donau
 //   – Österreichische Wasserstraßen-Gesellschaft mbH
 // Software engineering by Intevation GmbH
 //
@@ -445,6 +445,8 @@
 
 	if features == 0 {
 		feedback.Info("No new features found")
+	} else {
+		feedback.Info("Stored %d features", features)
 	}
 
 	// Invalidate features that have been removed from data source
@@ -484,7 +486,8 @@
 					oldID,
 				).Scan(&fdid, &lat, &lon)
 			}); err != nil {
-				feedback.Error(pgxutils.ReadableError{Err: err}.Error())
+				feedback.Error(pgxutils.ReadableError{Err: err}.Error() +
+					"- while tracking invalidation of: %d", oldID)
 				continue
 			}
 			fds = append(fds, fdSummary{ID: fdid, Lat: lat, Lon: lon})
--- a/pkg/pgxutils/errors.go	Wed Jun 10 20:41:41 2020 +0200
+++ b/pkg/pgxutils/errors.go	Thu Jun 11 10:09:28 2020 +0200
@@ -135,7 +135,7 @@
 			case "fairway_dimensions":
 				switch err.ConstraintName {
 				case "fairway_dimensions_area_unique":
-					m = "Duplicate fairway area"
+					m = "Duplicate fairway dimension area"
 					c = http.StatusConflict
 					return
 				}