# HG changeset patch # User Markus Kottlaender # Date 1542866918 -3600 # Node ID a76a06dd2f1e41654e103fbd3937c304455ab3ea # Parent bc55ffaeb639265bac27c43320482952d87dc099# Parent 717c58fea5c18a2ce3436b957692e12965895fb0 merge diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/App.vue --- a/client/src/App.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/Contextbox.vue --- a/client/src/application/Contextbox.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/Main.vue --- a/client/src/application/Main.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/Search.vue --- a/client/src/application/Search.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,223 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/Sidebar.vue --- a/client/src/application/Sidebar.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,186 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/assets/application.sass --- a/client/src/application/assets/application.sass Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* - * 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 - * Markus Kottländer - */ -$shadow-xs: 0 0.1rem 0.5rem rgba(0, 0, 0, 0.2) -$border-radius: 0.25rem -$icon-height: 2rem -$icon-width: 2rem -$large-offset: 2rem -$offset: 1rem -$sidebar-width: 15rem -$slight-transparent: 0.96 -$small-offset: 0.5rem -$smaller: 0.9rem -$transition-fast: 0.3s -$x-large-offset: 3rem -$xx-large-offset: 5rem -$color-info: #17a2b8 - -a - color: $color-info - -.w-90 - width: 90% - -.debug - border: 1px solid red - -%fully-centered - position: absolute - top: 50% - left: 50% - transform: translate(-50%, -50%) - -.ui-element - pointer-events: auto - -.shadow-xs - box-shadow: $shadow-xs - -.box - opacity: $slight-transparent - max-height: 0 - max-width: 0 - overflow: hidden - margin-left: 0 - margin-right: 0 - box-shadow: $shadow-xs - transition: max-width .4s, max-height .4s, margin-left .4s, margin-right .4s - -.expanded - max-height: 999px - max-width: 999px - margin-left: 0.5rem - margin-right: 0.5rem diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/assets/legend_contour_lines.png Binary file client/src/application/assets/legend_contour_lines.png has changed diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/assets/linestring_arrow.png Binary file client/src/application/assets/linestring_arrow.png has changed diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/assets/linestring_arrow_grey.png Binary file client/src/application/assets/linestring_arrow_grey.png has changed diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/assets/logo.png Binary file client/src/application/assets/logo.png has changed diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/assets/tooltip.sass --- a/client/src/application/assets/tooltip.sass Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* - * 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 - */ -.tooltip - display: block !important - z-index: 10000 - - .tooltip-inner - background: black - color: white - border-radius: 16px - padding: 5px 10px 4px - - .tooltip-arrow - width: 0 - height: 0 - border-style: solid - position: absolute - margin: 5px - border-color: black - z-index: 1 - - &[x-placement^="top"] - margin-bottom: 5px - - .tooltip-arrow - border-width: 5px 5px 0 5px - border-left-color: transparent !important - border-right-color: transparent !important - border-bottom-color: transparent !important - bottom: -5px - left: calc(50% - 5px) - margin-top: 0 - margin-bottom: 0 - - &[x-placement^="bottom"] - margin-top: 5px - - .tooltip-arrow - border-width: 0 5px 5px 5px - border-left-color: transparent !important - border-right-color: transparent !important - border-top-color: transparent !important - top: -5px - left: calc(50% - 5px) - margin-top: 0 - margin-bottom: 0 - - &[x-placement^="right"] - margin-left: 5px - - .tooltip-arrow - border-width: 5px 5px 5px 0 - border-left-color: transparent !important - border-top-color: transparent !important - border-bottom-color: transparent !important - left: -5px - top: calc(50% - 5px) - margin-left: 0 - margin-right: 0 - - &[x-placement^="left"] - margin-right: 5px - - .tooltip-arrow - border-width: 5px 0 5px 5px - border-top-color: transparent !important - border-right-color: transparent !important - border-bottom-color: transparent !important - right: -5px - top: calc(50% - 5px) - margin-left: 0 - margin-right: 0 - - &.popover - $color: #f9f9f9 - - .popover-inner - background: $color - color: black - padding: 24px - border-radius: 5px - box-shadow: 0 5px 30px rgba(black, 0.1) - - .popover-arrow - border-color: $color - - &[aria-hidden="true"] - visibility: hidden - opacity: 0 - transition: opacity 0.15s, visibility 0.15s - - &[aria-hidden="false"] - visibility: visible - opacity: 1 - transition: opacity 0.15s diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/assets/user.png Binary file client/src/application/assets/user.png has changed diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/lib/errors.js --- a/client/src/application/lib/errors.js Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* - * 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 - */ - -/** facade to wrap calls to vue2-toastr */ -import app from "../../main"; - -const displayError = ({ title, message }) => { - app.$toast.error({ - title: title, - message: message - }); -}; - -const displayInfo = ({ title, message }) => { - app.$toast.info({ - title: title, - message: message - }); -}; - -export { displayError, displayInfo }; diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/lib/geo.js --- a/client/src/application/lib/geo.js Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,208 +0,0 @@ -/* - * 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 - */ - -/** - * - * Distance calculations - * JS transposition of cross.go functions - * - */ - -import { GeoJSON } from "ol/format.js"; -import Feature from "ol/Feature"; -import distance from "@turf/distance"; -import { - lineString as turfLineString, - polygon as turfPolygon -} from "@turf/helpers"; -import lineIntersect from "@turf/line-intersect"; - -const EARTHRADIUS = 6378137.0; - -/** - * Converts to radiant - * @param {degree} d - */ -const deg2rad = d => { - return (d * Math.PI) / 180.0; -}; - -/** - * Calculates the difference between two points in m - * - * Points are given with {lat: $lat, lon: $lon} - * - * @param {object} P1 - * @param {object} P2 - */ -const distanceBetween = (P1, P2) => { - const dLat = deg2rad(P2.lat - P1.lat); - let dLng = Math.abs(deg2rad(P2.lon - P1.lon)); - if (dLng > Math.PI) { - dLng = 2 * Math.PI - dLng; - } - const x = dLng * Math.cos(deg2rad((P1.lat + P2.lat) / 2.0)); - return Math.sqrt(dLat * dLat + x * x) * EARTHRADIUS; -}; - -/** - * Takes a triple of [lat, long, alt] and generates - * an object with according attributes - * { - * lat: $lat, - * lon: $lon, - * alt: $alt - * } - * - * @param {array} coords - */ -const Point = coords => { - return { - lon: coords[0], - lat: coords[1], - alt: coords[2] - }; -}; - -/** - * Has geoJSON as its input and transforms - * given coordinates into points representing - * distance from startpoint / altitude information - * - * a) extracting the minimum altitude - * b) extracting the maximum altitude - * c) calculating the total length of the given profile - * d) transposes the datapoints relative to a given start point - * - * The calculation of total equals the sum of partial distances between points - * - * The x-value of a point is equal to the total distance up to this point - * - * The distance between the last point of the last segment and the end point is added - * to the total - * - * @param {object} geoJSON, startPoint, endPoint - */ -const transform = ({ geoJSON, startPoint, endPoint }) => { - const lineSegments = geoJSON.geometry.coordinates; - let segmentPoints = []; - let lengthPolyLine = 0; - let referencePoint = Point(startPoint); - let minAlt = Math.abs(lineSegments[0][0][2]); - let maxAlt = Math.abs(lineSegments[0][0][2]); - let currentPoint = null; - for (let segment of lineSegments) { - let points = []; - for (let coordinateTriplet of segment) { - currentPoint = Point(coordinateTriplet); - lengthPolyLine += distanceBetween(referencePoint, currentPoint); - let y = Math.abs(currentPoint.alt); - points.push({ - x: lengthPolyLine, - y: y - }); - if (y < minAlt) minAlt = y; - if (y > maxAlt) maxAlt = y; - referencePoint = currentPoint; - } - segmentPoints.push(points); - } - lengthPolyLine += distanceBetween(currentPoint, Point(endPoint)); - return { segmentPoints, lengthPolyLine, minAlt, maxAlt }; -}; - -/** - * Prepare profile takes geoJSON data in form of - * a MultiLineString, e.g. - * - * { - * type: "Feature", - * geometry: { - * type: "MultiLineString", - * coordinates: [ - * [ - * [16.53593398, 48.14694085, -146.52392755] - * ... - * ]] - * - * and transforms it to a structure representing the number of sections - * where data is present with according lengths and the points - * - * { - * { points: - * [ - * [ { x: 0.005798201616417183, y: -146.52419461 }, - * { x: 0, y: -146.52394016 } - * ... - * ] - * ] - * lengthPolyLine: 160.06814078495722, - * minAlt: -146.73122231, - * maxAlt: -145.65155866 - * } - * - * @param {object} geoJSON - */ -const prepareProfile = ({ geoJSON, startPoint, endPoint }) => { - const { segmentPoints, lengthPolyLine, minAlt, maxAlt } = transform({ - geoJSON, - startPoint, - endPoint - }); - return { - points: segmentPoints, - lengthPolyLine: lengthPolyLine, - minAlt: minAlt, - maxAlt: maxAlt - }; -}; - -const generateFeatureRequest = (profileLine, bottleneck_id, date_info) => { - const feature = new Feature({ - geometry: profileLine, - bottleneck: bottleneck_id, - date: date_info - }); - return new GeoJSON({ geometryName: "geometry" }).writeFeature(feature); -}; - -const calculateFairwayCoordinates = (profileLine, fairwayGeometry, depth) => { - // both geometries have to be in EPSG:4326 - // uses turfjs distance() function - let fairwayCoordinates = []; - var line = turfLineString(profileLine.getCoordinates()); - var polygon = turfPolygon(fairwayGeometry.getCoordinates()); - var intersects = lineIntersect(line, polygon); - var l = intersects.features.length; - if (l % 2 != 0) { - console.log("Ignoring fairway because profile only intersects once."); - } else { - for (let i = 0; i < l; i += 2) { - let pStartPoint = profileLine.getCoordinates()[0]; - let fStartPoint = intersects.features[i].geometry.coordinates; - let fEndPoint = intersects.features[i + 1].geometry.coordinates; - let opts = { units: "kilometers" }; - - fairwayCoordinates.push([ - distance(pStartPoint, fStartPoint, opts) * 1000, - distance(pStartPoint, fEndPoint, opts) * 1000, - depth - ]); - } - } - return fairwayCoordinates; -}; - -export { generateFeatureRequest, prepareProfile, calculateFairwayCoordinates }; diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/lib/http.js --- a/client/src/application/lib/http.js Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* - * 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 - */ - -import axios from "axios"; - -export const HTTP = axios.create({ - baseURL: process.env.VUE_APP_API_URL || "/api" - /* headers: { - Authorization: 'Bearer {token}' - }*/ -}); diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/application/lib/session.js --- a/client/src/application/lib/session.js Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* - * 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 - */ - -/** - * Compares whether session is current - * based on the expiry information and the - * current date - * - * @param {number} expiresFromPastSession - */ -function sessionStillActive(expiresFromPastSession) { - if (!expiresFromPastSession) return false; - const now = Date.now(); - const stillActive = now < expiresFromPastSession; - return stillActive; -} -/** - * Converts a given unix time to Milliseconds - * - * @param {string} timestring - */ -function toMillisFromString(timestring) { - return timestring * 1000; -} - -export { sessionStillActive, toMillisFromString }; diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/assets/application.sass --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/assets/application.sass Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,66 @@ +/* + * 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 + * Markus Kottländer + */ +$shadow-xs: 0 0.1rem 0.5rem rgba(0, 0, 0, 0.2) +$border-radius: 0.25rem +$icon-height: 2rem +$icon-width: 2rem +$large-offset: 2rem +$offset: 1rem +$sidebar-width: 15rem +$slight-transparent: 0.96 +$small-offset: 0.5rem +$smaller: 0.9rem +$transition-fast: 0.3s +$x-large-offset: 3rem +$xx-large-offset: 5rem +$color-info: #17a2b8 + +a + color: $color-info + +.w-90 + width: 90% + +.debug + border: 1px solid red + +%fully-centered + position: absolute + top: 50% + left: 50% + transform: translate(-50%, -50%) + +.ui-element + pointer-events: auto + +.shadow-xs + box-shadow: $shadow-xs + +.box + opacity: $slight-transparent + max-height: 0 + max-width: 0 + overflow: hidden + margin-left: 0 + margin-right: 0 + box-shadow: $shadow-xs + transition: max-width .4s, max-height .4s, margin-left .4s, margin-right .4s + +.expanded + max-height: 999px + max-width: 999px + margin-left: 0.5rem + margin-right: 0.5rem diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/assets/linestring_arrow.png Binary file client/src/assets/linestring_arrow.png has changed diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/assets/linestring_arrow_grey.png Binary file client/src/assets/linestring_arrow_grey.png has changed diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/assets/logo.png Binary file client/src/assets/logo.png has changed diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/assets/tooltip.sass --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/assets/tooltip.sass Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,107 @@ +/* + * 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 + */ +.tooltip + display: block !important + z-index: 10000 + + .tooltip-inner + background: black + color: white + border-radius: 16px + padding: 5px 10px 4px + + .tooltip-arrow + width: 0 + height: 0 + border-style: solid + position: absolute + margin: 5px + border-color: black + z-index: 1 + + &[x-placement^="top"] + margin-bottom: 5px + + .tooltip-arrow + border-width: 5px 5px 0 5px + border-left-color: transparent !important + border-right-color: transparent !important + border-bottom-color: transparent !important + bottom: -5px + left: calc(50% - 5px) + margin-top: 0 + margin-bottom: 0 + + &[x-placement^="bottom"] + margin-top: 5px + + .tooltip-arrow + border-width: 0 5px 5px 5px + border-left-color: transparent !important + border-right-color: transparent !important + border-top-color: transparent !important + top: -5px + left: calc(50% - 5px) + margin-top: 0 + margin-bottom: 0 + + &[x-placement^="right"] + margin-left: 5px + + .tooltip-arrow + border-width: 5px 5px 5px 0 + border-left-color: transparent !important + border-top-color: transparent !important + border-bottom-color: transparent !important + left: -5px + top: calc(50% - 5px) + margin-left: 0 + margin-right: 0 + + &[x-placement^="left"] + margin-right: 5px + + .tooltip-arrow + border-width: 5px 0 5px 5px + border-top-color: transparent !important + border-right-color: transparent !important + border-bottom-color: transparent !important + right: -5px + top: calc(50% - 5px) + margin-left: 0 + margin-right: 0 + + &.popover + $color: #f9f9f9 + + .popover-inner + background: $color + color: black + padding: 24px + border-radius: 5px + box-shadow: 0 5px 30px rgba(black, 0.1) + + .popover-arrow + border-color: $color + + &[aria-hidden="true"] + visibility: hidden + opacity: 0 + transition: opacity 0.15s, visibility 0.15s + + &[aria-hidden="false"] + visibility: visible + opacity: 1 + transition: opacity 0.15s diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/assets/user.png Binary file client/src/assets/user.png has changed diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/bottlenecks/Bottlenecks.vue --- a/client/src/bottlenecks/Bottlenecks.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,233 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/App.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/App.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,96 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/Login.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/Login.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,182 @@ +() + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/Sidebar.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/Sidebar.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,186 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/admin/logs.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/admin/logs.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,158 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/admin/systemconfiguration.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/admin/systemconfiguration.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,144 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/admin/usermanagement/Passwordfield.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/admin/usermanagement/Passwordfield.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,64 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/admin/usermanagement/Userdetail.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/admin/usermanagement/Userdetail.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,298 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/admin/usermanagement/Usermanagement.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/admin/usermanagement/Usermanagement.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,302 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/admin/usermanagement/Users.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/admin/usermanagement/Users.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,279 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/Bottlenecks.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/Bottlenecks.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,233 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/Contextbox.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/Contextbox.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,91 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/Identify.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/Identify.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,86 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/Main.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/Main.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,126 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/Maplayer.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/Maplayer.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,430 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/Pdftool.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/Pdftool.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,96 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/Search.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/Search.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,223 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/Staging.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/Staging.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,148 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/Zoom.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/Zoom.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,51 @@ + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/fairway/Fairwayprofile.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/fairway/Fairwayprofile.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,579 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/fairway/Infobar.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/fairway/Infobar.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,45 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/fairway/Surveys.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/fairway/Surveys.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,50 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/imports/Importqueue.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/imports/Importqueue.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,170 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/imports/Imports.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/imports/Imports.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,260 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/layers/Layers.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/layers/Layers.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,56 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/layers/Layerselect.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/layers/Layerselect.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,75 @@ + + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/layers/LegendElement.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/layers/LegendElement.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,124 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/toolbar/Cuttool.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/toolbar/Cuttool.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,76 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/toolbar/Identify.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/toolbar/Identify.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,29 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/toolbar/Layers.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/toolbar/Layers.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,29 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/toolbar/Linetool.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/toolbar/Linetool.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,70 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/toolbar/Pdftool.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/toolbar/Pdftool.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,29 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/toolbar/Polygontool.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/toolbar/Polygontool.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,73 @@ + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/components/map/toolbar/Toolbar.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/map/toolbar/Toolbar.vue Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,96 @@ + + + + + diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/fairway/Fairwayprofile.vue --- a/client/src/fairway/Fairwayprofile.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,579 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/fairway/Infobar.vue --- a/client/src/fairway/Infobar.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/fairway/Surveys.vue --- a/client/src/fairway/Surveys.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/identify/Identify.vue --- a/client/src/identify/Identify.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/imports/Importqueue.vue --- a/client/src/imports/Importqueue.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/imports/Imports.vue --- a/client/src/imports/Imports.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,260 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/layers/Layers.vue --- a/client/src/layers/Layers.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/layers/Layerselect.vue --- a/client/src/layers/Layerselect.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ - - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/layers/LegendElement.vue --- a/client/src/layers/LegendElement.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/lib/errors.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/lib/errors.js Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,33 @@ +/* + * 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 + */ + +/** facade to wrap calls to vue2-toastr */ +import app from "../main"; + +const displayError = ({ title, message }) => { + app.$toast.error({ + title: title, + message: message + }); +}; + +const displayInfo = ({ title, message }) => { + app.$toast.info({ + title: title, + message: message + }); +}; + +export { displayError, displayInfo }; diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/lib/geo.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/lib/geo.js Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,208 @@ +/* + * 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 + */ + +/** + * + * Distance calculations + * JS transposition of cross.go functions + * + */ + +import { GeoJSON } from "ol/format.js"; +import Feature from "ol/Feature"; +import distance from "@turf/distance"; +import { + lineString as turfLineString, + polygon as turfPolygon +} from "@turf/helpers"; +import lineIntersect from "@turf/line-intersect"; + +const EARTHRADIUS = 6378137.0; + +/** + * Converts to radiant + * @param {degree} d + */ +const deg2rad = d => { + return (d * Math.PI) / 180.0; +}; + +/** + * Calculates the difference between two points in m + * + * Points are given with {lat: $lat, lon: $lon} + * + * @param {object} P1 + * @param {object} P2 + */ +const distanceBetween = (P1, P2) => { + const dLat = deg2rad(P2.lat - P1.lat); + let dLng = Math.abs(deg2rad(P2.lon - P1.lon)); + if (dLng > Math.PI) { + dLng = 2 * Math.PI - dLng; + } + const x = dLng * Math.cos(deg2rad((P1.lat + P2.lat) / 2.0)); + return Math.sqrt(dLat * dLat + x * x) * EARTHRADIUS; +}; + +/** + * Takes a triple of [lat, long, alt] and generates + * an object with according attributes + * { + * lat: $lat, + * lon: $lon, + * alt: $alt + * } + * + * @param {array} coords + */ +const Point = coords => { + return { + lon: coords[0], + lat: coords[1], + alt: coords[2] + }; +}; + +/** + * Has geoJSON as its input and transforms + * given coordinates into points representing + * distance from startpoint / altitude information + * + * a) extracting the minimum altitude + * b) extracting the maximum altitude + * c) calculating the total length of the given profile + * d) transposes the datapoints relative to a given start point + * + * The calculation of total equals the sum of partial distances between points + * + * The x-value of a point is equal to the total distance up to this point + * + * The distance between the last point of the last segment and the end point is added + * to the total + * + * @param {object} geoJSON, startPoint, endPoint + */ +const transform = ({ geoJSON, startPoint, endPoint }) => { + const lineSegments = geoJSON.geometry.coordinates; + let segmentPoints = []; + let lengthPolyLine = 0; + let referencePoint = Point(startPoint); + let minAlt = Math.abs(lineSegments[0][0][2]); + let maxAlt = Math.abs(lineSegments[0][0][2]); + let currentPoint = null; + for (let segment of lineSegments) { + let points = []; + for (let coordinateTriplet of segment) { + currentPoint = Point(coordinateTriplet); + lengthPolyLine += distanceBetween(referencePoint, currentPoint); + let y = Math.abs(currentPoint.alt); + points.push({ + x: lengthPolyLine, + y: y + }); + if (y < minAlt) minAlt = y; + if (y > maxAlt) maxAlt = y; + referencePoint = currentPoint; + } + segmentPoints.push(points); + } + lengthPolyLine += distanceBetween(currentPoint, Point(endPoint)); + return { segmentPoints, lengthPolyLine, minAlt, maxAlt }; +}; + +/** + * Prepare profile takes geoJSON data in form of + * a MultiLineString, e.g. + * + * { + * type: "Feature", + * geometry: { + * type: "MultiLineString", + * coordinates: [ + * [ + * [16.53593398, 48.14694085, -146.52392755] + * ... + * ]] + * + * and transforms it to a structure representing the number of sections + * where data is present with according lengths and the points + * + * { + * { points: + * [ + * [ { x: 0.005798201616417183, y: -146.52419461 }, + * { x: 0, y: -146.52394016 } + * ... + * ] + * ] + * lengthPolyLine: 160.06814078495722, + * minAlt: -146.73122231, + * maxAlt: -145.65155866 + * } + * + * @param {object} geoJSON + */ +const prepareProfile = ({ geoJSON, startPoint, endPoint }) => { + const { segmentPoints, lengthPolyLine, minAlt, maxAlt } = transform({ + geoJSON, + startPoint, + endPoint + }); + return { + points: segmentPoints, + lengthPolyLine: lengthPolyLine, + minAlt: minAlt, + maxAlt: maxAlt + }; +}; + +const generateFeatureRequest = (profileLine, bottleneck_id, date_info) => { + const feature = new Feature({ + geometry: profileLine, + bottleneck: bottleneck_id, + date: date_info + }); + return new GeoJSON({ geometryName: "geometry" }).writeFeature(feature); +}; + +const calculateFairwayCoordinates = (profileLine, fairwayGeometry, depth) => { + // both geometries have to be in EPSG:4326 + // uses turfjs distance() function + let fairwayCoordinates = []; + var line = turfLineString(profileLine.getCoordinates()); + var polygon = turfPolygon(fairwayGeometry.getCoordinates()); + var intersects = lineIntersect(line, polygon); + var l = intersects.features.length; + if (l % 2 != 0) { + console.log("Ignoring fairway because profile only intersects once."); + } else { + for (let i = 0; i < l; i += 2) { + let pStartPoint = profileLine.getCoordinates()[0]; + let fStartPoint = intersects.features[i].geometry.coordinates; + let fEndPoint = intersects.features[i + 1].geometry.coordinates; + let opts = { units: "kilometers" }; + + fairwayCoordinates.push([ + distance(pStartPoint, fStartPoint, opts) * 1000, + distance(pStartPoint, fEndPoint, opts) * 1000, + depth + ]); + } + } + return fairwayCoordinates; +}; + +export { generateFeatureRequest, prepareProfile, calculateFairwayCoordinates }; diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/lib/http.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/lib/http.js Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,23 @@ +/* + * 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 + */ + +import axios from "axios"; + +export const HTTP = axios.create({ + baseURL: process.env.VUE_APP_API_URL || "/api" + /* headers: { + Authorization: 'Bearer {token}' + }*/ +}); diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/lib/session.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/lib/session.js Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,38 @@ +/* + * 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 + */ + +/** + * Compares whether session is current + * based on the expiry information and the + * current date + * + * @param {number} expiresFromPastSession + */ +function sessionStillActive(expiresFromPastSession) { + if (!expiresFromPastSession) return false; + const now = Date.now(); + const stillActive = now < expiresFromPastSession; + return stillActive; +} +/** + * Converts a given unix time to Milliseconds + * + * @param {string} timestring + */ +function toMillisFromString(timestring) { + return timestring * 1000; +} + +export { sessionStillActive, toMillisFromString }; diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/locale/translations.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/locale/translations.json Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,16 @@ +{ + "en_GB": { + "Enter username": "Enter username", + "Enter passphrase": "Enter passphrase", + "Login failed": "Login failed", + "Login": "Login", + "Forgot password": "Forgot password" + }, + "de_AT": { + "Enter username": "Benutzername", + "Enter passphrase": "Passphrase", + "Login failed": "Login fehlgeschlagen", + "Login": "Login", + "Forgot password": "Passwort vergessen" + } +} diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/login/Login.vue --- a/client/src/login/Login.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,182 +0,0 @@ -() - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/logs/logs.vue --- a/client/src/logs/logs.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,158 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/main.js --- a/client/src/main.js Wed Nov 21 16:47:02 2018 +0100 +++ b/client/src/main.js Thu Nov 22 07:08:38 2018 +0100 @@ -13,11 +13,11 @@ */ import Vue from "vue"; -import App from "./App.vue"; +import App from "./components/App.vue"; import router from "./router"; import store from "./store"; import GetTextPlugin from "vue-gettext"; -import translations from "./translations.json"; +import translations from "./locale/translations.json"; import locale2 from "locale2"; import CxltToastr from "cxlt-vue2-toastr"; import "../node_modules/bootstrap/dist/css/bootstrap.min.css"; diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/map/Maplayer.vue --- a/client/src/map/Maplayer.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,430 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/pdftool/Pdftool.vue --- a/client/src/pdftool/Pdftool.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/router.js --- a/client/src/router.js Wed Nov 21 16:47:02 2018 +0100 +++ b/client/src/router.js Thu Nov 22 07:08:38 2018 +0100 @@ -15,19 +15,17 @@ import Vue from "vue"; import Router from "vue-router"; import store from "./store"; -import { - sessionStillActive, - toMillisFromString -} from "./application/lib/session"; +import { sessionStillActive, toMillisFromString } from "./lib/session"; /* facilitate codesplitting */ -const Login = () => import("./login/Login.vue"); -const Main = () => import("./application/Main.vue"); -const Usermanagement = () => import("./usermanagement/Usermanagement.vue"); -const Logs = () => import("./logs/logs.vue"); -const Importqueue = () => import("./imports/Importqueue.vue"); +const Login = () => import("./components/Login.vue"); +const Main = () => import("./components/map/Main.vue"); +const Usermanagement = () => + import("./components/admin/usermanagement/Usermanagement.vue"); +const Logs = () => import("./components/admin/logs.vue"); +const Importqueue = () => import("./components/map/imports/Importqueue.vue"); const Systemconfiguration = () => - import("./systemconfiguration/systemconfiguration.vue"); + import("./components/admin/systemconfiguration.vue"); Vue.use(Router); diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/staging/Staging.vue --- a/client/src/staging/Staging.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/store.js --- a/client/src/store.js Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * 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 - * Markus Kottländer - */ - -import Vue from "vue"; -import Vuex from "vuex"; -import application from "./store/application"; -import user from "./store/user"; -import usermanagement from "./store/usermanagement"; -import map from "./store/map"; -import fairwayprofile from "./store/fairway"; -import bottlenecks from "./store/bottlenecks"; -import imports from "./store/imports"; - -Vue.use(Vuex); - -export default new Vuex.Store({ - modules: { - application, - fairwayprofile, - imports, - bottlenecks, - map, - user, - usermanagement - } -}); diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/store/bottlenecks.js --- a/client/src/store/bottlenecks.js Wed Nov 21 16:47:02 2018 +0100 +++ b/client/src/store/bottlenecks.js Thu Nov 22 07:08:38 2018 +0100 @@ -12,9 +12,9 @@ * Author(s): * Markus Kottländer */ -import { HTTP } from "../application/lib/http"; +import { HTTP } from "../lib/http"; import { WFS } from "ol/format.js"; -import { displayError } from "../application/lib/errors.js"; +import { displayError } from "../lib/errors.js"; export default { namespaced: true, diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/store/fairway.js --- a/client/src/store/fairway.js Wed Nov 21 16:47:02 2018 +0100 +++ b/client/src/store/fairway.js Thu Nov 22 07:08:38 2018 +0100 @@ -14,13 +14,13 @@ * Markus Kottländer */ import Vue from "vue"; -import { HTTP } from "../application/lib/http"; -import { prepareProfile } from "../application/lib/geo"; +import { HTTP } from "../lib/http"; +import { prepareProfile } from "../lib/geo"; import LineString from "ol/geom/LineString.js"; -import { generateFeatureRequest } from "../application/lib/geo.js"; +import { generateFeatureRequest } from "../lib/geo.js"; import { getLength } from "ol/sphere.js"; -import { calculateFairwayCoordinates } from "../application/lib/geo.js"; -import { displayError } from "../application/lib/errors.js"; +import { calculateFairwayCoordinates } from "../lib/geo.js"; +import { displayError } from "../lib/errors.js"; const DEMOLEVEL = 149.345; const DEMODATA = 2.5; diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/store/imports.js --- a/client/src/store/imports.js Wed Nov 21 16:47:02 2018 +0100 +++ b/client/src/store/imports.js Thu Nov 22 07:08:38 2018 +0100 @@ -13,7 +13,7 @@ * Thomas Junk */ -import { HTTP } from "../application/lib/http"; +import { HTTP } from "../lib/http"; const Imports = { namespaced: true, diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/store/index.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/store/index.js Thu Nov 22 07:08:38 2018 +0100 @@ -0,0 +1,39 @@ +/* + * 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 + * Markus Kottländer + */ + +import Vue from "vue"; +import Vuex from "vuex"; +import application from "./application"; +import user from "./user"; +import usermanagement from "./usermanagement"; +import map from "./map"; +import fairwayprofile from "./fairway"; +import bottlenecks from "./bottlenecks"; +import imports from "./imports"; + +Vue.use(Vuex); + +export default new Vuex.Store({ + modules: { + application, + fairwayprofile, + imports, + bottlenecks, + map, + user, + usermanagement + } +}); diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/store/map.js --- a/client/src/store/map.js Wed Nov 21 16:47:02 2018 +0100 +++ b/client/src/store/map.js Thu Nov 22 07:08:38 2018 +0100 @@ -29,7 +29,7 @@ import VectorSource from "ol/source/Vector.js"; import Point from "ol/geom/Point.js"; import { bbox as bboxStrategy } from "ol/loadingstrategy"; -import { HTTP } from "../application/lib/http"; +import { HTTP } from "../lib/http"; import { fromLonLat } from "ol/proj"; export default { @@ -263,7 +263,7 @@ geometry: new Point(end), image: new Icon({ // we need to make sure the image is loaded by Vue Loader - src: require("../application/assets/linestring_arrow.png"), + src: require("../assets/linestring_arrow.png"), // fiddling with the anchor's y value does not help to // position the image more centered on the line ending, as the // default line style seems to be slightly uncentered in the @@ -312,7 +312,7 @@ geometry: new Point(end), image: new Icon({ // we need to make sure the image is loaded by Vue Loader - src: require("../application/assets/linestring_arrow_grey.png"), + src: require("../assets/linestring_arrow_grey.png"), // fiddling with the anchor's y value does not help to // position the image more centered on the line ending, as the // default line style seems to be slightly uncentered in the diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/store/user.js --- a/client/src/store/user.js Wed Nov 21 16:47:02 2018 +0100 +++ b/client/src/store/user.js Thu Nov 22 07:08:38 2018 +0100 @@ -13,7 +13,7 @@ * Thomas Junk */ -import { HTTP } from "../application/lib/http"; +import { HTTP } from "../lib/http"; export default { namespaced: true, diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/store/usermanagement.js --- a/client/src/store/usermanagement.js Wed Nov 21 16:47:02 2018 +0100 +++ b/client/src/store/usermanagement.js Thu Nov 22 07:08:38 2018 +0100 @@ -13,7 +13,7 @@ * Thomas Junk */ -import { HTTP } from "../application/lib/http"; +import { HTTP } from "../lib/http"; const newUser = () => { return { diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/systemconfiguration/systemconfiguration.vue --- a/client/src/systemconfiguration/systemconfiguration.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/toolbar/Toolbar.vue --- a/client/src/toolbar/Toolbar.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/toolbar/buttons/Cuttool.vue --- a/client/src/toolbar/buttons/Cuttool.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/toolbar/buttons/Identify.vue --- a/client/src/toolbar/buttons/Identify.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/toolbar/buttons/Layers.vue --- a/client/src/toolbar/buttons/Layers.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/toolbar/buttons/Linetool.vue --- a/client/src/toolbar/buttons/Linetool.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/toolbar/buttons/Pdftool.vue --- a/client/src/toolbar/buttons/Pdftool.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/toolbar/buttons/Polygontool.vue --- a/client/src/toolbar/buttons/Polygontool.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/translations.json --- a/client/src/translations.json Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -{ - "en_GB": { - "Enter username": "Enter username", - "Enter passphrase": "Enter passphrase", - "Login failed": "Login failed", - "Login": "Login", - "Forgot password": "Forgot password" - }, - "de_AT": { - "Enter username": "Benutzername", - "Enter passphrase": "Passphrase", - "Login failed": "Login fehlgeschlagen", - "Login": "Login", - "Forgot password": "Passwort vergessen" - } -} diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/usermanagement/Passwordfield.vue --- a/client/src/usermanagement/Passwordfield.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/usermanagement/Userdetail.vue --- a/client/src/usermanagement/Userdetail.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,298 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/usermanagement/Usermanagement.vue --- a/client/src/usermanagement/Usermanagement.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,302 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/usermanagement/Users.vue --- a/client/src/usermanagement/Users.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,279 +0,0 @@ - - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/src/zoom/zoom.vue --- a/client/src/zoom/zoom.vue Wed Nov 21 16:47:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ - - - - diff -r 717c58fea5c1 -r a76a06dd2f1e client/vue.config.js --- a/client/vue.config.js Wed Nov 21 16:47:02 2018 +0100 +++ b/client/vue.config.js Thu Nov 22 07:08:38 2018 +0100 @@ -28,7 +28,7 @@ // pass options to sass-loader sass: { // @/ is an alias to src/ - data: `@import "@/application/assets/application.sass";` + data: `@import "@/assets/application.sass";` } } },