# HG changeset patch # User Thomas Junk # Date 1548336279 -3600 # Node ID 352493221fa5526873b28b6bb5cacc2fe7b032f1 # Parent c420add2dec2eee86e2c4f631f81a509cd331638# Parent 59055c8301df0e382e89a86a0afd44bf2ee0e3f1 merge with default diff -r c420add2dec2 -r 352493221fa5 client/src/components/ImportStretches.vue --- a/client/src/components/ImportStretches.vue Thu Jan 24 14:24:00 2019 +0100 +++ b/client/src/components/ImportStretches.vue Thu Jan 24 14:24:39 2019 +0100 @@ -110,7 +110,7 @@ id="startrhm" type="text" class="form-control" - placeholder="e.g. ATXXX00001000000019900" + placeholder="e.g. ATXXX000010000019900" aria-label="startrhm" v-model="startrhm" /> @@ -135,7 +135,7 @@ id="endrhm" type="text" class="form-control" - placeholder="e.g. ATXXX00001000000019900" + placeholder="e.g. ATXXX000010000019900" aria-label="endrhm" v-model="endrhm" /> diff -r c420add2dec2 -r 352493221fa5 client/src/locale/bg_BG/LC_MESSAGES/app.po --- a/client/src/locale/bg_BG/LC_MESSAGES/app.po Thu Jan 24 14:24:00 2019 +0100 +++ b/client/src/locale/bg_BG/LC_MESSAGES/app.po Thu Jan 24 14:24:39 2019 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gemmajs 1.99.0-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-23 11:08+0100\n" +"POT-Creation-Date: 2019-01-24 09:38+0100\n" "PO-Revision-Date: 2019-01-23 09:40+0000\n" "Last-Translator: Fadi Abbud \n" "Language-Team: Bulgarian \n" @@ -67,8 +67,9 @@ #: src/components/ImportSoundingresults.vue:216 #: src/components/ImportSoundingresults.vue:255 #: src/components/ImportSoundingresults.vue:286 -#: src/components/ImportStretches.vue:323 -#: src/components/ImportStretches.vue:422 src/components/Search.vue:258 +#: src/components/ImportStretches.vue:306 +#: src/components/ImportStretches.vue:313 +#: src/components/ImportStretches.vue:485 src/components/Search.vue:258 #: src/components/Systemconfiguration.vue:114 #: src/components/Systemconfiguration.vue:129 #: src/components/Systemconfiguration.vue:148 @@ -157,7 +158,7 @@ msgid "Country" msgstr "Държава" -#: src/components/ImportStretches.vue:71 +#: src/components/ImportStretches.vue:85 msgid "Countrycode" msgstr "" @@ -171,7 +172,7 @@ msgid "Date" msgstr "" -#: src/components/ImportStretches.vue:187 +#: src/components/ImportStretches.vue:201 msgid "Date info" msgstr "" @@ -199,7 +200,7 @@ msgid "Deleted import: #" msgstr "" -#: src/components/ImportStretches.vue:305 +#: src/components/ImportStretches.vue:361 msgid "Deleting " msgstr "" @@ -236,7 +237,7 @@ msgid "Email Notification" msgstr "" -#: src/components/ImportStretches.vue:117 +#: src/components/ImportStretches.vue:131 msgid "End rhm" msgstr "" @@ -312,7 +313,7 @@ msgid "Id" msgstr "" -#: src/components/ImportStretches.vue:53 +#: src/components/ImportStretches.vue:66 msgid "ID" msgstr "" @@ -322,7 +323,7 @@ #: src/components/ImportApprovedGaugeMeasurement.vue:101 #: src/components/ImportSoundingresults.vue:278 -#: src/components/ImportStretches.vue:411 +#: src/components/ImportStretches.vue:474 #: src/components/ImportWaterwayProfiles.vue:88 src/components/Sidebar.vue:58 #: src/components/importschedule/Importschedule.vue:33 #: src/components/importschedule/Importscheduledetail.vue:651 @@ -503,7 +504,7 @@ msgid "Name" msgstr "име" -#: src/components/ImportStretches.vue:168 +#: src/components/ImportStretches.vue:182 msgid "National Object name" msgstr "" @@ -512,7 +513,7 @@ msgid "New Import" msgstr "" -#: src/components/ImportStretches.vue:233 +#: src/components/ImportStretches.vue:247 msgid "New stretch" msgstr "" @@ -520,7 +521,7 @@ msgid "No features identified." msgstr "" -#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:46 +#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:59 #: src/components/staging/Staging.vue:36 msgid "No results." msgstr "" @@ -529,7 +530,7 @@ msgid "No scheduled imports" msgstr "" -#: src/components/ImportStretches.vue:304 +#: src/components/ImportStretches.vue:360 msgid "Not implemented" msgstr "" @@ -541,7 +542,7 @@ msgid "o' clock" msgstr "" -#: src/components/ImportStretches.vue:150 +#: src/components/ImportStretches.vue:164 msgid "Object name" msgstr "" @@ -600,12 +601,12 @@ msgid "Please choose a role" msgstr "" -#: src/components/ImportStretches.vue:83 +#: src/components/ImportStretches.vue:97 msgid "Please enter a countrycode" msgstr "" #: src/components/ImportSoundingresults.vue:84 -#: src/components/ImportStretches.vue:198 +#: src/components/ImportStretches.vue:212 msgid "Please enter a date" msgstr "" @@ -641,7 +642,7 @@ msgid "Please enter a reference" msgstr "" -#: src/components/ImportStretches.vue:214 +#: src/components/ImportStretches.vue:228 msgid "Please enter a source" msgstr "" @@ -649,7 +650,7 @@ msgid "Please enter a source orgranization" msgstr "" -#: src/components/ImportStretches.vue:112 +#: src/components/ImportStretches.vue:126 msgid "Please enter a start point" msgstr "" @@ -661,16 +662,16 @@ msgid "Please enter a Username" msgstr "" -#: src/components/ImportStretches.vue:137 +#: src/components/ImportStretches.vue:151 msgid "Please enter an end point" msgstr "" -#: src/components/ImportStretches.vue:64 +#: src/components/ImportStretches.vue:78 msgid "Please enter an id" msgstr "" -#: src/components/ImportStretches.vue:162 -#: src/components/ImportStretches.vue:180 +#: src/components/ImportStretches.vue:176 +#: src/components/ImportStretches.vue:194 msgid "Please enter an objectname" msgstr "" @@ -792,7 +793,7 @@ msgid "Sounding Result" msgstr "" -#: src/components/ImportStretches.vue:203 +#: src/components/ImportStretches.vue:217 msgid "Source" msgstr "" @@ -820,7 +821,7 @@ msgid "Start" msgstr "" -#: src/components/ImportStretches.vue:92 +#: src/components/ImportStretches.vue:106 msgid "Start rhm" msgstr "" @@ -833,11 +834,11 @@ msgid "Starting import of Approved Gauge Measurements" msgstr "" -#: src/components/ImportStretches.vue:412 +#: src/components/ImportStretches.vue:475 msgid "Starting import of stretch" msgstr "" -#: src/components/ImportStretches.vue:143 +#: src/components/ImportStretches.vue:157 msgid "Startpoint is not before endpoint." msgstr "" @@ -845,7 +846,7 @@ msgid "State" msgstr "" -#: src/components/ImportStretches.vue:227 +#: src/components/ImportStretches.vue:241 #: src/components/importschedule/Importscheduledetail.vue:519 #: src/components/usermanagement/Userdetail.vue:129 msgid "Submit" diff -r c420add2dec2 -r 352493221fa5 client/src/locale/de_AT/LC_MESSAGES/app.po --- a/client/src/locale/de_AT/LC_MESSAGES/app.po Thu Jan 24 14:24:00 2019 +0100 +++ b/client/src/locale/de_AT/LC_MESSAGES/app.po Thu Jan 24 14:24:39 2019 +0100 @@ -5,9 +5,9 @@ msgstr "" "Project-Id-Version: gemma 0.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-23 11:08+0100\n" -"PO-Revision-Date: 2019-01-22 15:41+0000\n" -"Last-Translator: Bernhard E. Reiter \n" +"POT-Creation-Date: 2019-01-24 09:38+0100\n" +"PO-Revision-Date: 2019-01-23 15:28+0000\n" +"Last-Translator: Lukas Timler \n" "Language-Team: Austrian German \n" "Language: de_AT\n" "MIME-Version: 1.0\n" @@ -54,8 +54,9 @@ msgstr "Autor" #: src/components/importschedule/Importscheduledetail.vue:34 +#, fuzzy msgid "Available Fairway Depths" -msgstr "" +msgstr "Verfügbare Fahrrinnen Tiefen" #: src/components/Login.vue:70 msgid "back to login" @@ -66,8 +67,9 @@ #: src/components/ImportSoundingresults.vue:216 #: src/components/ImportSoundingresults.vue:255 #: src/components/ImportSoundingresults.vue:286 -#: src/components/ImportStretches.vue:323 -#: src/components/ImportStretches.vue:422 src/components/Search.vue:258 +#: src/components/ImportStretches.vue:306 +#: src/components/ImportStretches.vue:313 +#: src/components/ImportStretches.vue:485 src/components/Search.vue:258 #: src/components/Systemconfiguration.vue:114 #: src/components/Systemconfiguration.vue:129 #: src/components/Systemconfiguration.vue:148 @@ -117,7 +119,7 @@ #: src/components/Bottlenecks.vue:30 msgid "Chainage" -msgstr "Stationierung" +msgstr "Kilometrierung" #: src/components/ImportSoundingresults.vue:178 #: src/components/ImportSoundingresults.vue:192 @@ -127,7 +129,7 @@ #: src/components/ImportApprovedGaugeMeasurement.vue:78 #: src/components/ImportWaterwayProfiles.vue:75 msgid "choose file to upload" -msgstr "" +msgstr "Wähle hochzuladende Datei" #: src/components/Pdftool.vue:18 msgid "Choose format:" @@ -154,14 +156,14 @@ msgid "Country" msgstr "Land" -#: src/components/ImportStretches.vue:71 +#: src/components/ImportStretches.vue:85 #, fuzzy msgid "Countrycode" -msgstr "Land" +msgstr "Landeskennung" #: src/components/importschedule/Importscheduledetail.vue:507 msgid "Cronstring" -msgstr "" +msgstr "Crontab-Zeile" #: src/components/ImportSoundingresults.vue:72 #: src/components/importqueue/Importqueuedetail.vue:49 @@ -169,7 +171,7 @@ msgid "Date" msgstr "Datum" -#: src/components/ImportStretches.vue:187 +#: src/components/ImportStretches.vue:201 #, fuzzy msgid "Date info" msgstr "Datum" @@ -198,7 +200,7 @@ msgid "Deleted import: #" msgstr "" -#: src/components/ImportStretches.vue:305 +#: src/components/ImportStretches.vue:361 msgid "Deleting " msgstr "" @@ -234,7 +236,7 @@ msgid "Email Notification" msgstr "E-Mail Benachrichtigung" -#: src/components/ImportStretches.vue:117 +#: src/components/ImportStretches.vue:131 msgid "End rhm" msgstr "" @@ -312,7 +314,7 @@ msgid "Id" msgstr "" -#: src/components/ImportStretches.vue:53 +#: src/components/ImportStretches.vue:66 msgid "ID" msgstr "" @@ -322,7 +324,7 @@ #: src/components/ImportApprovedGaugeMeasurement.vue:101 #: src/components/ImportSoundingresults.vue:278 -#: src/components/ImportStretches.vue:411 +#: src/components/ImportStretches.vue:474 #: src/components/ImportWaterwayProfiles.vue:88 src/components/Sidebar.vue:58 #: src/components/importschedule/Importschedule.vue:33 #: src/components/importschedule/Importscheduledetail.vue:651 @@ -417,7 +419,7 @@ #: src/components/Bottlenecks.vue:19 msgid "Latest" -msgstr "Neuste" +msgstr "Neueste" #: src/components/layers/Layers.vue:10 msgid "Layers" @@ -502,7 +504,7 @@ msgid "Name" msgstr "Name" -#: src/components/ImportStretches.vue:168 +#: src/components/ImportStretches.vue:182 msgid "National Object name" msgstr "" @@ -511,7 +513,7 @@ msgid "New Import" msgstr "Neuer Import" -#: src/components/ImportStretches.vue:233 +#: src/components/ImportStretches.vue:247 msgid "New stretch" msgstr "" @@ -519,7 +521,7 @@ msgid "No features identified." msgstr "Keine Objekte identifiziert." -#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:46 +#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:59 #: src/components/staging/Staging.vue:36 msgid "No results." msgstr "Keine Ergebnisse." @@ -529,7 +531,7 @@ msgid "No scheduled imports" msgstr "Keine Pläne" -#: src/components/ImportStretches.vue:304 +#: src/components/ImportStretches.vue:360 msgid "Not implemented" msgstr "" @@ -541,7 +543,7 @@ msgid "o' clock" msgstr "" -#: src/components/ImportStretches.vue:150 +#: src/components/ImportStretches.vue:164 msgid "Object name" msgstr "" @@ -581,7 +583,7 @@ #: src/components/usermanagement/Userdetail.vue:346 #: src/components/usermanagement/Userdetail.vue:347 msgid "Password should at least be 8 char long including 1 digit and 1 special char like $" -msgstr "Das Passwort sollte mindestens 8 Zeichen lang sein, eine Zahlenziffer und ein Sonderzeichen wie etwa $ enthalten" +msgstr "Das Passwort sollte mindestens 8 Zeichen lang sein, eine Ziffer und ein Sonderzeichen wie etwa $ enthalten" #: src/components/usermanagement/Userdetail.vue:342 msgid "Passwords do not match!" @@ -599,13 +601,13 @@ msgid "Please choose a role" msgstr "Bitte wählen Sie eine Rolle aus" -#: src/components/ImportStretches.vue:83 +#: src/components/ImportStretches.vue:97 #, fuzzy msgid "Please enter a countrycode" msgstr "Bitte ein Datum eingeben" #: src/components/ImportSoundingresults.vue:84 -#: src/components/ImportStretches.vue:198 +#: src/components/ImportStretches.vue:212 msgid "Please enter a date" msgstr "Bitte ein Datum eingeben" @@ -647,7 +649,7 @@ msgid "Please enter a reference" msgstr "Bitte ein Höhenreferenzsystem eingeben" -#: src/components/ImportStretches.vue:214 +#: src/components/ImportStretches.vue:228 #, fuzzy msgid "Please enter a source" msgstr "Bitte ein Datum eingeben" @@ -657,7 +659,7 @@ msgid "Please enter a source orgranization" msgstr "Bitte ein Datum eingeben" -#: src/components/ImportStretches.vue:112 +#: src/components/ImportStretches.vue:126 #, fuzzy msgid "Please enter a start point" msgstr "Bitte ein Datum eingeben" @@ -672,18 +674,18 @@ msgid "Please enter a Username" msgstr "Bitte ein Datum eingeben" -#: src/components/ImportStretches.vue:137 +#: src/components/ImportStretches.vue:151 #, fuzzy msgid "Please enter an end point" msgstr "Bitte ein Datum eingeben" -#: src/components/ImportStretches.vue:64 +#: src/components/ImportStretches.vue:78 #, fuzzy msgid "Please enter an id" msgstr "Bitte ein Datum eingeben" -#: src/components/ImportStretches.vue:162 -#: src/components/ImportStretches.vue:180 +#: src/components/ImportStretches.vue:176 +#: src/components/ImportStretches.vue:194 #, fuzzy msgid "Please enter an objectname" msgstr "Bitte eine Projektion eingeben" @@ -810,7 +812,7 @@ msgid "Sounding Result" msgstr "Seichtstellenvermessung" -#: src/components/ImportStretches.vue:203 +#: src/components/ImportStretches.vue:217 msgid "Source" msgstr "" @@ -839,7 +841,7 @@ msgid "Start" msgstr "Start" -#: src/components/ImportStretches.vue:92 +#: src/components/ImportStretches.vue:106 #, fuzzy msgid "Start rhm" msgstr "Start" @@ -853,12 +855,12 @@ msgid "Starting import of Approved Gauge Measurements" msgstr "" -#: src/components/ImportStretches.vue:412 +#: src/components/ImportStretches.vue:475 #, fuzzy msgid "Starting import of stretch" msgstr "Import gestartet " -#: src/components/ImportStretches.vue:143 +#: src/components/ImportStretches.vue:157 msgid "Startpoint is not before endpoint." msgstr "" @@ -866,7 +868,7 @@ msgid "State" msgstr "Zustand" -#: src/components/ImportStretches.vue:227 +#: src/components/ImportStretches.vue:241 #: src/components/importschedule/Importscheduledetail.vue:519 #: src/components/usermanagement/Userdetail.vue:129 msgid "Submit" diff -r c420add2dec2 -r 352493221fa5 client/src/locale/en_GB/LC_MESSAGES/app.po --- a/client/src/locale/en_GB/LC_MESSAGES/app.po Thu Jan 24 14:24:00 2019 +0100 +++ b/client/src/locale/en_GB/LC_MESSAGES/app.po Thu Jan 24 14:24:39 2019 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: wamosjs 0.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-23 11:08+0100\n" +"POT-Creation-Date: 2019-01-24 09:38+0100\n" "PO-Revision-Date: 2018-07-03 17:18+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -66,8 +66,9 @@ #: src/components/ImportSoundingresults.vue:216 #: src/components/ImportSoundingresults.vue:255 #: src/components/ImportSoundingresults.vue:286 -#: src/components/ImportStretches.vue:323 -#: src/components/ImportStretches.vue:422 src/components/Search.vue:258 +#: src/components/ImportStretches.vue:306 +#: src/components/ImportStretches.vue:313 +#: src/components/ImportStretches.vue:485 src/components/Search.vue:258 #: src/components/Systemconfiguration.vue:114 #: src/components/Systemconfiguration.vue:129 #: src/components/Systemconfiguration.vue:148 @@ -154,7 +155,7 @@ msgid "Country" msgstr "" -#: src/components/ImportStretches.vue:71 +#: src/components/ImportStretches.vue:85 msgid "Countrycode" msgstr "" @@ -168,7 +169,7 @@ msgid "Date" msgstr "" -#: src/components/ImportStretches.vue:187 +#: src/components/ImportStretches.vue:201 msgid "Date info" msgstr "" @@ -196,7 +197,7 @@ msgid "Deleted import: #" msgstr "" -#: src/components/ImportStretches.vue:305 +#: src/components/ImportStretches.vue:361 msgid "Deleting " msgstr "" @@ -232,7 +233,7 @@ msgid "Email Notification" msgstr "" -#: src/components/ImportStretches.vue:117 +#: src/components/ImportStretches.vue:131 msgid "End rhm" msgstr "" @@ -308,7 +309,7 @@ msgid "Id" msgstr "" -#: src/components/ImportStretches.vue:53 +#: src/components/ImportStretches.vue:66 msgid "ID" msgstr "" @@ -318,7 +319,7 @@ #: src/components/ImportApprovedGaugeMeasurement.vue:101 #: src/components/ImportSoundingresults.vue:278 -#: src/components/ImportStretches.vue:411 +#: src/components/ImportStretches.vue:474 #: src/components/ImportWaterwayProfiles.vue:88 src/components/Sidebar.vue:58 #: src/components/importschedule/Importschedule.vue:33 #: src/components/importschedule/Importscheduledetail.vue:651 @@ -496,7 +497,7 @@ msgid "Name" msgstr "" -#: src/components/ImportStretches.vue:168 +#: src/components/ImportStretches.vue:182 msgid "National Object name" msgstr "" @@ -505,7 +506,7 @@ msgid "New Import" msgstr "" -#: src/components/ImportStretches.vue:233 +#: src/components/ImportStretches.vue:247 msgid "New stretch" msgstr "" @@ -513,7 +514,7 @@ msgid "No features identified." msgstr "" -#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:46 +#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:59 #: src/components/staging/Staging.vue:36 msgid "No results." msgstr "" @@ -522,7 +523,7 @@ msgid "No scheduled imports" msgstr "" -#: src/components/ImportStretches.vue:304 +#: src/components/ImportStretches.vue:360 msgid "Not implemented" msgstr "" @@ -534,7 +535,7 @@ msgid "o' clock" msgstr "" -#: src/components/ImportStretches.vue:150 +#: src/components/ImportStretches.vue:164 msgid "Object name" msgstr "" @@ -592,12 +593,12 @@ msgid "Please choose a role" msgstr "" -#: src/components/ImportStretches.vue:83 +#: src/components/ImportStretches.vue:97 msgid "Please enter a countrycode" msgstr "" #: src/components/ImportSoundingresults.vue:84 -#: src/components/ImportStretches.vue:198 +#: src/components/ImportStretches.vue:212 msgid "Please enter a date" msgstr "" @@ -633,7 +634,7 @@ msgid "Please enter a reference" msgstr "" -#: src/components/ImportStretches.vue:214 +#: src/components/ImportStretches.vue:228 msgid "Please enter a source" msgstr "" @@ -641,7 +642,7 @@ msgid "Please enter a source orgranization" msgstr "" -#: src/components/ImportStretches.vue:112 +#: src/components/ImportStretches.vue:126 msgid "Please enter a start point" msgstr "" @@ -653,16 +654,16 @@ msgid "Please enter a Username" msgstr "" -#: src/components/ImportStretches.vue:137 +#: src/components/ImportStretches.vue:151 msgid "Please enter an end point" msgstr "" -#: src/components/ImportStretches.vue:64 +#: src/components/ImportStretches.vue:78 msgid "Please enter an id" msgstr "" -#: src/components/ImportStretches.vue:162 -#: src/components/ImportStretches.vue:180 +#: src/components/ImportStretches.vue:176 +#: src/components/ImportStretches.vue:194 msgid "Please enter an objectname" msgstr "" @@ -784,7 +785,7 @@ msgid "Sounding Result" msgstr "" -#: src/components/ImportStretches.vue:203 +#: src/components/ImportStretches.vue:217 msgid "Source" msgstr "" @@ -812,7 +813,7 @@ msgid "Start" msgstr "" -#: src/components/ImportStretches.vue:92 +#: src/components/ImportStretches.vue:106 msgid "Start rhm" msgstr "" @@ -825,11 +826,11 @@ msgid "Starting import of Approved Gauge Measurements" msgstr "" -#: src/components/ImportStretches.vue:412 +#: src/components/ImportStretches.vue:475 msgid "Starting import of stretch" msgstr "" -#: src/components/ImportStretches.vue:143 +#: src/components/ImportStretches.vue:157 msgid "Startpoint is not before endpoint." msgstr "" @@ -837,7 +838,7 @@ msgid "State" msgstr "" -#: src/components/ImportStretches.vue:227 +#: src/components/ImportStretches.vue:241 #: src/components/importschedule/Importscheduledetail.vue:519 #: src/components/usermanagement/Userdetail.vue:129 msgid "Submit" diff -r c420add2dec2 -r 352493221fa5 client/src/locale/hr_HR/LC_MESSAGES/app.po --- a/client/src/locale/hr_HR/LC_MESSAGES/app.po Thu Jan 24 14:24:00 2019 +0100 +++ b/client/src/locale/hr_HR/LC_MESSAGES/app.po Thu Jan 24 14:24:39 2019 +0100 @@ -7,68 +7,69 @@ msgstr "" "Project-Id-Version: gemmajs 1.99.0-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-23 11:08+0100\n" -"PO-Revision-Date: 2019-01-17 13:37+0000\n" -"Last-Translator: Fadi Abbud \n" +"POT-Creation-Date: 2019-01-24 09:38+0100\n" +"PO-Revision-Date: 2019-01-23 15:28+0000\n" +"Last-Translator: Andrija Spaic \n" "Language-Team: Croatian \n" "Language: hr_HR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 3.4-dev\n" +"X-Generator: Weblate 3.4\n" #: src/components/Pdftool.vue:400 msgid "– generated by:" -msgstr "" +msgstr "– kreiran od:" #: src/components/importschedule/Importscheduledetail.vue:580 msgid "15 minutes" -msgstr "" +msgstr "15 minuta" #: src/components/importqueue/Importqueue.vue:46 msgid "Accepted" -msgstr "" +msgstr "Prihvaćeno" #: src/components/Logs.vue:25 msgid "Accesslog" -msgstr "" +msgstr "Zapis pristupa" #: src/components/usermanagement/Usermanagement.vue:104 msgid "Add User" -msgstr "" +msgstr "Dodaj korisnika" #: src/components/importschedule/Importscheduledetail.vue:600 msgid "April" -msgstr "" +msgstr "Travanj" #: src/components/importschedule/Importscheduledetail.vue:577 msgid "at" -msgstr "" +msgstr "na" #: src/components/importschedule/Importscheduledetail.vue:604 msgid "August" -msgstr "" +msgstr "Kolovoz" #: src/components/importschedule/Importschedule.vue:35 msgid "Author" -msgstr "" +msgstr "Autor" #: src/components/importschedule/Importscheduledetail.vue:34 msgid "Available Fairway Depths" -msgstr "" +msgstr "Dostupne dubine plovnog puta" #: src/components/Login.vue:70 msgid "back to login" -msgstr "" +msgstr "natrag na prijavu" #: src/components/Bottlenecks.vue:274 #: src/components/ImportApprovedGaugeMeasurement.vue:111 #: src/components/ImportSoundingresults.vue:216 #: src/components/ImportSoundingresults.vue:255 #: src/components/ImportSoundingresults.vue:286 -#: src/components/ImportStretches.vue:323 -#: src/components/ImportStretches.vue:422 src/components/Search.vue:258 +#: src/components/ImportStretches.vue:306 +#: src/components/ImportStretches.vue:313 +#: src/components/ImportStretches.vue:485 src/components/Search.vue:258 #: src/components/Systemconfiguration.vue:114 #: src/components/Systemconfiguration.vue:129 #: src/components/Systemconfiguration.vue:148 @@ -92,73 +93,73 @@ #: src/components/importschedule/Importscheduledetail.vue:893 #: src/components/importschedule/Importscheduledetail.vue:921 msgid "Backend Error" -msgstr "" +msgstr "Greška Servera" #: src/components/ImportSoundingresults.vue:16 +#, fuzzy msgid "Bottleneck" -msgstr "" +msgstr "Kritični sektor" #: src/components/Systemconfiguration.vue:19 msgid "Bottleneck Areas fill-color" -msgstr "" +msgstr "Kritični sektor - boja ispune" #: src/components/Systemconfiguration.vue:13 msgid "Bottleneck Areas stroke-color" -msgstr "" +msgstr "Kritični sektor - boja područja" #: src/components/Bottlenecks.vue:4 src/components/Sidebar.vue:27 #: src/components/importschedule/Importscheduledetail.vue:25 #: src/components/staging/StagingDetail.vue:11 msgid "Bottlenecks" -msgstr "" +msgstr "Kritični sektori" #: src/components/ImportSoundingresults.vue:126 msgid "Cancel Upload" -msgstr "" +msgstr "Prekini slanje" #: src/components/Bottlenecks.vue:30 msgid "Chainage" -msgstr "" +msgstr "Stacionaža" #: src/components/ImportSoundingresults.vue:178 #: src/components/ImportSoundingresults.vue:192 msgid "choose .zip- file" -msgstr "" +msgstr "odaberi .zip- datoteku" #: src/components/ImportApprovedGaugeMeasurement.vue:78 #: src/components/ImportWaterwayProfiles.vue:75 msgid "choose file to upload" -msgstr "" +msgstr "odaberi datoteku za učitavanje" #: src/components/Pdftool.vue:18 msgid "Choose format:" -msgstr "" +msgstr "Odaberite format:" #: src/components/fairway/Profiles.vue:64 msgid "Compare with" -msgstr "" +msgstr "Usporedi sa" #: src/components/Sidebar.vue:118 msgid "Configuration" -msgstr "" +msgstr "Konfiguracija" #: src/components/ImportSoundingresults.vue:327 #: src/components/staging/Staging.vue:33 msgid "Confirm" -msgstr "" +msgstr "Potvrdi" #: src/components/fairway/Profiles.vue:382 msgid "Coordinates copied to clipboard!" -msgstr "" +msgstr "Koordinate su kopirane u međuspremnik!" #: src/components/usermanagement/Userdetail.vue:33 msgid "Country" msgstr "Država" -#: src/components/ImportStretches.vue:71 -#, fuzzy +#: src/components/ImportStretches.vue:85 msgid "Countrycode" -msgstr "Država" +msgstr "Oznaka države" #: src/components/importschedule/Importscheduledetail.vue:507 msgid "Cronstring" @@ -168,27 +169,29 @@ #: src/components/importqueue/Importqueuedetail.vue:49 #: src/components/staging/Staging.vue:13 msgid "Date" -msgstr "" +msgstr "Datum" -#: src/components/ImportStretches.vue:187 +#: src/components/ImportStretches.vue:201 +#, fuzzy msgid "Date info" -msgstr "" +msgstr "Datum" #: src/components/Pdftool.vue:396 msgid "Date of publication:" -msgstr "" +msgstr "Datum objavljivanja:" #: src/components/ImportStretches.vue:11 +#, fuzzy msgid "Datum" -msgstr "" +msgstr "Datum" #: src/components/importschedule/Importscheduledetail.vue:582 msgid "day" -msgstr "" +msgstr "Dan" #: src/components/importschedule/Importscheduledetail.vue:608 msgid "December" -msgstr "" +msgstr "Prosinac" #: src/components/ImportStretches.vue:4 src/components/Sidebar.vue:54 msgid "Define stretches" @@ -196,31 +199,33 @@ #: src/components/importschedule/Importschedule.vue:192 msgid "Deleted import: #" -msgstr "" +msgstr "Obrisan uvoz: #" -#: src/components/ImportStretches.vue:305 +#: src/components/ImportStretches.vue:361 msgid "Deleting " -msgstr "" +msgstr "Brisanje " #: src/components/importschedule/Importscheduledetail.vue:231 msgid "Depth" -msgstr "" +msgstr "Dubina" #: src/components/ImportSoundingresults.vue:52 +#, fuzzy msgid "Depthreference" -msgstr "" +msgstr "Referenca dubine" #: src/components/importschedule/Importscheduledetail.vue:46 +#, fuzzy msgid "Distance Marks Virtual" -msgstr "" +msgstr "Oznake Udaljenosti Virtualne" #: src/components/Pdftool.vue:10 msgid "Download" -msgstr "" +msgstr "Preuzimanje" #: src/components/ImportSoundingresults.vue:118 msgid "Download Meta.json" -msgstr "" +msgstr "Preuzmi Meta.json" #: src/components/importschedule/Importschedule.vue:37 msgid "Email" @@ -228,55 +233,61 @@ #: src/components/usermanagement/Userdetail.vue:59 msgid "Email address" -msgstr "" +msgstr "E-mail adresa" #: src/components/importschedule/Importscheduledetail.vue:53 msgid "Email Notification" -msgstr "" +msgstr "Email Obavijest" -#: src/components/ImportStretches.vue:117 +#: src/components/ImportStretches.vue:131 +#, fuzzy msgid "End rhm" -msgstr "" +msgstr "Završni rhm" #: src/components/importqueue/Importqueue.vue:55 +#, fuzzy msgid "Enqueued" -msgstr "" +msgstr "Stavljeno u red" #: src/components/fairway/Profiles.vue:123 msgid "Enter coordinates manually" -msgstr "" +msgstr "Unesi koordinate ručno" #: src/components/fairway/Profiles.vue:185 msgid "Enter label for cross profile" -msgstr "" +msgstr "Unesi oznaku poprečnog profila" #: src/components/Login.vue:157 +#, fuzzy msgid "Enter passphrase" -msgstr "" +msgstr "Unesi zaporku" #: src/components/Login.vue:160 msgid "Enter username" -msgstr "" +msgstr "Unesi korisničko ime" #: src/components/usermanagement/Userdetail.vue:385 msgid "Error while saving user" -msgstr "" +msgstr "Greška kod spremanja korisnika" #: src/components/Logs.vue:34 msgid "Errorlog" -msgstr "" +msgstr "Zapis pogreške" #: src/components/importschedule/Importscheduledetail.vue:573 +#, fuzzy msgid "Every" -msgstr "" +msgstr "Svaki" #: src/components/importqueue/Importqueue.vue:37 +#, fuzzy msgid "Failed" -msgstr "" +msgstr "Neuspjelo" #: src/components/importschedule/Importscheduledetail.vue:40 +#, fuzzy msgid "Fairwaydimension" -msgstr "" +msgstr "Dimenzije plovnog puta" #: src/components/importschedule/Importscheduledetail.vue:170 msgid "Featuretype" @@ -284,43 +295,45 @@ #: src/components/importschedule/Importscheduledetail.vue:598 msgid "February" -msgstr "" +msgstr "Veljača" #: src/components/Login.vue:76 msgid "Forgot password" -msgstr "" +msgstr "Zaboravljena lozinka" #: src/components/importschedule/Importscheduledetail.vue:592 msgid "Friday" -msgstr "" +msgstr "Petak" #: src/components/importschedule/Importscheduledetail.vue:31 msgid "Gauge measurement" msgstr "" #: src/components/Pdftool.vue:10 src/components/Pdftool.vue:61 +#, fuzzy msgid "Generate PDF" -msgstr "" +msgstr "Generiraj PDF" #: src/components/importschedule/Importscheduledetail.vue:581 msgid "hour" -msgstr "" +msgstr "sat" #: src/components/importqueue/Importqueue.vue:52 msgid "Id" msgstr "" -#: src/components/ImportStretches.vue:53 +#: src/components/ImportStretches.vue:66 msgid "ID" msgstr "" #: src/components/Identify.vue:10 +#, fuzzy msgid "Identified" -msgstr "" +msgstr "Identificirano" #: src/components/ImportApprovedGaugeMeasurement.vue:101 #: src/components/ImportSoundingresults.vue:278 -#: src/components/ImportStretches.vue:411 +#: src/components/ImportStretches.vue:474 #: src/components/ImportWaterwayProfiles.vue:88 src/components/Sidebar.vue:58 #: src/components/importschedule/Importschedule.vue:33 #: src/components/importschedule/Importscheduledetail.vue:651 @@ -328,7 +341,7 @@ #: src/components/importschedule/Importscheduledetail.vue:886 #: src/components/importschedule/Importscheduledetail.vue:914 msgid "Import" -msgstr "" +msgstr "Uvoz" #: src/components/ImportApprovedGaugeMeasurement.vue:11 #: src/components/Sidebar.vue:76 @@ -462,9 +475,8 @@ msgstr "" #: src/components/importschedule/Importscheduledetail.vue:601 -#, fuzzy msgid "May" -msgstr "Karta" +msgstr "" #: src/components/Bottlenecks.vue:20 msgid "Measurement" @@ -472,7 +484,7 @@ #: src/components/importqueue/Importqueuedetail.vue:58 msgid "Message" -msgstr "" +msgstr "Poruka" #: src/components/importschedule/Importscheduledetail.vue:574 msgid "minutes past" @@ -499,7 +511,7 @@ msgid "Name" msgstr "Naziv" -#: src/components/ImportStretches.vue:168 +#: src/components/ImportStretches.vue:182 msgid "National Object name" msgstr "" @@ -508,7 +520,7 @@ msgid "New Import" msgstr "" -#: src/components/ImportStretches.vue:233 +#: src/components/ImportStretches.vue:247 msgid "New stretch" msgstr "" @@ -516,7 +528,7 @@ msgid "No features identified." msgstr "" -#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:46 +#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:59 #: src/components/staging/Staging.vue:36 msgid "No results." msgstr "" @@ -525,7 +537,7 @@ msgid "No scheduled imports" msgstr "" -#: src/components/ImportStretches.vue:304 +#: src/components/ImportStretches.vue:360 msgid "Not implemented" msgstr "" @@ -537,7 +549,7 @@ msgid "o' clock" msgstr "" -#: src/components/ImportStretches.vue:150 +#: src/components/ImportStretches.vue:164 msgid "Object name" msgstr "" @@ -559,12 +571,12 @@ #: src/components/usermanagement/Userdetail.vue:237 msgid "password" -msgstr "" +msgstr "Lozinka" #: src/components/importschedule/Importscheduledetail.vue:137 #: src/components/usermanagement/Userdetail.vue:235 msgid "Password" -msgstr "" +msgstr "Lozinka" #: src/components/usermanagement/Userdetail.vue:238 msgid "password again" @@ -595,13 +607,12 @@ msgid "Please choose a role" msgstr "" -#: src/components/ImportStretches.vue:83 -#, fuzzy +#: src/components/ImportStretches.vue:97 msgid "Please enter a countrycode" -msgstr "Odaberite zemlju" +msgstr "" #: src/components/ImportSoundingresults.vue:84 -#: src/components/ImportStretches.vue:198 +#: src/components/ImportStretches.vue:212 msgid "Please enter a date" msgstr "" @@ -637,16 +648,15 @@ msgid "Please enter a reference" msgstr "" -#: src/components/ImportStretches.vue:214 +#: src/components/ImportStretches.vue:228 msgid "Please enter a source" msgstr "" #: src/components/importschedule/Importscheduledetail.vue:309 -#, fuzzy msgid "Please enter a source orgranization" -msgstr "Odaberite zemlju" +msgstr "" -#: src/components/ImportStretches.vue:112 +#: src/components/ImportStretches.vue:126 msgid "Please enter a start point" msgstr "" @@ -658,16 +668,16 @@ msgid "Please enter a Username" msgstr "" -#: src/components/ImportStretches.vue:137 +#: src/components/ImportStretches.vue:151 msgid "Please enter an end point" msgstr "" -#: src/components/ImportStretches.vue:64 +#: src/components/ImportStretches.vue:78 msgid "Please enter an id" msgstr "" -#: src/components/ImportStretches.vue:162 -#: src/components/ImportStretches.vue:180 +#: src/components/ImportStretches.vue:176 +#: src/components/ImportStretches.vue:194 msgid "Please enter an objectname" msgstr "" @@ -755,8 +765,9 @@ msgstr "" #: src/components/Systemconfiguration.vue:25 +#, fuzzy msgid "Send" -msgstr "" +msgstr "Pošalji" #: src/components/usermanagement/Userdetail.vue:138 msgid "Send testmail" @@ -789,7 +800,7 @@ msgid "Sounding Result" msgstr "" -#: src/components/ImportStretches.vue:203 +#: src/components/ImportStretches.vue:217 msgid "Source" msgstr "" @@ -817,7 +828,7 @@ msgid "Start" msgstr "" -#: src/components/ImportStretches.vue:92 +#: src/components/ImportStretches.vue:106 msgid "Start rhm" msgstr "" @@ -830,11 +841,11 @@ msgid "Starting import of Approved Gauge Measurements" msgstr "" -#: src/components/ImportStretches.vue:412 +#: src/components/ImportStretches.vue:475 msgid "Starting import of stretch" msgstr "" -#: src/components/ImportStretches.vue:143 +#: src/components/ImportStretches.vue:157 msgid "Startpoint is not before endpoint." msgstr "" @@ -842,7 +853,7 @@ msgid "State" msgstr "" -#: src/components/ImportStretches.vue:227 +#: src/components/ImportStretches.vue:241 #: src/components/importschedule/Importscheduledetail.vue:519 #: src/components/usermanagement/Userdetail.vue:129 msgid "Submit" @@ -975,7 +986,7 @@ #: src/components/importschedule/Importscheduledetail.vue:585 msgid "year" -msgstr "" +msgstr "Godina" #: src/components/fairway/Profiles.vue:443 #: src/components/fairway/Profiles.vue:444 @@ -988,4 +999,4 @@ #: src/store/map.js:445 msgid "Area" -msgstr "" +msgstr "Područje" diff -r c420add2dec2 -r 352493221fa5 client/src/locale/hu_HU/LC_MESSAGES/app.po --- a/client/src/locale/hu_HU/LC_MESSAGES/app.po Thu Jan 24 14:24:00 2019 +0100 +++ b/client/src/locale/hu_HU/LC_MESSAGES/app.po Thu Jan 24 14:24:39 2019 +0100 @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: gemmajs 1.99.0-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-23 11:08+0100\n" -"PO-Revision-Date: 2019-01-22 13:47+0000\n" +"POT-Creation-Date: 2019-01-24 09:38+0100\n" +"PO-Revision-Date: 2019-01-23 15:28+0000\n" "Last-Translator: Fadi Abbud \n" "Language-Team: Hungarian \n" "Language: hu_HU\n" @@ -67,8 +67,9 @@ #: src/components/ImportSoundingresults.vue:216 #: src/components/ImportSoundingresults.vue:255 #: src/components/ImportSoundingresults.vue:286 -#: src/components/ImportStretches.vue:323 -#: src/components/ImportStretches.vue:422 src/components/Search.vue:258 +#: src/components/ImportStretches.vue:306 +#: src/components/ImportStretches.vue:313 +#: src/components/ImportStretches.vue:485 src/components/Search.vue:258 #: src/components/Systemconfiguration.vue:114 #: src/components/Systemconfiguration.vue:129 #: src/components/Systemconfiguration.vue:148 @@ -95,8 +96,9 @@ msgstr "" #: src/components/ImportSoundingresults.vue:16 +#, fuzzy msgid "Bottleneck" -msgstr "" +msgstr "Gázlók, szűkületek" #: src/components/Systemconfiguration.vue:19 msgid "Bottleneck Areas fill-color" @@ -156,7 +158,7 @@ msgid "Country" msgstr "Ország" -#: src/components/ImportStretches.vue:71 +#: src/components/ImportStretches.vue:85 msgid "Countrycode" msgstr "" @@ -170,7 +172,7 @@ msgid "Date" msgstr "" -#: src/components/ImportStretches.vue:187 +#: src/components/ImportStretches.vue:201 msgid "Date info" msgstr "" @@ -198,7 +200,7 @@ msgid "Deleted import: #" msgstr "" -#: src/components/ImportStretches.vue:305 +#: src/components/ImportStretches.vue:361 msgid "Deleting " msgstr "" @@ -229,13 +231,13 @@ #: src/components/usermanagement/Userdetail.vue:59 msgid "Email address" -msgstr "" +msgstr "Email cím" #: src/components/importschedule/Importscheduledetail.vue:53 msgid "Email Notification" msgstr "" -#: src/components/ImportStretches.vue:117 +#: src/components/ImportStretches.vue:131 msgid "End rhm" msgstr "" @@ -311,7 +313,7 @@ msgid "Id" msgstr "" -#: src/components/ImportStretches.vue:53 +#: src/components/ImportStretches.vue:66 msgid "ID" msgstr "" @@ -321,7 +323,7 @@ #: src/components/ImportApprovedGaugeMeasurement.vue:101 #: src/components/ImportSoundingresults.vue:278 -#: src/components/ImportStretches.vue:411 +#: src/components/ImportStretches.vue:474 #: src/components/ImportWaterwayProfiles.vue:88 src/components/Sidebar.vue:58 #: src/components/importschedule/Importschedule.vue:33 #: src/components/importschedule/Importscheduledetail.vue:651 @@ -418,6 +420,7 @@ msgstr "" #: src/components/layers/Layers.vue:10 +#, fuzzy msgid "Layers" msgstr "Rétegek" @@ -501,7 +504,7 @@ msgid "Name" msgstr "Név" -#: src/components/ImportStretches.vue:168 +#: src/components/ImportStretches.vue:182 msgid "National Object name" msgstr "" @@ -510,7 +513,7 @@ msgid "New Import" msgstr "" -#: src/components/ImportStretches.vue:233 +#: src/components/ImportStretches.vue:247 msgid "New stretch" msgstr "" @@ -518,7 +521,7 @@ msgid "No features identified." msgstr "" -#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:46 +#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:59 #: src/components/staging/Staging.vue:36 msgid "No results." msgstr "" @@ -527,7 +530,7 @@ msgid "No scheduled imports" msgstr "" -#: src/components/ImportStretches.vue:304 +#: src/components/ImportStretches.vue:360 msgid "Not implemented" msgstr "" @@ -539,7 +542,7 @@ msgid "o' clock" msgstr "" -#: src/components/ImportStretches.vue:150 +#: src/components/ImportStretches.vue:164 msgid "Object name" msgstr "" @@ -566,7 +569,7 @@ #: src/components/importschedule/Importscheduledetail.vue:137 #: src/components/usermanagement/Userdetail.vue:235 msgid "Password" -msgstr "" +msgstr "Jelszó" #: src/components/usermanagement/Userdetail.vue:238 msgid "password again" @@ -598,12 +601,12 @@ msgid "Please choose a role" msgstr "" -#: src/components/ImportStretches.vue:83 +#: src/components/ImportStretches.vue:97 msgid "Please enter a countrycode" msgstr "" #: src/components/ImportSoundingresults.vue:84 -#: src/components/ImportStretches.vue:198 +#: src/components/ImportStretches.vue:212 msgid "Please enter a date" msgstr "" @@ -639,7 +642,7 @@ msgid "Please enter a reference" msgstr "" -#: src/components/ImportStretches.vue:214 +#: src/components/ImportStretches.vue:228 msgid "Please enter a source" msgstr "" @@ -647,7 +650,7 @@ msgid "Please enter a source orgranization" msgstr "" -#: src/components/ImportStretches.vue:112 +#: src/components/ImportStretches.vue:126 msgid "Please enter a start point" msgstr "" @@ -659,16 +662,16 @@ msgid "Please enter a Username" msgstr "" -#: src/components/ImportStretches.vue:137 +#: src/components/ImportStretches.vue:151 msgid "Please enter an end point" msgstr "" -#: src/components/ImportStretches.vue:64 +#: src/components/ImportStretches.vue:78 msgid "Please enter an id" msgstr "" -#: src/components/ImportStretches.vue:162 -#: src/components/ImportStretches.vue:180 +#: src/components/ImportStretches.vue:176 +#: src/components/ImportStretches.vue:194 msgid "Please enter an objectname" msgstr "" @@ -756,8 +759,9 @@ msgstr "" #: src/components/Systemconfiguration.vue:25 +#, fuzzy msgid "Send" -msgstr "" +msgstr "Küldés" #: src/components/usermanagement/Userdetail.vue:138 msgid "Send testmail" @@ -790,7 +794,7 @@ msgid "Sounding Result" msgstr "" -#: src/components/ImportStretches.vue:203 +#: src/components/ImportStretches.vue:217 msgid "Source" msgstr "" @@ -818,7 +822,7 @@ msgid "Start" msgstr "" -#: src/components/ImportStretches.vue:92 +#: src/components/ImportStretches.vue:106 msgid "Start rhm" msgstr "" @@ -831,11 +835,11 @@ msgid "Starting import of Approved Gauge Measurements" msgstr "" -#: src/components/ImportStretches.vue:412 +#: src/components/ImportStretches.vue:475 msgid "Starting import of stretch" msgstr "" -#: src/components/ImportStretches.vue:143 +#: src/components/ImportStretches.vue:157 msgid "Startpoint is not before endpoint." msgstr "" @@ -843,7 +847,7 @@ msgid "State" msgstr "" -#: src/components/ImportStretches.vue:227 +#: src/components/ImportStretches.vue:241 #: src/components/importschedule/Importscheduledetail.vue:519 #: src/components/usermanagement/Userdetail.vue:129 msgid "Submit" @@ -899,6 +903,7 @@ #: src/components/importschedule/Importschedule.vue:34 #: src/components/staging/Staging.vue:12 +#, fuzzy msgid "Type" msgstr "Típus" diff -r c420add2dec2 -r 352493221fa5 client/src/locale/ro_RO/LC_MESSAGES/app.po --- a/client/src/locale/ro_RO/LC_MESSAGES/app.po Thu Jan 24 14:24:00 2019 +0100 +++ b/client/src/locale/ro_RO/LC_MESSAGES/app.po Thu Jan 24 14:24:39 2019 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gemmajs 1.99.0-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-23 11:08+0100\n" +"POT-Creation-Date: 2019-01-24 09:38+0100\n" "PO-Revision-Date: 2019-01-19 13:20+0000\n" "Last-Translator: MANESCU CARMEN \n" "Language-Team: Romanian \n" @@ -67,8 +67,9 @@ #: src/components/ImportSoundingresults.vue:216 #: src/components/ImportSoundingresults.vue:255 #: src/components/ImportSoundingresults.vue:286 -#: src/components/ImportStretches.vue:323 -#: src/components/ImportStretches.vue:422 src/components/Search.vue:258 +#: src/components/ImportStretches.vue:306 +#: src/components/ImportStretches.vue:313 +#: src/components/ImportStretches.vue:485 src/components/Search.vue:258 #: src/components/Systemconfiguration.vue:114 #: src/components/Systemconfiguration.vue:129 #: src/components/Systemconfiguration.vue:148 @@ -156,7 +157,7 @@ msgid "Country" msgstr "Tara" -#: src/components/ImportStretches.vue:71 +#: src/components/ImportStretches.vue:85 msgid "Countrycode" msgstr "Cod Tara" @@ -170,7 +171,7 @@ msgid "Date" msgstr "Data" -#: src/components/ImportStretches.vue:187 +#: src/components/ImportStretches.vue:201 msgid "Date info" msgstr "Informatii despre data" @@ -199,7 +200,7 @@ msgid "Deleted import: #" msgstr "Import sters: #" -#: src/components/ImportStretches.vue:305 +#: src/components/ImportStretches.vue:361 msgid "Deleting " msgstr "" @@ -235,7 +236,7 @@ msgid "Email Notification" msgstr "Notificare e-mail" -#: src/components/ImportStretches.vue:117 +#: src/components/ImportStretches.vue:131 msgid "End rhm" msgstr "Rhm final" @@ -311,7 +312,7 @@ msgid "Id" msgstr "Eticheta" -#: src/components/ImportStretches.vue:53 +#: src/components/ImportStretches.vue:66 msgid "ID" msgstr "Eticheta" @@ -321,7 +322,7 @@ #: src/components/ImportApprovedGaugeMeasurement.vue:101 #: src/components/ImportSoundingresults.vue:278 -#: src/components/ImportStretches.vue:411 +#: src/components/ImportStretches.vue:474 #: src/components/ImportWaterwayProfiles.vue:88 src/components/Sidebar.vue:58 #: src/components/importschedule/Importschedule.vue:33 #: src/components/importschedule/Importscheduledetail.vue:651 @@ -499,7 +500,7 @@ msgid "Name" msgstr "Nume" -#: src/components/ImportStretches.vue:168 +#: src/components/ImportStretches.vue:182 msgid "National Object name" msgstr "Numele national al obiectului" @@ -508,7 +509,7 @@ msgid "New Import" msgstr "Import nou" -#: src/components/ImportStretches.vue:233 +#: src/components/ImportStretches.vue:247 #, fuzzy msgid "New stretch" msgstr "Sector" @@ -517,7 +518,7 @@ msgid "No features identified." msgstr "Nicio caracteristica identificata" -#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:46 +#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:59 #: src/components/staging/Staging.vue:36 msgid "No results." msgstr "Niciun rezultat." @@ -526,7 +527,7 @@ msgid "No scheduled imports" msgstr "Niciun import planificat" -#: src/components/ImportStretches.vue:304 +#: src/components/ImportStretches.vue:360 #, fuzzy msgid "Not implemented" msgstr "Nu este implementat!" @@ -539,7 +540,7 @@ msgid "o' clock" msgstr "ora" -#: src/components/ImportStretches.vue:150 +#: src/components/ImportStretches.vue:164 msgid "Object name" msgstr "Nume obiect" @@ -597,12 +598,12 @@ msgid "Please choose a role" msgstr "Selectati un rol" -#: src/components/ImportStretches.vue:83 +#: src/components/ImportStretches.vue:97 msgid "Please enter a countrycode" msgstr "Introduceti un cod pentru țară" #: src/components/ImportSoundingresults.vue:84 -#: src/components/ImportStretches.vue:198 +#: src/components/ImportStretches.vue:212 msgid "Please enter a date" msgstr "Introduceti o data" @@ -638,7 +639,7 @@ msgid "Please enter a reference" msgstr "Introduceti o referinta" -#: src/components/ImportStretches.vue:214 +#: src/components/ImportStretches.vue:228 msgid "Please enter a source" msgstr "Introduceti o sursa" @@ -646,7 +647,7 @@ msgid "Please enter a source orgranization" msgstr "Introduceti o sursa (organizatie)" -#: src/components/ImportStretches.vue:112 +#: src/components/ImportStretches.vue:126 msgid "Please enter a start point" msgstr "Introduceti un punct de pornire" @@ -658,16 +659,16 @@ msgid "Please enter a Username" msgstr "Introduceti nume utilizator" -#: src/components/ImportStretches.vue:137 +#: src/components/ImportStretches.vue:151 msgid "Please enter an end point" msgstr "Introduceti un punct final" -#: src/components/ImportStretches.vue:64 +#: src/components/ImportStretches.vue:78 msgid "Please enter an id" msgstr "Introduceti o eticheta" -#: src/components/ImportStretches.vue:162 -#: src/components/ImportStretches.vue:180 +#: src/components/ImportStretches.vue:176 +#: src/components/ImportStretches.vue:194 msgid "Please enter an objectname" msgstr "Introduceti un nume de obiect" @@ -792,7 +793,7 @@ msgid "Sounding Result" msgstr "Rezultate masuratori hidrografice" -#: src/components/ImportStretches.vue:203 +#: src/components/ImportStretches.vue:217 msgid "Source" msgstr "Sursa" @@ -821,7 +822,7 @@ msgid "Start" msgstr "Porneste" -#: src/components/ImportStretches.vue:92 +#: src/components/ImportStretches.vue:106 msgid "Start rhm" msgstr "Rhm de pornire" @@ -834,12 +835,12 @@ msgid "Starting import of Approved Gauge Measurements" msgstr "Incepe importul Masuratorilor de la statiile de nivel aprobate" -#: src/components/ImportStretches.vue:412 +#: src/components/ImportStretches.vue:475 #, fuzzy msgid "Starting import of stretch" msgstr "Incepe importul pentru: " -#: src/components/ImportStretches.vue:143 +#: src/components/ImportStretches.vue:157 msgid "Startpoint is not before endpoint." msgstr "" @@ -847,7 +848,7 @@ msgid "State" msgstr "Status" -#: src/components/ImportStretches.vue:227 +#: src/components/ImportStretches.vue:241 #: src/components/importschedule/Importscheduledetail.vue:519 #: src/components/usermanagement/Userdetail.vue:129 msgid "Submit" diff -r c420add2dec2 -r 352493221fa5 client/src/locale/sk_SK/LC_MESSAGES/app.po --- a/client/src/locale/sk_SK/LC_MESSAGES/app.po Thu Jan 24 14:24:00 2019 +0100 +++ b/client/src/locale/sk_SK/LC_MESSAGES/app.po Thu Jan 24 14:24:39 2019 +0100 @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: wamosjs 0.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-23 11:08+0100\n" +"POT-Creation-Date: 2019-01-24 09:38+0100\n" "PO-Revision-Date: 2019-01-22 12:18+0000\n" "Last-Translator: Fadi Abbud \n" "Language-Team: Slovak \n" @@ -62,8 +62,9 @@ #: src/components/ImportSoundingresults.vue:216 #: src/components/ImportSoundingresults.vue:255 #: src/components/ImportSoundingresults.vue:286 -#: src/components/ImportStretches.vue:323 -#: src/components/ImportStretches.vue:422 src/components/Search.vue:258 +#: src/components/ImportStretches.vue:306 +#: src/components/ImportStretches.vue:313 +#: src/components/ImportStretches.vue:485 src/components/Search.vue:258 #: src/components/Systemconfiguration.vue:114 #: src/components/Systemconfiguration.vue:129 #: src/components/Systemconfiguration.vue:148 @@ -151,7 +152,7 @@ msgid "Country" msgstr "Štát" -#: src/components/ImportStretches.vue:71 +#: src/components/ImportStretches.vue:85 msgid "Countrycode" msgstr "" @@ -165,7 +166,7 @@ msgid "Date" msgstr "" -#: src/components/ImportStretches.vue:187 +#: src/components/ImportStretches.vue:201 msgid "Date info" msgstr "" @@ -193,7 +194,7 @@ msgid "Deleted import: #" msgstr "" -#: src/components/ImportStretches.vue:305 +#: src/components/ImportStretches.vue:361 msgid "Deleting " msgstr "" @@ -229,7 +230,7 @@ msgid "Email Notification" msgstr "" -#: src/components/ImportStretches.vue:117 +#: src/components/ImportStretches.vue:131 msgid "End rhm" msgstr "" @@ -305,7 +306,7 @@ msgid "Id" msgstr "" -#: src/components/ImportStretches.vue:53 +#: src/components/ImportStretches.vue:66 msgid "ID" msgstr "" @@ -315,7 +316,7 @@ #: src/components/ImportApprovedGaugeMeasurement.vue:101 #: src/components/ImportSoundingresults.vue:278 -#: src/components/ImportStretches.vue:411 +#: src/components/ImportStretches.vue:474 #: src/components/ImportWaterwayProfiles.vue:88 src/components/Sidebar.vue:58 #: src/components/importschedule/Importschedule.vue:33 #: src/components/importschedule/Importscheduledetail.vue:651 @@ -494,7 +495,7 @@ msgid "Name" msgstr "Názov" -#: src/components/ImportStretches.vue:168 +#: src/components/ImportStretches.vue:182 msgid "National Object name" msgstr "" @@ -503,7 +504,7 @@ msgid "New Import" msgstr "" -#: src/components/ImportStretches.vue:233 +#: src/components/ImportStretches.vue:247 msgid "New stretch" msgstr "" @@ -511,7 +512,7 @@ msgid "No features identified." msgstr "" -#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:46 +#: src/components/Bottlenecks.vue:115 src/components/ImportStretches.vue:59 #: src/components/staging/Staging.vue:36 msgid "No results." msgstr "" @@ -520,7 +521,7 @@ msgid "No scheduled imports" msgstr "" -#: src/components/ImportStretches.vue:304 +#: src/components/ImportStretches.vue:360 msgid "Not implemented" msgstr "" @@ -532,7 +533,7 @@ msgid "o' clock" msgstr "" -#: src/components/ImportStretches.vue:150 +#: src/components/ImportStretches.vue:164 msgid "Object name" msgstr "" @@ -590,12 +591,12 @@ msgid "Please choose a role" msgstr "" -#: src/components/ImportStretches.vue:83 +#: src/components/ImportStretches.vue:97 msgid "Please enter a countrycode" msgstr "" #: src/components/ImportSoundingresults.vue:84 -#: src/components/ImportStretches.vue:198 +#: src/components/ImportStretches.vue:212 msgid "Please enter a date" msgstr "" @@ -631,7 +632,7 @@ msgid "Please enter a reference" msgstr "" -#: src/components/ImportStretches.vue:214 +#: src/components/ImportStretches.vue:228 msgid "Please enter a source" msgstr "" @@ -639,7 +640,7 @@ msgid "Please enter a source orgranization" msgstr "" -#: src/components/ImportStretches.vue:112 +#: src/components/ImportStretches.vue:126 msgid "Please enter a start point" msgstr "" @@ -651,16 +652,16 @@ msgid "Please enter a Username" msgstr "" -#: src/components/ImportStretches.vue:137 +#: src/components/ImportStretches.vue:151 msgid "Please enter an end point" msgstr "" -#: src/components/ImportStretches.vue:64 +#: src/components/ImportStretches.vue:78 msgid "Please enter an id" msgstr "" -#: src/components/ImportStretches.vue:162 -#: src/components/ImportStretches.vue:180 +#: src/components/ImportStretches.vue:176 +#: src/components/ImportStretches.vue:194 msgid "Please enter an objectname" msgstr "" @@ -782,7 +783,7 @@ msgid "Sounding Result" msgstr "" -#: src/components/ImportStretches.vue:203 +#: src/components/ImportStretches.vue:217 msgid "Source" msgstr "Zdroj správy" @@ -810,7 +811,7 @@ msgid "Start" msgstr "" -#: src/components/ImportStretches.vue:92 +#: src/components/ImportStretches.vue:106 msgid "Start rhm" msgstr "" @@ -823,11 +824,11 @@ msgid "Starting import of Approved Gauge Measurements" msgstr "" -#: src/components/ImportStretches.vue:412 +#: src/components/ImportStretches.vue:475 msgid "Starting import of stretch" msgstr "" -#: src/components/ImportStretches.vue:143 +#: src/components/ImportStretches.vue:157 msgid "Startpoint is not before endpoint." msgstr "" @@ -835,7 +836,7 @@ msgid "State" msgstr "" -#: src/components/ImportStretches.vue:227 +#: src/components/ImportStretches.vue:241 #: src/components/importschedule/Importscheduledetail.vue:519 #: src/components/usermanagement/Userdetail.vue:129 msgid "Submit" diff -r c420add2dec2 -r 352493221fa5 pkg/common/attributes.go --- a/pkg/common/attributes.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/common/attributes.go Thu Jan 24 14:24:39 2019 +0100 @@ -67,3 +67,16 @@ } return i, true } + +func (ca Attributes) Duration(key string) (time.Duration, bool) { + s, found := ca.Get(key) + if !found { + return 0, false + } + d, err := time.ParseDuration(s) + if err != nil { + log.Printf("error: %v\n", err) + return 0, false + } + return d, true +} diff -r c420add2dec2 -r 352493221fa5 pkg/controllers/agmimports.go --- a/pkg/controllers/agmimports.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/controllers/agmimports.go Thu Jan 24 14:24:39 2019 +0100 @@ -102,18 +102,29 @@ } } - retries := -1 + var retries *int if r := req.FormValue("retries"); r != "" { - var err error - if retries, err = strconv.Atoi(r); err != nil { + if v, err := strconv.Atoi(r); err != nil { log.Printf("error: %v\n", err) - retries = -1 + } else { + retries = &v + } + } + + var waitDuration *time.Duration + if wd := req.FormValue("wait-duration"); wd != "" { + if v, err := time.ParseDuration(wd); err != nil { + log.Printf("error: %v\n", err) + } else { + waitDuration = &v } } jobID, err := imports.AddJob( imports.AGMJobKind, - due, retries, + due, + retries, + waitDuration, session.User, sendEmail, serialized) diff -r c420add2dec2 -r 352493221fa5 pkg/controllers/importconfig.go --- a/pkg/controllers/importconfig.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/controllers/importconfig.go Thu Jan 24 14:24:39 2019 +0100 @@ -39,7 +39,7 @@ send_email, cron, url -FROM waterway.import_configuration` +FROM import.import_configuration` selectImportConfigurationSQL = selectImportConfigurationPrefix + ` ORDER by id` @@ -48,30 +48,30 @@ WHERE id = $1` insertImportConfigurationSQL = ` -INSERT INTO waterway.import_configuration +INSERT INTO import.import_configuration (username, kind, cron, send_email, url) VALUES ($1, $2, $3, $4, $5) RETURNING id` insertImportConfigurationAttributeSQL = ` -INSERT INTO waterway.import_configuration_attributes +INSERT INTO import.import_configuration_attributes (import_configuration_id, k, v) VALUES ($1, $2, $3)` hasImportConfigurationSQL = ` -SELECT true FROM waterway.import_configuration +SELECT true FROM import.import_configuration WHERE id = $1` deleteImportConfiguationAttributesSQL = ` -DELETE FROM waterway.import_configuration_attributes +DELETE FROM import.import_configuration_attributes WHERE import_configuration_id = $1` deleteImportConfiguationSQL = ` -DELETE FROM waterway.import_configuration +DELETE FROM import.import_configuration WHERE id = $1` updateImportConfigurationSQL = ` -UPDATE waterway.import_configuration SET +UPDATE import.import_configuration SET username = $2, kind = $3, cron = $4, diff -r c420add2dec2 -r 352493221fa5 pkg/controllers/importqueue.go --- a/pkg/controllers/importqueue.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/controllers/importqueue.go Thu Jan 24 14:24:39 2019 +0100 @@ -40,30 +40,30 @@ username, signer, summary -FROM waterway.imports +FROM import.imports ` selectHasImportSQL = ` -SELECT true FROM Waterway.imports WHERE id = $1` +SELECT true FROM import.imports WHERE id = $1` selectHasNoRunningImportSQL = ` -SELECT true FROM waterway.imports -WHERE id = $1 AND state <> 'running'::waterway.import_state` +SELECT true FROM import.imports +WHERE id = $1 AND state <> 'running'::import_state` selectImportLogsSQL = ` SELECT time, kind::varchar, msg -FROM waterway.import_logs +FROM import.import_logs WHERE import_id = $1 ORDER BY time` deleteLogsSQL = ` -DELETE FROM waterway.import_logs WHERE import_id = $1` +DELETE FROM import.import_logs WHERE import_id = $1` deleteImportSQL = ` -DELETE FROM waterway.imports WHERE id = $1` +DELETE FROM import.imports WHERE id = $1` ) func toInt8Array(txt string) *pgtype.Int8Array { @@ -347,23 +347,23 @@ const ( isPendingSQL = ` -SELECT state = 'pending'::waterway.import_state, kind -FROM waterway.imports +SELECT state = 'pending'::import_state, kind +FROM import.imports WHERE id = $1` reviewSQL = ` -UPDATE waterway.imports SET - state = $1::waterway.import_state, +UPDATE import.imports SET + state = $1::import_state, signer = $2 WHERE id = $3` - deleteImportDataSQL = `SELECT waterway.del_import($1)` + deleteImportDataSQL = `SELECT import.del_import($1)` deleteImportTrackSQL = ` -DELETE FROM waterway.track_imports WHERE import_id = $1` +DELETE FROM import.track_imports WHERE import_id = $1` logDecisionSQL = ` -INSERT INTO waterway.import_logs (import_id, msg) VALUES ($1, $2)` +INSERT INTO import.import_logs (import_id, msg) VALUES ($1, $2)` ) func reviewImports( diff -r c420add2dec2 -r 352493221fa5 pkg/controllers/manualimports.go --- a/pkg/controllers/manualimports.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/controllers/manualimports.go Thu Jan 24 14:24:39 2019 +0100 @@ -26,68 +26,54 @@ "gemma.intevation.de/gemma/pkg/models" ) -func retry(a common.Attributes) (time.Time, int) { - due, _ := a.Time("due") - retries, ok := a.Int("retries") - if !ok { - retries = -1 - } - return due, retries -} - -func importBottleneck(input interface{}) (interface{}, time.Time, int, bool) { +func importBottleneck(input interface{}) (interface{}, common.Attributes, bool) { bi := input.(*models.BottleneckImport) bn := &imports.Bottleneck{ URL: bi.URL, Insecure: bi.Insecure, } - due, retries := retry(bi.Attributes) - return bn, due, retries, bi.SendEmail + return bn, bi.Attributes, bi.SendEmail } -func importGaugeMeasurement(input interface{}) (interface{}, time.Time, int, bool) { +func importGaugeMeasurement(input interface{}) (interface{}, common.Attributes, bool) { gi := input.(*models.GaugeMeasurementImport) gm := &imports.GaugeMeasurement{ URL: gi.URL, Insecure: gi.Insecure, } - due, retries := retry(gi.Attributes) - return gm, due, retries, gi.SendEmail + return gm, gi.Attributes, gi.SendEmail } -func importFairwayAvailability(input interface{}) (interface{}, time.Time, int, bool) { +func importFairwayAvailability(input interface{}) (interface{}, common.Attributes, bool) { fai := input.(*models.FairwayAvailabilityImport) fa := &imports.FairwayAvailability{ URL: fai.URL, Insecure: fai.Insecure, } - due, retries := retry(fai.Attributes) - return fa, due, retries, fai.SendEmail + return fa, fai.Attributes, fai.SendEmail } -func importWaterwayAxis(input interface{}) (interface{}, time.Time, int, bool) { +func importWaterwayAxis(input interface{}) (interface{}, common.Attributes, bool) { wxi := input.(*models.WaterwayAxisImport) wx := &imports.WaterwayAxis{ URL: wxi.URL, FeatureType: wxi.FeatureType, SortBy: wxi.SortBy, } - due, retries := retry(wxi.Attributes) - return wx, due, retries, wxi.SendEmail + return wx, wxi.Attributes, wxi.SendEmail } -func importWaterwayArea(input interface{}) (interface{}, time.Time, int, bool) { +func importWaterwayArea(input interface{}) (interface{}, common.Attributes, bool) { wai := input.(*models.WaterwayAreaImport) wa := &imports.WaterwayArea{ URL: wai.URL, FeatureType: wai.FeatureType, SortBy: wai.SortBy, } - due, retries := retry(wai.Attributes) - return wa, due, retries, wai.SendEmail + return wa, wai.Attributes, wai.SendEmail } -func importWaterwayGauge(input interface{}) (interface{}, time.Time, int, bool) { +func importWaterwayGauge(input interface{}) (interface{}, common.Attributes, bool) { wgi := input.(*models.WaterwayGaugeImport) username, _ := wgi.Attributes.Get("username") password, _ := wgi.Attributes.Get("password") @@ -98,11 +84,10 @@ Password: password, Insecure: insecure, } - due, retries := retry(wgi.Attributes) - return wg, due, retries, wgi.SendEmail + return wg, wgi.Attributes, wgi.SendEmail } -func importDistancemarksVirtual(input interface{}) (interface{}, time.Time, int, bool) { +func importDistancemarksVirtual(input interface{}) (interface{}, common.Attributes, bool) { dmvi := input.(*models.DistanceMarksVirtualImport) username, _ := dmvi.Attributes.Get("username") password, _ := dmvi.Attributes.Get("password") @@ -113,11 +98,10 @@ Password: password, Insecure: insecure, } - due, retries := retry(dmvi.Attributes) - return wg, due, retries, dmvi.SendEmail + return wg, dmvi.Attributes, dmvi.SendEmail } -func importFairwayDimension(input interface{}) (interface{}, time.Time, int, bool) { +func importFairwayDimension(input interface{}) (interface{}, common.Attributes, bool) { fdi := input.(*models.FairwayDimensionImport) fd := &imports.FairwayDimension{ URL: fdi.URL, @@ -129,22 +113,20 @@ Depth: fdi.Depth, SourceOrganization: fdi.SourceOrganization, } - due, retries := retry(fdi.Attributes) - return fd, due, retries, fdi.SendEmail + return fd, fdi.Attributes, fdi.SendEmail } -func importDistanceMarksAshore(input interface{}) (interface{}, time.Time, int, bool) { +func importDistanceMarksAshore(input interface{}) (interface{}, common.Attributes, bool) { dmai := input.(*models.DistanceMarksAshoreImport) dma := &imports.DistanceMarksAshore{ URL: dmai.URL, FeatureType: dmai.FeatureType, SortBy: dmai.SortBy, } - due, retries := retry(dmai.Attributes) - return dma, due, retries, dmai.SendEmail + return dma, dmai.Attributes, dmai.SendEmail } -func importStretch(input interface{}) (interface{}, time.Time, int, bool) { +func importStretch(input interface{}) (interface{}, common.Attributes, bool) { sti := input.(*models.StretchImport) st := &imports.Stretch{ Name: sti.Name, @@ -156,19 +138,35 @@ Date: sti.Date, Countries: sti.Countries, } - due, retries := retry(sti.Attributes) - return st, due, retries, sti.SendEmail + return st, sti.Attributes, sti.SendEmail +} + +func retry(a common.Attributes) (time.Time, *int, *time.Duration) { + due, _ := a.Time("due") + ret, ok := a.Int("retries") + var retries *int + if ok { + retries = &ret + } + dur, ok := a.Duration("wait-retry") + var duration *time.Duration + if ok { + duration = &dur + } + return due, retries, duration } func manualImport( kind imports.JobKind, - setup func(interface{}) (interface{}, time.Time, int, bool), + setup func(interface{}) (interface{}, common.Attributes, bool), ) func(interface{}, *http.Request, *sql.Conn) (JSONResult, error) { return func(input interface{}, req *http.Request, _ *sql.Conn) ( jr JSONResult, err error) { - what, due, retries, sendEmail := setup(input) + what, attrs, sendEmail := setup(input) + + due, retries, waitRetry := retry(attrs) var serialized string if serialized, err = common.ToJSONString(what); err != nil { @@ -180,7 +178,9 @@ var jobID int64 if jobID, err = imports.AddJob( kind, - due, retries, + due, + retries, + waitRetry, session.User, sendEmail, serialized, diff -r c420add2dec2 -r 352493221fa5 pkg/controllers/srimports.go --- a/pkg/controllers/srimports.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/controllers/srimports.go Thu Jan 24 14:24:39 2019 +0100 @@ -171,18 +171,29 @@ } } - retries := -1 + var retries *int if r := req.FormValue("retries"); r != "" { - var err error - if retries, err = strconv.Atoi(r); err != nil { + if v, err := strconv.Atoi(r); err != nil { log.Printf("error: %v\n", err) - retries = -1 + } else { + retries = &v + } + } + + var waitDuration *time.Duration + if wd := req.FormValue("wait-duration"); wd != "" { + if v, err := time.ParseDuration(wd); err != nil { + log.Printf("error: %v\n", err) + } else { + waitDuration = &v } } jobID, err := imports.AddJob( imports.SRJobKind, - due, retries, + due, + retries, + waitDuration, session.User, sendEmail, serialized) diff -r c420add2dec2 -r 352493221fa5 pkg/imports/agm.go --- a/pkg/imports/agm.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/agm.go Thu Jan 24 14:24:39 2019 +0100 @@ -70,7 +70,7 @@ agmStageDoneDeleteSQL = ` WITH staged AS ( SELECT key - FROM waterway.track_imports + FROM import.track_imports WHERE import_id = $1 AND relation = 'waterway.gauge_measurements'::regclass ), @@ -87,7 +87,7 @@ agmStageDoneSQL = ` UPDATE waterway.gauge_measurements SET staging_done = true WHERE id IN ( - SELECT key FROM waterway.track_imports + SELECT key FROM import.track_imports WHERE import_id = $1 AND relation = 'waterway.gauge_measurements'::regclass)` ) diff -r c420add2dec2 -r 352493221fa5 pkg/imports/bn.go --- a/pkg/imports/bn.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/bn.go Thu Jan 24 14:24:39 2019 +0100 @@ -107,7 +107,7 @@ bnStageDoneSQL = ` UPDATE waterway.bottlenecks SET staging_done = true WHERE id IN ( - SELECT key from waterway.track_imports + SELECT key from import.track_imports WHERE import_id = $1 AND relation = 'waterway.bottlenecks'::regclass)` ) diff -r c420add2dec2 -r 352493221fa5 pkg/imports/config.go --- a/pkg/imports/config.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/config.go Thu Jan 24 14:24:39 2019 +0100 @@ -106,12 +106,12 @@ send_email, cron, url -FROM waterway.import_configuration +FROM import.import_configuration WHERE id = $1` loadConfigAttributesSQL = ` SELECT k, v -FROM waterway.import_configuration_attributes +FROM import.import_configuration_attributes WHERE import_configuration_id = $1` ) diff -r c420add2dec2 -r 352493221fa5 pkg/imports/dmv.go --- a/pkg/imports/dmv.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/dmv.go Thu Jan 24 14:24:39 2019 +0100 @@ -176,7 +176,7 @@ } if dr.Relenc == nil { - feedback.Warn("missing relnec: %s", code) + feedback.Warn("missing relenc: %s", code) ignored++ continue } @@ -203,10 +203,10 @@ } if err = tx.Commit(); err == nil { - feedback.Info("Refreshing distant marks virtual successfully took %s.", + feedback.Info("Refreshing distance marks (virtual) successfully took %s.", time.Since(start)) } else { - feedback.Error("Refreshing distant marks virtual failed after %s.", + feedback.Error("Refreshing distance marks (virtual) failed after %s.", time.Since(start)) } diff -r c420add2dec2 -r 352493221fa5 pkg/imports/fd.go --- a/pkg/imports/fd.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/fd.go Thu Jan 24 14:24:39 2019 +0100 @@ -121,7 +121,7 @@ fdStageDoneSQL = ` UPDATE waterway.fairway_dimensions SET staging_done = true WHERE id IN ( - SELECT key from waterway.track_imports + SELECT key from import.track_imports WHERE import_id = $1 AND relation = 'waterway.fairway_dimensions'::regclass)` @@ -176,7 +176,7 @@ start := time.Now() - feedback.Info("Import fairway dimension") + feedback.Info("Import fairway dimensions") feedback.Info("Loading capabilities from %s", fd.URL) caps, err := wfs.GetCapabilities(fd.URL) @@ -323,7 +323,7 @@ } if outside > 0 { - feedback.Info("Features outside responsibility areas: %d", outside) + feedback.Info("Features outside responsibility area: %d", outside) } if features == 0 { diff -r c420add2dec2 -r 352493221fa5 pkg/imports/queue.go --- a/pkg/imports/queue.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/queue.go Thu Jan 24 14:24:39 2019 +0100 @@ -42,15 +42,6 @@ Error(fmt string, args ...interface{}) } - // RetryError is an error type to signal that - // the import should be tried again. - RetryError struct { - // Message is the error message. - Message string - // When is the new scheduled execution time. - When time.Time - } - // UnchangedError may be issued by Do of a Job to indicate // That the database has not changed. UnchangedError string @@ -104,6 +95,7 @@ id int64 kind JobKind user string + waitRetry pgtype.Interval trysLeft sql.NullInt64 sendEmail bool data string @@ -142,14 +134,15 @@ queueUser = "sys_admin" reEnqueueRunningSQL = ` -UPDATE waterway.imports SET state = 'queued'::waterway.import_state -WHERE state = 'running'::waterway.import_state` +UPDATE import.imports SET state = 'queued'::import_state +WHERE state = 'running'::import_state` insertJobSQL = ` -INSERT INTO waterway.imports ( +INSERT INTO import.imports ( kind, due, trys_left, + retry_wait, username, send_email, data @@ -159,7 +152,8 @@ $3, $4, $5, - $6 + $6, + $7 ) RETURNING id` selectJobSQL = ` @@ -167,37 +161,38 @@ id, kind, trys_left, + retry_wait, username, send_email, data -FROM waterway.imports +FROM import.imports WHERE due <= CURRENT_TIMESTAMP + interval '5 seconds' AND - state = 'queued'::waterway.import_state AND enqueued IN ( + state = 'queued'::import_state AND enqueued IN ( SELECT min(enqueued) - FROM waterway.imports - WHERE state = 'queued'::waterway.import_state AND + FROM import.imports + WHERE state = 'queued'::import_state AND kind = ANY($1)) LIMIT 1` updateStateSQL = ` -UPDATE waterway.imports SET state = $1::waterway.import_state +UPDATE import.imports SET state = $1::import_state WHERE id = $2` updateStateSummarySQL = ` -UPDATE waterway.imports SET - state = $1::waterway.import_state, +UPDATE import.imports SET + state = $1::import_state, summary = $2 WHERE id = $3` logMessageSQL = ` -INSERT INTO waterway.import_logs ( +INSERT INTO import.import_logs ( import_id, kind, msg ) VALUES ( $1, - $2::waterway.log_type, + $2::log_type, $3 )` ) @@ -206,11 +201,6 @@ go iqueue.importLoop() } -// Error makes RetryError an error. -func (re *RetryError) Error() string { - return re.Message -} - // Error makes UnchangedError an error. func (ue UnchangedError) Error() string { return string(ue) @@ -266,11 +256,55 @@ return names } -func (idj *idJob) trys() int { +func (idj *idJob) nextRetry(feedback Feedback) bool { + switch { + case idj.waitRetry.Status != pgtype.Present && !idj.trysLeft.Valid: + return false + case idj.waitRetry.Status == pgtype.Present && !idj.trysLeft.Valid: + return true + case idj.trysLeft.Valid: + if idj.trysLeft.Int64 < 1 { + feedback.Warn("import should be retried, but no retrys left") + } else { + idj.trysLeft.Int64-- + feedback.Info("import failed but will be retried") + return true + } + } + return false +} + +func (idj *idJob) nextDue() time.Time { + now := time.Now() + if idj.waitRetry.Status == pgtype.Present { + var d time.Duration + if err := idj.waitRetry.AssignTo(&d); err != nil { + log.Printf("error: converting waitRetry failed: %v\n", err) + } else { + now = now.Add(d) + } + } + return now +} + +func (idj *idJob) trysLeftPointer() *int { if !idj.trysLeft.Valid { - return -1 + return nil } - return int(idj.trysLeft.Int64) + t := int(idj.trysLeft.Int64) + return &t +} + +func (idj *idJob) waitRetryPointer() *time.Duration { + if idj.waitRetry.Status != pgtype.Present { + return nil + } + d := new(time.Duration) + if err := idj.waitRetry.AssignTo(d); err != nil { + log.Printf("error: converting waitRetry failed: %v\n", err) + return nil + } + return d } func (q *importQueue) jobCreator(kind JobKind) JobCreator { @@ -282,20 +316,33 @@ func (q *importQueue) addJob( kind JobKind, due time.Time, - trysLeft int, + trysLeft *int, + waitRetry *time.Duration, user string, sendEmail bool, data string, ) (int64, error) { - ctx := context.Background() + var id int64 if due.IsZero() { due = time.Now() } + var tl sql.NullInt64 - if trysLeft >= 0 { - tl = sql.NullInt64{Int64: int64(trysLeft), Valid: true} + if trysLeft != nil { + tl = sql.NullInt64{Int64: int64(*trysLeft), Valid: true} } + + var wr pgtype.Interval + if waitRetry != nil { + if err := wr.Set(*waitRetry); err != nil { + return 0, err + } + } else { + wr = pgtype.Interval{Status: pgtype.Null} + } + + ctx := context.Background() err := auth.RunAs(ctx, user, func(conn *sql.Conn) error { return conn.QueryRowContext( ctx, @@ -303,6 +350,7 @@ string(kind), due, tl, + &wr, user, sendEmail, data).Scan(&id) @@ -323,12 +371,20 @@ func AddJob( kind JobKind, due time.Time, - trysLeft int, + trysLeft *int, + waitRetry *time.Duration, user string, sendEmail bool, data string, ) (int64, error) { - return iqueue.addJob(kind, due, trysLeft, user, sendEmail, data) + return iqueue.addJob( + kind, + due, + trysLeft, + waitRetry, + user, + sendEmail, + data) } type logFeedback int64 @@ -413,6 +469,7 @@ &ji.id, &ji.kind, &ji.trysLeft, + &ji.waitRetry, &ji.user, &ji.sendEmail, &ji.data, @@ -555,32 +612,17 @@ }) })() - var retry *RetryError - var unchanged bool - - switch v := errDo.(type) { - case *RetryError: - // NULL -> limit less - if idj.trysLeft.Valid && idj.trysLeft.Int64 <= 1 { - feedback.Warn("import should be retried, but no retrys left") - } else { - if idj.trysLeft.Valid { - idj.trysLeft.Int64-- - } - feedback.Info("import failed but will be retried") - retry = v - } - case UnchangedError: + var unchanged, retry bool + if v, ok := errDo.(UnchangedError); ok { feedback.Info("unchanged: %s", v.Error()) unchanged = true - default: - if errDo != nil { - feedback.Error("error in import: %v", errDo) - } + } else if errDo != nil { + feedback.Error("error in import: %v", errDo) + retry = idj.nextRetry(feedback) } var errCleanup error - if retry == nil { // cleanup debris + if retry { // cleanup debris if errCleanup = survive(job.CleanUp)(); errCleanup != nil { feedback.Error("error cleanup: %v", errCleanup) } @@ -605,10 +647,12 @@ go sendNotificationMail(idj.user, jc.Description(), state, idj.id) } - if retry != nil { + if retry { nid, err := q.addJob( idj.kind, - retry.When, idj.trys(), + idj.nextDue(), + idj.trysLeftPointer(), + idj.waitRetryPointer(), idj.user, idj.sendEmail, idj.data) if err != nil { diff -r c420add2dec2 -r 352493221fa5 pkg/imports/scheduled.go --- a/pkg/imports/scheduled.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/scheduled.go Thu Jan 24 14:24:39 2019 +0100 @@ -19,6 +19,7 @@ "errors" "fmt" "log" + "time" "gemma.intevation.de/gemma/pkg/common" "gemma.intevation.de/gemma/pkg/scheduler" @@ -232,15 +233,24 @@ due, _ := cfg.Attributes.Time("due") - retries, found := cfg.Attributes.Int("retries") - if !found { - retries = -1 + ret, found := cfg.Attributes.Int("retries") + var retries *int + if found { + retries = &ret + } + + dur, found := cfg.Attributes.Duration("wait-retry") + var waitRetry *time.Duration + if found { + waitRetry = &dur } var jobID int64 if jobID, err = AddJob( kind, - due, retries, + due, + retries, + waitRetry, cfg.User, cfg.SendEMail, serialized, diff -r c420add2dec2 -r 352493221fa5 pkg/imports/sr.go --- a/pkg/imports/sr.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/sr.go Thu Jan 24 14:24:39 2019 +0100 @@ -106,7 +106,7 @@ srStageDoneSQL = ` UPDATE waterway.sounding_results SET staging_done = true WHERE id = ( - SELECT key from waterway.track_imports + SELECT key from import.track_imports WHERE import_id = $1 AND relation = 'waterway.sounding_results'::regclass)` diff -r c420add2dec2 -r 352493221fa5 pkg/imports/st.go --- a/pkg/imports/st.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/st.go Thu Jan 24 14:24:39 2019 +0100 @@ -67,7 +67,7 @@ SELECT name FROM waterway.stretches WHERE id = ( - SELECT key from waterway.track_imports + SELECT key from import.track_imports WHERE import_id = $1 AND relation = 'waterway.stretches'::regclass) AND NOT staging_done @@ -76,7 +76,7 @@ stStageDoneSQL = ` UPDATE waterway.stretches SET staging_done = true WHERE id IN ( - SELECT key from waterway.track_imports + SELECT key from import.track_imports WHERE import_id = $1 AND relation = 'waterway.stretches'::regclass)` diff -r c420add2dec2 -r 352493221fa5 pkg/imports/track.go --- a/pkg/imports/track.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/imports/track.go Thu Jan 24 14:24:39 2019 +0100 @@ -20,7 +20,7 @@ const ( trackImportSQL = ` - INSERT INTO waterway.track_imports (import_id, relation, key) + INSERT INTO import.track_imports (import_id, relation, key) VALUES ($1, $2::regclass, $3)` ) diff -r c420add2dec2 -r 352493221fa5 pkg/scheduler/boot.go --- a/pkg/scheduler/boot.go Thu Jan 24 14:24:00 2019 +0100 +++ b/pkg/scheduler/boot.go Thu Jan 24 14:24:39 2019 +0100 @@ -27,11 +27,11 @@ selectImportConfSQL = ` SELECT id, username, cron -FROM waterway.import_configuration +FROM import.import_configuration WHERE cron IS NOT NULL` scheduledIDsSQL = ` -SELECT id from waterway.import_configuration +SELECT id from import.import_configuration WHERE username = $1 AND cron IS NOT NULL` ) diff -r c420add2dec2 -r 352493221fa5 schema/auth.sql --- a/schema/auth.sql Thu Jan 24 14:24:00 2019 +0100 +++ b/schema/auth.sql Thu Jan 24 14:24:39 2019 +0100 @@ -42,6 +42,17 @@ GRANT INSERT, UPDATE, DELETE ON users.templates, users.user_templates TO waterway_admin; +GRANT USAGE ON SCHEMA import TO waterway_admin; +GRANT SELECT, INSERT ON ALL TABLES IN SCHEMA import TO waterway_admin; +GRANT UPDATE ON + import.imports, import.import_configuration, + import.import_configuration_attributes + TO waterway_admin; +GRANT DELETE ON + import.track_imports, import.import_configuration, + import.import_configuration_attributes + TO waterway_admin; + -- -- Extended privileges for sys_admin -- @@ -133,22 +144,22 @@ -- RLS policies for imports and import config -- -CREATE POLICY same_country ON waterway.imports +CREATE POLICY same_country ON import.imports FOR ALL TO waterway_admin USING (users.current_user_country() = ( SELECT country FROM users.list_users lu WHERE lu.username = imports.username)); -ALTER table waterway.imports ENABLE ROW LEVEL SECURITY; +ALTER table import.imports ENABLE ROW LEVEL SECURITY; -- The job running the import queue is running as sys_admin and login users -- with that role should be able to run imports without restrictions anyhow -CREATE POLICY import_all ON waterway.imports +CREATE POLICY import_all ON import.imports FOR ALL TO sys_admin USING (true); -- For the given table, check whether the given value is used as primary key, -- bypassing row level security. -CREATE OR REPLACE FUNCTION waterway.is_new_key( +CREATE OR REPLACE FUNCTION import.is_new_key( tablename varchar, kv anyelement) RETURNS boolean @@ -160,7 +171,7 @@ FROM information_schema.key_column_usage k JOIN information_schema.table_constraints USING (constraint_name) WHERE k.table_name = tablename and constraint_type = 'PRIMARY KEY'); - EXECUTE format('SELECT NOT $1 = ANY(SELECT %I FROM waterway.%I)', + EXECUTE format('SELECT NOT $1 = ANY(SELECT %I FROM import.%I)', columnname, tablename) INTO ret USING kv; @@ -171,41 +182,41 @@ SECURITY DEFINER STABLE PARALLEL SAFE; -CREATE POLICY parent_allowed ON waterway.import_logs +CREATE POLICY parent_allowed ON import.import_logs FOR ALL TO waterway_admin - USING (import_id IN (SELECT id FROM waterway.imports)) - WITH CHECK (waterway.is_new_key('imports', import_id) - OR import_id IN (SELECT id FROM waterway.imports)); -ALTER table waterway.import_logs ENABLE ROW LEVEL SECURITY; + USING (import_id IN (SELECT id FROM import.imports)) + WITH CHECK (import.is_new_key('imports', import_id) + OR import_id IN (SELECT id FROM import.imports)); +ALTER table import.import_logs ENABLE ROW LEVEL SECURITY; -CREATE POLICY parent_allowed ON waterway.track_imports +CREATE POLICY parent_allowed ON import.track_imports FOR ALL TO waterway_admin - USING (import_id IN (SELECT id FROM waterway.imports)) - WITH CHECK (waterway.is_new_key('imports', import_id) - OR import_id IN (SELECT id FROM waterway.imports)); -ALTER table waterway.track_imports ENABLE ROW LEVEL SECURITY; + USING (import_id IN (SELECT id FROM import.imports)) + WITH CHECK (import.is_new_key('imports', import_id) + OR import_id IN (SELECT id FROM import.imports)); +ALTER table import.track_imports ENABLE ROW LEVEL SECURITY; -CREATE POLICY import_configuration_policy ON waterway.import_configuration +CREATE POLICY import_configuration_policy ON import.import_configuration FOR ALL TO waterway_admin USING ( users.current_user_country() = ( SELECT country FROM users.list_users lu - WHERE lu.username = waterway.import_configuration.username)); + WHERE lu.username = import.import_configuration.username)); -CREATE POLICY import_configuration_policy_sys_admin ON waterway.import_configuration +CREATE POLICY import_configuration_policy_sys_admin ON import.import_configuration FOR ALL TO sys_admin USING (true); -ALTER table waterway.import_configuration ENABLE ROW LEVEL SECURITY; +ALTER table import.import_configuration ENABLE ROW LEVEL SECURITY; -CREATE POLICY parent_allowed ON waterway.import_configuration_attributes +CREATE POLICY parent_allowed ON import.import_configuration_attributes FOR ALL TO waterway_admin USING (import_configuration_id IN ( - SELECT id FROM waterway.import_configuration)) + SELECT id FROM import.import_configuration)) WITH CHECK ( - waterway.is_new_key('import_configuration', import_configuration_id) + import.is_new_key('import_configuration', import_configuration_id) OR import_configuration_id IN ( - SELECT id FROM waterway.import_configuration)); -ALTER table waterway.import_configuration_attributes ENABLE ROW LEVEL SECURITY; + SELECT id FROM import.import_configuration)); +ALTER table import.import_configuration_attributes ENABLE ROW LEVEL SECURITY; COMMIT; diff -r c420add2dec2 -r 352493221fa5 schema/auth_tests.sql --- a/schema/auth_tests.sql Thu Jan 24 14:24:00 2019 +0100 +++ b/schema/auth_tests.sql Thu Jan 24 14:24:39 2019 +0100 @@ -126,12 +126,12 @@ SELECT lives_ok($$ WITH job AS ( - INSERT INTO waterway.imports (kind, username, data) VALUES ( + INSERT INTO import.imports (kind, username, data) VALUES ( 'test', current_user, 'test') RETURNING id), log AS ( - INSERT INTO waterway.import_logs (import_id, msg) + INSERT INTO import.import_logs (import_id, msg) SELECT id, 'test' FROM job) - INSERT INTO waterway.track_imports + INSERT INTO import.track_imports SELECT id, 'waterway.bottlenecks', 0 FROM job $$, 'Waterway admin can add import job and related data'); @@ -142,10 +142,10 @@ $$, $$ WITH job AS ( - UPDATE waterway.imports SET state = 'accepted' + UPDATE import.imports SET state = 'accepted' RETURNING id, username), log AS ( - INSERT INTO waterway.import_logs (import_id, msg) + INSERT INTO import.import_logs (import_id, msg) SELECT id, 'test continued' FROM job) SELECT username FROM job $$, @@ -154,9 +154,9 @@ SELECT lives_ok($$ WITH config AS ( - INSERT INTO waterway.import_configuration (kind, username) VALUES ( + INSERT INTO import.import_configuration (kind, username) VALUES ( 'test', current_user) RETURNING id) - INSERT INTO waterway.import_configuration_attributes + INSERT INTO import.import_configuration_attributes SELECT id, 'test key', 'test value' FROM config $$, 'Waterway admin can add import config and related data'); @@ -167,13 +167,13 @@ $$, $$ WITH config AS ( - UPDATE waterway.import_configuration SET send_email = true + UPDATE import.import_configuration SET send_email = true RETURNING id, username), attrib AS ( - INSERT INTO waterway.import_configuration_attributes + INSERT INTO import.import_configuration_attributes SELECT id, 'test continued', 'test value' FROM config), attrib_upd AS ( - UPDATE waterway.import_configuration_attributes SET v = 'test v' + UPDATE import.import_configuration_attributes SET v = 'test v' WHERE import_configuration_id = (SELECT id FROM config)) SELECT username FROM config $$, @@ -181,34 +181,34 @@ SET SESSION AUTHORIZATION test_admin_ro; SELECT throws_ok($$ - INSERT INTO waterway.import_logs (import_id, msg) - VALUES (currval(pg_get_serial_sequence('waterway.imports', 'id')), + INSERT INTO import.import_logs (import_id, msg) + VALUES (currval(pg_get_serial_sequence('import.imports', 'id')), 'test') $$, 42501, NULL, 'Waterway admin cannot add log messages to other countries imports'); SELECT throws_ok($$ - DELETE FROM waterway.track_imports + DELETE FROM import.track_imports WHERE import_id = currval( - pg_get_serial_sequence('waterway.imports', 'id')) + pg_get_serial_sequence('import.imports', 'id')) $$, 42501, NULL, 'Waterway admin cannot delete tracking data of other countries imports'); SELECT throws_ok($$ - INSERT INTO waterway.import_configuration_attributes + INSERT INTO import.import_configuration_attributes VALUES (currval(pg_get_serial_sequence( - 'waterway.import_configuration', 'id')), + 'import.import_configuration', 'id')), 'test', 'test value') $$, 42501, NULL, 'Waterway admin cannot add attributes to other countries import config'); SELECT throws_ok($$ - UPDATE waterway.import_configuration_attributes SET v = 'evil' + UPDATE import.import_configuration_attributes SET v = 'evil' WHERE import_configuration_id = currval( - pg_get_serial_sequence('waterway.import_configuration', 'id')) + pg_get_serial_sequence('import.import_configuration', 'id')) $$, 42501, NULL, 'Waterway admin cannot overwrite attributes of other countries config'); diff -r c420add2dec2 -r 352493221fa5 schema/gemma.sql --- a/schema/gemma.sql Thu Jan 24 14:24:00 2019 +0100 +++ b/schema/gemma.sql Thu Jan 24 14:24:39 2019 +0100 @@ -175,6 +175,7 @@ CREATE TABLE responsibility_areas ( country char(2) PRIMARY KEY REFERENCES countries, area geography(MULTIPOLYGON, 4326) + CHECK(ST_IsValid(CAST(area AS geometry))) ) CREATE TABLE templates ( @@ -230,7 +231,8 @@ CREATE TABLE waterway_area ( id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - area geography(POLYGON, 4326) NOT NULL, + area geography(POLYGON, 4326) NOT NULL + CHECK(ST_IsValid(CAST(area AS geometry))), catccl smallint REFERENCES catccls, dirimp smallint REFERENCES dirimps ) @@ -294,7 +296,8 @@ CREATE TABLE waterway_axis ( id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - wtwaxs geography(LINESTRING, 4326) NOT NULL, + wtwaxs geography(LINESTRING, 4326) NOT NULL + CHECK(ST_IsSimple(CAST(wtwaxs AS geometry))), -- TODO: Do we need to check data set quality (DRC 2.1.6)? objnam varchar NOT NULL, nobjnam varchar @@ -351,7 +354,8 @@ id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, name varchar NOT NULL, stretch isrsrange NOT NULL, - area geography(MULTIPOLYGON, 4326) NOT NULL, + area geography(MULTIPOLYGON, 4326) NOT NULL + CHECK(ST_IsValid(CAST(area AS geometry))), objnam varchar NOT NULL, nobjnam varchar, date_info timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, @@ -412,7 +416,8 @@ CREATE TABLE fairway_dimensions ( id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - area geography(POLYGON, 4326) NOT NULL, + area geography(POLYGON, 4326) NOT NULL + CHECK(ST_IsValid(CAST(area AS geometry))), level_of_service smallint NOT NULL REFERENCES levels_of_service, min_width smallint NOT NULL, max_width smallint NOT NULL, @@ -439,7 +444,8 @@ objnam varchar, nobjnm varchar, stretch isrsrange NOT NULL, - area geography(MULTIPOLYGON, 4326) NOT NULL, + area geography(MULTIPOLYGON, 4326) NOT NULL + CHECK(ST_IsValid(CAST(area AS geometry))), rb char(2) NOT NULL REFERENCES countries, -- from rb_lb in interface lb char(2) NOT NULL REFERENCES countries, -- from rb_lb in interface responsible_country char(2) NOT NULL REFERENCES countries, @@ -494,11 +500,13 @@ bottleneck_id int NOT NULL REFERENCES bottlenecks(id), date_info date NOT NULL, UNIQUE (bottleneck_id, date_info), - area geography(POLYGON, 4326) NOT NULL, + area geography(POLYGON, 4326) NOT NULL + CHECK(ST_IsValid(CAST(area AS geometry))), surtyp varchar REFERENCES survey_types, coverage varchar REFERENCES coverage_types, depth_reference char(3) NOT NULL REFERENCES depth_references, - point_cloud geography(MULTIPOINTZ, 4326) NOT NULL, + point_cloud geography(MULTIPOINTZ, 4326) NOT NULL + CHECK(ST_IsSimple(CAST(point_cloud AS geometry))), octree_checksum varchar, octree_index bytea, staging_done boolean NOT NULL DEFAULT false @@ -509,6 +517,8 @@ ON DELETE CASCADE, height numeric NOT NULL, lines geography(multilinestring, 4326) NOT NULL, + -- TODO: generate valid simple features and add constraint: + -- CHECK(ST_IsSimple(CAST(lines AS geometry))), PRIMARY KEY (sounding_result_id, height) ) -- A view to help geoserver serve contour lines. @@ -592,6 +602,27 @@ SELECT bottleneck_id, max(date_info) AS current FROM sounding_results GROUP BY bottleneck_id) sr ON sr.bottleneck_id = bn.id ORDER BY objnam +; + +-- Configure primary keys for geoserver views +INSERT INTO waterway.gt_pk_metadata VALUES ('waterway', + 'distance_marks_geoserver', + 'location_code'); + +-- +-- Import queue and respective logging +-- +CREATE TYPE import_state AS ENUM ( + 'queued', + 'running', + 'failed', 'unchanged', 'pending', + 'accepted', 'declined' +); + +CREATE TYPE log_type AS ENUM ('info', 'warn', 'error'); + +-- Namespace for import queue and respective logging +CREATE SCHEMA import CREATE TABLE import_configuration ( id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, @@ -614,69 +645,56 @@ v TEXT NOT NULL, UNIQUE (import_configuration_id, k) ) + + CREATE TABLE imports ( + id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, + state import_state NOT NULL DEFAULT 'queued', + kind varchar NOT NULL, + enqueued timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + due timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + retry_wait interval + CHECK(retry_wait IS NULL + OR retry_wait >= interval '0 microseconds'), + trys_left int, -- if NULL and retry_wait NOT NULL, endless + username varchar NOT NULL + REFERENCES internal.user_profiles(username) + ON DELETE CASCADE + ON UPDATE CASCADE, + signer varchar + REFERENCES internal.user_profiles(username) + ON DELETE SET NULL + ON UPDATE CASCADE, + send_email boolean NOT NULL DEFAULT false, + data TEXT, + summary TEXT + ) + + CREATE INDEX enqueued_idx ON imports(enqueued, state) + + CREATE TABLE import_logs ( + import_id int NOT NULL REFERENCES imports(id) + ON DELETE CASCADE, + time timestamp NOT NULL DEFAULT now(), + kind log_type NOT NULL DEFAULT 'info', + msg TEXT NOT NULL + ) + + CREATE TABLE track_imports ( + import_id int NOT NULL REFERENCES imports(id) + ON DELETE CASCADE, + relation regclass NOT NULL, + key int NOT NULL, + UNIQUE (relation, key) + ) ; --- Configure primary keys for geoserver views -INSERT INTO waterway.gt_pk_metadata VALUES ('waterway', - 'distance_marks_geoserver', - 'location_code'); - - --- --- Import queue and respective logging --- -CREATE TYPE waterway.import_state AS ENUM ( - 'queued', - 'running', - 'failed', 'unchanged', 'pending', - 'accepted', 'declined' -); - -CREATE TABLE waterway.imports ( - id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - state waterway.import_state NOT NULL DEFAULT 'queued', - kind varchar NOT NULL, - enqueued timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - due timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - trys_left int, - username varchar NOT NULL - REFERENCES internal.user_profiles(username) - ON DELETE CASCADE - ON UPDATE CASCADE, - signer varchar - REFERENCES internal.user_profiles(username) - ON DELETE SET NULL - ON UPDATE CASCADE, - send_email boolean NOT NULL DEFAULT false, - data TEXT, - summary TEXT -); - -CREATE INDEX enqueued_idx ON waterway.imports(enqueued, state); - -CREATE TYPE waterway.log_type AS ENUM ('info', 'warn', 'error'); - -CREATE TABLE waterway.import_logs ( - import_id int NOT NULL REFERENCES waterway.imports(id) ON DELETE CASCADE, - time timestamp NOT NULL DEFAULT now(), - kind waterway.log_type NOT NULL DEFAULT 'info', - msg TEXT NOT NULL -); - -CREATE TABLE waterway.track_imports ( - import_id int NOT NULL REFERENCES waterway.imports(id) ON DELETE CASCADE, - relation regclass NOT NULL, - key int NOT NULL, - UNIQUE (relation, key) -); - -CREATE FUNCTION waterway.del_import(imp_id int) RETURNS void AS +CREATE FUNCTION import.del_import(imp_id int) RETURNS void AS $$ DECLARE tmp RECORD; BEGIN FOR tmp IN - SELECT * FROM waterway.track_imports WHERE import_id = imp_id + SELECT * FROM import.track_imports WHERE import_id = imp_id LOOP EXECUTE format('DELETE FROM %s WHERE id = $1', tmp.relation) USING tmp.key; END LOOP; @@ -684,7 +702,7 @@ $$ LANGUAGE plpgsql; -CREATE FUNCTION waterway.del_import() RETURNS trigger AS +CREATE FUNCTION import.del_import() RETURNS trigger AS $$ BEGIN EXECUTE format('DELETE FROM %s WHERE id = $1', OLD.relation) USING OLD.key; diff -r c420add2dec2 -r 352493221fa5 schema/tap_tests_data.sql --- a/schema/tap_tests_data.sql Thu Jan 24 14:24:00 2019 +0100 +++ b/schema/tap_tests_data.sql Thu Jan 24 14:24:39 2019 +0100 @@ -95,17 +95,17 @@ WITH job AS ( - INSERT INTO waterway.imports (kind, username, data) VALUES ( + INSERT INTO import.imports (kind, username, data) VALUES ( 'test', 'test_admin_ro', 'test') RETURNING id), log AS ( - INSERT INTO waterway.import_logs (import_id, msg) + INSERT INTO import.import_logs (import_id, msg) SELECT id, 'test' FROM job) -INSERT INTO waterway.track_imports +INSERT INTO import.track_imports SELECT id, 'waterway.bottlenecks', 1 FROM job; WITH config AS ( - INSERT INTO waterway.import_configuration (kind, username) VALUES ( + INSERT INTO import.import_configuration (kind, username) VALUES ( 'test', 'test_admin_ro') RETURNING id) -INSERT INTO waterway.import_configuration_attributes +INSERT INTO import.import_configuration_attributes SELECT id, 'test key', 'test value' FROM config;