Mercurial > gemma
changeset 4870:b55120fa8913
add fairway marks import as schedulable import
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 09 Jan 2020 17:23:54 +0100 |
parents | 6b054b91d9b2 |
children | 4d8982fa49f9 8eb36d0d5bdf |
files | client/src/components/importconfiguration/ImportDetails.vue client/src/components/importconfiguration/ScheduledImports.vue client/src/components/importconfiguration/types/Fairwaymarks.vue client/src/store/importschedule.js |
diffstat | 4 files changed, 120 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ImportDetails.vue Thu Dec 19 09:35:14 2019 +0100 +++ b/client/src/components/importconfiguration/ImportDetails.vue Thu Jan 09 17:23:54 2020 +0100 @@ -38,6 +38,9 @@ <option :value="$options.IMPORTTYPES.GAUGEMEASUREMENT"> <translate>Gauge measurement</translate> </option> + <option :value="$options.IMPORTTYPES.FAIRWAYMARKS"> + <translate>Fairwaymarks</translate> + </option> </optgroup> <optgroup :label="onetimeLabel"> <option :value="$options.IMPORTTYPES.SOUNDINGRESULTS">
--- a/client/src/components/importconfiguration/ScheduledImports.vue Thu Dec 19 09:35:14 2019 +0100 +++ b/client/src/components/importconfiguration/ScheduledImports.vue Thu Jan 09 17:23:54 2020 +0100 @@ -99,6 +99,15 @@ :sourceOrganization="sourceOrganization" :depth="depth" /> + <Fairwaymarks + v-if="import_ == $options.IMPORTTYPES.FAIRWAYMARKS" + @urlChanged="setUrl" + @featureTypeChanged="setFeatureType" + @sortByChanged="setSortBy" + :url="url" + :featureType="featureType" + :sortBy="sortBy" + /> <Gaugemeasurement v-if="import_ == $options.IMPORTTYPES.GAUGEMEASUREMENT && !directImport" @urlChanged="setUrl" @@ -487,6 +496,7 @@ Distancemarksvirtual: () => import("./types/Distancemarksvirtual"), Distancemarksashore: () => import("./types/Distancemarksashore"), Faiwaydimensions: () => import("./types/Fairwaydimensions"), + Fairwaymarks: () => import("./types/Fairwaymarks"), Gaugemeasurement: () => import("./types/Gaugemeasurement"), Waterwayarea: () => import("./types/Waterwayarea"), Waterwaygauges: () => import("./types/Waterwaygauges"), @@ -576,6 +586,7 @@ case this.$options.IMPORTTYPES.GAUGEMEASUREMENT: case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY: case this.$options.IMPORTTYPES.WATERWAYAREA: + case this.$options.IMPORTTYPES.FAIRWAYMARKS: case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: case this.$options.IMPORTTYPES.WATERWAYGAUGES: case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL: @@ -589,6 +600,7 @@ switch (this.import_) { case this.$options.IMPORTTYPES.WATERWAYAXIS: case this.$options.IMPORTTYPES.WATERWAYAREA: + case this.$options.IMPORTTYPES.FAIRWAYMARKS: case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: case this.$options.IMPORTTYPES.DISTANCEMARKSASHORE: return true; @@ -601,6 +613,7 @@ 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:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Fairwaymarks.vue Thu Jan 09 17:23:54 2020 +0100 @@ -0,0 +1,99 @@ +<template> + <div> + <div class="d-flex px-2"> + <div class="flex-column w-100"> + <div class="flex-row text-left"> + <small class="text-muted"> <translate>URL</translate> </small> + </div> + <div class="w-100"> + <input + @input="urlChanged" + class="url form-control form-control-sm" + type="url" + :value="url" + /> + </div> + </div> + </div> + <div v-if="!url" class="d-flex px-2"> + <small + ><translate class="text-danger">Please enter a URL</translate></small + > + </div> + <div class="d-flex px-2"> + <div class="flex-column mt-2 mr-3 w-50"> + <div class="flex-row text-left"> + <small class="text-muted"> <translate>Featuretype</translate> </small> + </div> + <div class="w-100"> + <input + @input="featureTypeChanged" + class="featuretype form-control form-control-sm" + type="text" + :value="featureType" + /> + </div> + <div v-if="!featureType" class="d-flex flex-row"> + <small + ><translate class="text-danger" + >Please enter a Featuretype</translate + ></small + > + </div> + </div> + <div class="flex-column mt-2 w-50"> + <div class="flex-row text-left"> + <small class="text-muted"> <translate>SortBy</translate> </small> + </div> + <div class="w-100"> + <input + @input="sortByChanged" + class="sortby form-control form-control-sm" + type="text" + :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> +</template> + +<script> +/* This is Free Software under GNU Affero General Public License v >= 3.0 + * without warranty, see README.md and license for details. + * + * SPDX-License-Identifier: AGPL-3.0-or-later + * License-Filename: LICENSES/AGPL-3.0.txt + * + * Copyright (C) 2018 by via donau + * – Österreichische Wasserstraßen-Gesellschaft mbH + * Software engineering by Intevation GmbH + * + * Author(s): + * Thomas Junk <thomas.junk@intevation.de> + */ +export default { + name: "waterwayarea", + props: ["url", "featureType", "sortBy"], + methods: { + urlChanged(e) { + this.$emit("urlChanged", e.target.value); + }, + featureTypeChanged(e) { + this.$emit("featureTypeChanged", e.target.value); + }, + sortByChanged(e) { + this.$emit("sortByChanged", e.target.value); + } + } +}; +</script> + +<style></style>
--- a/client/src/store/importschedule.js Thu Dec 19 09:35:14 2019 +0100 +++ b/client/src/store/importschedule.js Thu Jan 09 17:23:54 2020 +0100 @@ -12,8 +12,8 @@ * Thomas Junk <thomas.junk@intevation.de> */ +import { HTTP } from "@/lib/http"; import Vue from "vue"; -import { HTTP } from "@/lib/http"; /* eslint-disable no-unused-vars */ /* eslint-disable no-unreachable */ @@ -30,12 +30,14 @@ DISTANCEMARKSASHORE: "distancemarksashore", SOUNDINGRESULTS: "soundingresults", APPROVEDGAUGEMEASUREMENTS: "approvedgaugemeasurements", - WATERWAYPROFILES: "waterwayprofiles" + WATERWAYPROFILES: "waterwayprofiles", + FAIRWAYMARKS: "fairwaymarks" }; const KINDIMPORTTYPE = { bn: "bottleneck", fa: "fairwayavailability", + fm: "fairwaymarks", gm: "gaugemeasurement", wx: "waterwayaxis", wa: "waterwayarea", @@ -48,6 +50,7 @@ const IMPORTTYPEKIND = { bottleneck: "bn", fairwayavailability: "fa", + fairwaymarks: "fm", gaugemeasurement: "gm", waterwayaxis: "wx", waterwayarea: "wa",