annotate client/src/components/importconfiguration/ScheduledImports.vue @ 4231:6f31a99cd92d

clinet: fix translations process and update source strings * move strings for translations from *.po files to the component itself to let gettext() mark only the strings without the html elements. (make makemessages complains to have html elements in the .po files and stops the process).
author Fadi Abbud <fadi.abbud@intevation.de>
date Wed, 21 Aug 2019 11:13:12 +0200
parents 03e8e6cc0b79
children 3759b47f20f3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
2 <form @submit.prevent="save" class="w-100">
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
3 <div class="d-flex px-2">
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
4 <div :key="1" class="flex-column">
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
5 <small class="text-muted">
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
6 <translate>Email Notification</translate>
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
7 </small>
3001
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
8 <div class="flex-flex-row text-left">
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
9 <toggle-button
3427
489e583498e3 client: import config: fixed toggle buttons
Markus Kottlaender <markus@intevation.de>
parents: 3281
diff changeset
10 :value="eMailNotification"
3001
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
11 v-model="eMailNotification"
3427
489e583498e3 client: import config: fixed toggle buttons
Markus Kottlaender <markus@intevation.de>
parents: 3281
diff changeset
12 :sync="true"
3001
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
13 class="mt-2"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
14 :speed="100"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
15 :labels="{
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
16 checked: this.$options.on,
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
17 unchecked: this.$options.off
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
18 }"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
19 :width="60"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
20 :height="30"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
21 />
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
22 </div>
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
23 </div>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
24 <div
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
25 :key="2"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
26 v-if="directImportAvailable"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
27 class="flex-column text-left ml-3"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
28 >
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
29 <small class="text-muted">
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
30 <translate>Import via</translate>
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
31 </small>
3001
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
32 <div>
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
33 <!-- '#75c791' is the DEFAULT_COLOR_CHECKED
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
34 from vue-js-toggle-button as here both states are active -->
3001
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
35 <toggle-button
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
36 :color="{ unchecked: '#75c791' }"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
37 v-model="directImport"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
38 class="mt-2"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
39 :speed="100"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
40 :labels="{
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
41 checked: this.$options.FILE,
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
42 unchecked: this.$options.URL
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
43 }"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
44 :width="60"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
45 :height="30"
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
46 />
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
47 </div>
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
48 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
49 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
50 <Availablefairwaydepth
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
51 v-if="
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
52 import_ == $options.IMPORTTYPES.FAIRWAYAVAILABILITY && !directImport
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
53 "
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
54 @urlChanged="setUrl"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
55 :url="url"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
56 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
57 <Bottleneck
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
58 v-if="import_ == $options.IMPORTTYPES.BOTTLENECK"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
59 @urlChanged="setUrl"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
60 @toleranceChanged="setTolerance"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
61 :url="url"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
62 :tolerance="tolerance"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
63 :directImport="directImport"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
64 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
65 <Distancemarksvirtual
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
66 v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSVIRTUAL"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
67 @urlChanged="setUrl"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
68 @usernameChanged="setUsername"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
69 @passwordChanged="setPassword"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
70 :url="url"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
71 :username="username"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72 :password="password"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
73 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
74 <Distancemarksashore
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
75 v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSASHORE"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
76 @urlChanged="setUrl"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
77 @featureTypeChanged="setFeatureType"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
78 @sortByChanged="setSortBy"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
79 :url="url"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
80 :featureType="featureType"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
81 :sortBy="sortBy"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
82 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
83 <Faiwaydimensions
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
84 v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSION"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
85 @urlChanged="setUrl"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
86 @featureTypeChanged="setFeatureType"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
87 @sortByChanged="setSortBy"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
88 @LOSChanged="setLOS"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
89 @depthChanged="setDepth"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
90 @minWidthChanged="setMinWidth"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
91 @maxWidthChanged="setMaxWidth"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
92 @sourceOrganizationChanged="setSourceOrganization"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
93 :url="url"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
94 :featureType="featureType"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
95 :sortBy="sortBy"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
96 :LOS="LOS"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
97 :minWidth="minWidth"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
98 :maxWidth="maxWidth"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
99 :sourceOrganization="sourceOrganization"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
100 :depth="depth"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
101 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
102 <Gaugemeasurement
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
103 v-if="import_ == $options.IMPORTTYPES.GAUGEMEASUREMENT && !directImport"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
104 @urlChanged="setUrl"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
105 :url="url"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
106 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
107 <Waterwayarea
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
108 v-if="import_ == $options.IMPORTTYPES.WATERWAYAREA"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
109 @urlChanged="setUrl"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
110 @featureTypeChanged="setFeatureType"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
111 @sortByChanged="setSortBy"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
112 :url="url"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
113 :featureType="featureType"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
114 :sortBy="sortBy"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
115 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
116 <Waterwaygauges
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
117 v-if="import_ == $options.IMPORTTYPES.WATERWAYGAUGES"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
118 @urlChanged="setUrl"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
119 @usernameChanged="setUsername"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
120 @passwordChanged="setPassword"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
121 :url="url"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
122 :username="username"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
123 :password="password"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
124 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
125 <Waterwayaxis
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
126 v-if="import_ == $options.IMPORTTYPES.WATERWAYAXIS"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
127 @urlChanged="setUrl"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
128 @featureTypeChanged="setFeatureType"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
129 @sortByChanged="setSortBy"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
130 :url="url"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
131 :featureType="featureType"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
132 :sortBy="sortBy"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
133 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
134
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
135 <template v-if="!directImport || !directImportAvailable">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
136 <div class="d-flex p-2">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
137 <div class="flex-column w-50">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
138 <div class="d-flex flex-row">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
139 <div class="flex-column mr-4">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
140 <div class="flex-row text-left">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
141 <small class="text-muted">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
142 <translate>Scheduled</translate>?
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
143 </small>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
144 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
145 <div class="flex-row text-left">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
146 <toggle-button
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
147 :value="scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
148 v-model="scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
149 :sync="true"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
150 class="mt-2"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
151 :speed="100"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
152 :labels="{
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
153 checked: this.$options.on,
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
154 unchecked: this.$options.off
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
155 }"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
156 :width="60"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
157 :height="30"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
158 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
159 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
160 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
161 <div class="flex-column mr-2">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
162 <div class="flex-row text-left">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
163 <small class="text-muted">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
164 <translate>Simple</translate>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
165 </small>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
166 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
167 <div class="flex-flex-row text-left">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
168 <toggle-button
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
169 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
170 :value="easyCron"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
171 v-model="easyCron"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
172 :sync="true"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
173 class="mt-2"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
174 :speed="100"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
175 :labels="{
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
176 checked: this.$options.on,
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
177 unchecked: this.$options.off
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
178 }"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
179 :width="60"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
180 :height="30"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
181 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
182 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
183 </div>
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
184 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
185 </div>
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
186 <div class="flex-column ml-2">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
187 <div class="ml-auto flex-column">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
188 <div class="flex-row text-left">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
189 <small class="text-muted">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
190 <translate>Retry on failure</translate>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
191 </small>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
192 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
193 <div class="flex-row text-left">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
194 <toggle-button
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
195 :value="retry"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
196 v-model="retry"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
197 :sync="true"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
198 class="mt-2"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
199 :speed="100"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
200 :labels="{
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
201 checked: this.$options.on,
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
202 unchecked: this.$options.off
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
203 }"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
204 v-tooltip.bottom="ttRetry"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
205 :width="60"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
206 :height="30"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
207 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
208 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
209 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
210 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
211 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
212 </template>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
213 <template v-if="!directImport || !directImportAvailable">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
214 <div class="d-flex flex-row">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
215 <div class="flex-column w-50 px-2 pb-3">
2998
adc8e9ccf706 imports: add tries and wait-retry to client
Thomas Junk <thomas.junk@intevation.de>
parents: 2994
diff changeset
216 <div class="flex-row text-left">
adc8e9ccf706 imports: add tries and wait-retry to client
Thomas Junk <thomas.junk@intevation.de>
parents: 2994
diff changeset
217 <small class="text-muted">
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
218 <translate>Schedule</translate>
2998
adc8e9ccf706 imports: add tries and wait-retry to client
Thomas Junk <thomas.junk@intevation.de>
parents: 2994
diff changeset
219 </small>
adc8e9ccf706 imports: add tries and wait-retry to client
Thomas Junk <thomas.junk@intevation.de>
parents: 2994
diff changeset
220 </div>
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
221 <div v-if="easyCron" class="text-left w-100">
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
222 <select
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
223 :disabled="!scheduled"
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
224 v-model="simple"
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
225 class="form-control form-control-sm"
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
226 >
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
227 <option value="weekly"><translate>Weekly</translate></option>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
228 <option value="monthly"><translate>Monthly</translate> </option>
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
229 </select>
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
230 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
231 <div v-if="!easyCron" class="text-left w-100">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
232 <div class="d-flex flex-row">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
233 <div class="my-auto mr-2">{{ $options.EVERY }}</div>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
234 <select
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
235 :disabled="!scheduled"
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
236 style="width: 130px;"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
237 v-model="cronMode"
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
238 class="form-control form-control-sm"
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
239 @change="clearInputs"
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
240 >
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
241 <option :value="null"></option>
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
242 <option
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
243 v-for="(option, key) in $options.CRONMODE"
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
244 :value="key"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
245 :key="key"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
246 >{{ option }}</option
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
247 >
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
248 </select>
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
249 <div v-if="cronMode == 'hour'" class="ml-1 d-flex flex-row">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
250 <div class="mt-auto mb-auto">{{ $options.ON }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
251 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
252 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
253 v-model="minutes"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
254 class="cronfield ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
255 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
256 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
257 <div class="mt-auto mb-auto">{{ $options.MINUTESPAST }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
258 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
259 <div v-if="cronMode == 'day'" class="ml-1 d-flex flex-row">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
260 <div class="mt-auto mb-auto">{{ $options.AT }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
261 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
262 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
263 v-model="hour"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
264 class="cronfield ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
265 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
266 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
267 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
268 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
269 v-model="minutes"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
270 class="cronfield ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
271 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
272 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
273 <div class="mt-auto mb-auto">{{ $options.OCLOCK }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
274 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
275 <div v-if="cronMode == 'week'" class="ml-1 d-flex flex-row">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
276 <div class="ml-1 mr-1 mt-auto mb-auto">{{ $options.ON }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
277 <select
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
278 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
279 v-model="day"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
280 class="form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
281 >
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
282 <option
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
283 v-for="(option, key) in $options.DAYSOFWEEK"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
284 :key="key"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
285 :value="key"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
286 >{{ option }}</option
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
287 >
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
288 </select>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
289 <div class="ml-1 mt-auto mb-auto">{{ $options.AT }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
290 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
291 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
292 v-model="hour"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
293 class="cronfield ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
294 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
295 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
296 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
297 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
298 v-model="minutes"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
299 class="cronfield ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
300 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
301 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
302 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
303 <div v-if="cronMode == 'month'" class="ml-1 d-flex flex-row">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
304 <div class="ml-1 mt-auto mb-auto">{{ $options.ON }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
305 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
306 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
307 v-model="dayOfMonth"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
308 class="cronfield ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
309 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
310 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
311 <div class="mt-auto mb-auto">{{ $options.AT }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
312 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
313 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
314 v-model="hour"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
315 class="cronfield ml-1 mr-2 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
316 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
317 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
318 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
319 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
320 v-model="minutes"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
321 class="cronfield ml-1 mr-2 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
322 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
323 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
324 <div class="mt-auto mb-auto">{{ $options.OCLOCK }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
325 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
326 <div v-if="cronMode == 'year'" class="ml-1 d-flex flex-row">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
327 <div class="ml-1 mt-auto mb-auto">{{ $options.ON }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
328 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
329 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
330 v-model="dayOfMonth"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
331 class="cronfield ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
332 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
333 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
334 <div class="mt-auto mb-auto">{{ $options.OF }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
335 <select
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
336 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
337 v-model="month"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
338 class="ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
339 >
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
340 <option
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
341 v-for="(option, key) in $options.MONTHS"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
342 :value="key"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
343 :key="key"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
344 >{{ option }}</option
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
345 >
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
346 </select>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
347 <div class="mt-auto mb-auto">{{ $options.ON }}</div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
348 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
349 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
350 v-model="hour"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
351 class="cronfield ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
352 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
353 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
354 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
355 :disabled="!scheduled"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
356 v-model="minutes"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
357 class="cronfield ml-1 mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
358 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
359 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
360 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
361 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
362 <div class="mt-3 w-50 d-flex">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
363 <div class="my-auto mr-2">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
364 <translate>Cronstring</translate>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
365 </div>
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
366 <input
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
367 :disabled="!scheduled"
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
368 class="form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
369 v-model="cronString"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
370 type="text"
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
371 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
372 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
373 </div>
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
374 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
375 <div class="d-flex flex-column ml-2">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
376 <div class="d-flex flex-row ">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
377 <div class="ml-1 flex-column">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
378 <div class="flex-row text-left">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
379 <small class="text-muted">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
380 <translate>Tries</translate>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
381 </small>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
382 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
383 <div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
384 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
385 :disabled="!retry"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
386 style="width:120px;"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
387 v-model="trys"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
388 class="mr-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
389 v-tooltip.bottom="ttRetries"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
390 type="number"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
391 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
392 </div>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
393 </div>
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
394 <div class="flex-column">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
395 <div class="flex-row text-left">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
396 <small class="text-muted">
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
397 <translate>Wait to retry</translate>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
398 </small>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
399 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
400 <div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
401 <input
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
402 :disabled="!retry"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
403 style="width:120px;"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
404 v-model="waitRetry"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
405 v-tooltip.bottom="ttWaitRetry"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
406 class="ml-1 form-control form-control-sm"
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
407 />
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
408 </div>
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
409 </div>
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
410 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
411 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
412 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
413 </template>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
414 <div v-else class="d-flex text-left px-2 pb-3">
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
415 <div class="flex-column w-100">
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
416 <div class="custom-file">
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
417 <input
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
418 accept=".xml"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
419 type="file"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
420 @change="fileSelected"
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
421 class="custom-file-input custom-file-input-sm"
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
422 id="uploadFile"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
423 />
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
424 <label class="pointer custom-file-label" for="uploadFile">
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
425 {{ uploadLabel }}
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
426 </label>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
427 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
428 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
429 </div>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
430 <div class="d-flex justify-content-between p-2 border-top">
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
431 <button :key="1" @click="back()" class="btn btn-sm btn-warning">
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
432 Back
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
433 </button>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
434 <div>
3697
9ef98342ffe7 client: import configuration: re-enabled 'Trigger import' button
Markus Kottlaender <markus@intevation.de>
parents: 3672
diff changeset
435 <button
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
436 @click="triggerManualImport"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
437 type="button"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
438 class="btn btn-sm btn-outline-info"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
439 :disabled="!triggerActive || !isValid"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
440 >
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
441 <font-awesome-icon fixed-width icon="play" />
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
442 <translate>Trigger import</translate>
3697
9ef98342ffe7 client: import configuration: re-enabled 'Trigger import' button
Markus Kottlaender <markus@intevation.de>
parents: 3672
diff changeset
443 </button>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
444 <button
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
445 v-if="!directImport || !directImportAvailable"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
446 :disabled="!isValid"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
447 type="submit"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
448 class="btn btn-sm btn-info ml-3"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
449 >
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
450 <translate>Save</translate>
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
451 </button>
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3001
diff changeset
452 </div>
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
453 </div>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
454 </form>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
455 </template>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
456
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
457 <script>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
458 /* This is Free Software under GNU Affero General Public License v >= 3.0
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
459 * without warranty, see README.md and license for details.
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
460 *
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
461 * SPDX-License-Identifier: AGPL-3.0-or-later
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
462 * License-Filename: LICENSES/AGPL-3.0.txt
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
463 *
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
464 * Copyright (C) 2018, 2019 by via donau
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
465 * – Österreichische Wasserstraßen-Gesellschaft mbH
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
466 * Software engineering by Intevation GmbH
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
467 *
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
468 * Author(s):
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
469 * Thomas Junk <thomas.junk@intevation.de>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
470 * Tom Gottfried <tom.gottfried@intevation.de>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
471 */
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
472 import {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
473 IMPORTTYPES,
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
474 IMPORTTYPEKIND,
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
475 initializeCurrentSchedule
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
476 } from "@/store/importschedule";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
477 import { mapState } from "vuex";
2985
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2980
diff changeset
478 import { displayInfo, displayError } from "@/lib/errors";
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2980
diff changeset
479 import app from "@/main";
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
480 import { HTTP } from "@/lib/http";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
481
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
482 export default {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
483 name: "importscheduledetail",
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
484 components: {
2993
ec3196e2d579 imports: moved scheduled imports component in filesystem
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
485 Availablefairwaydepth: () => import("./types/Availablefairwaydepth"),
ec3196e2d579 imports: moved scheduled imports component in filesystem
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
486 Bottleneck: () => import("./types/Bottleneck"),
ec3196e2d579 imports: moved scheduled imports component in filesystem
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
487 Distancemarksvirtual: () => import("./types/Distancemarksvirtual"),
ec3196e2d579 imports: moved scheduled imports component in filesystem
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
488 Distancemarksashore: () => import("./types/Distancemarksashore"),
ec3196e2d579 imports: moved scheduled imports component in filesystem
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
489 Faiwaydimensions: () => import("./types/Fairwaydimensions"),
ec3196e2d579 imports: moved scheduled imports component in filesystem
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
490 Gaugemeasurement: () => import("./types/Gaugemeasurement"),
ec3196e2d579 imports: moved scheduled imports component in filesystem
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
491 Waterwayarea: () => import("./types/Waterwayarea"),
ec3196e2d579 imports: moved scheduled imports component in filesystem
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
492 Waterwaygauges: () => import("./types/Waterwaygauges"),
ec3196e2d579 imports: moved scheduled imports component in filesystem
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
493 Waterwayaxis: () => import("./types/Waterwayaxis")
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
494 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
495 data() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
496 return {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
497 directImport: false,
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
498 passwordVisible: false,
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
499 uploadLabel: this.$gettext("choose file to upload"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
500 uploadFile: null,
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
501 retry: false,
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
502 ...initializeCurrentSchedule()
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
503 };
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
504 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
505 mounted() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
506 this.initialize();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
507 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
508 watch: {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
509 cronMode() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
510 this.cronString = this.calcCronString();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
511 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
512 minutes() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
513 this.cronString = this.calcCronString();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
514 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
515 hour() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
516 this.cronString = this.calcCronString();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
517 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
518 month() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
519 this.cronString = this.calcCronString();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
520 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
521 day() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
522 this.cronString = this.calcCronString();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
523 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
524 dayOfMonth() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
525 this.cronString = this.calcCronString();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
526 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
527 importScheduleDetailVisible() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
528 this.initialize();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
529 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
530 cronString() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
531 if (this.isWeekly(this.cronString)) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
532 this.simple = "weekly";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
533 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
534 if (this.isMonthly(this.cronString)) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
535 this.simple = "monthly";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
536 }
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
537 },
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
538 retry() {
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
539 if (!this.retry) {
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
540 this.trys = 0;
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
541 this.waitRetry = "";
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
542 }
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
543 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
544 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
545 computed: {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
546 ...mapState("importschedule", [
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
547 "importScheduleDetailVisible",
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
548 "currentSchedule"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
549 ]),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
550 import_() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
551 return this.currentSchedule.importType;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
552 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
553 directImportAvailable() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
554 switch (this.import_) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
555 case this.$options.IMPORTTYPES.BOTTLENECK:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
556 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
557 case this.$options.IMPORTTYPES.GAUGEMEASUREMENT:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
558 return true;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
559 default:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
560 return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
561 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
562 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
563 isCredentialsRequired() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
564 switch (this.import_) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
565 case this.$options.IMPORTTYPES.WATERWAYGAUGES:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
566 case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
567 return true;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
568 default:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
569 return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
570 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
571 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
572 isURLRequired() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
573 switch (this.import_) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
574 case this.$options.IMPORTTYPES.BOTTLENECK:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
575 case this.$options.IMPORTTYPES.WATERWAYAXIS:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
576 case this.$options.IMPORTTYPES.GAUGEMEASUREMENT:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
577 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
578 case this.$options.IMPORTTYPES.WATERWAYAREA:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
579 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
580 case this.$options.IMPORTTYPES.WATERWAYGAUGES:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
581 case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
582 case this.$options.IMPORTTYPES.DISTANCEMARKSASHORE:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
583 return true;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
584 default:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
585 return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
586 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
587 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
588 isFeatureTypeRequired() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
589 switch (this.import_) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
590 case this.$options.IMPORTTYPES.WATERWAYAXIS:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
591 case this.$options.IMPORTTYPES.WATERWAYAREA:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
592 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
593 case this.$options.IMPORTTYPES.DISTANCEMARKSASHORE:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
594 return true;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
595 default:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
596 return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
597 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
598 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
599 isSortbyRequired() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
600 switch (this.import_) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
601 case this.$options.IMPORTTYPES.WATERWAYAXIS:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
602 case this.$options.IMPORTTYPES.WATERWAYAREA:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
603 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
604 case this.$options.IMPORTTYPES.DISTANCEMARKSASHORE:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
605 return true;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
606 default:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
607 return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
608 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
609 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
610 isToleranceRequired() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
611 switch (this.import_) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
612 case this.$options.IMPORTTYPES.BOTTLENECK:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
613 return true;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
614 default:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
615 return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
616 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
617 },
3515
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
618 usernamePasswordFilled() {
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
619 if (
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
620 this.isCredentialsRequired &&
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
621 this.currentSchedule.id &&
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
622 this.username
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
623 )
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
624 return true;
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
625 if (
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
626 this.isCredentialsRequired &&
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
627 !this.currentSchedule.id &&
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
628 this.username &&
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
629 this.password
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
630 )
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
631 return true;
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
632 return false;
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
633 },
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
634 isValid() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
635 if (!this.import_) return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
636 if (this.isToleranceRequired && !this.tolerance) return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
637 if (this.directImport && !this.uploadFile) return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
638 else if (!this.directImport) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
639 if (this.isURLRequired && !this.url) return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
640 if (this.isSortbyRequired && !this.sortBy) return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
641 if (this.isFeatureTypeRequired && !this.featureType) return false;
3557
c9c806e35855 client: import configuration: check username/password only if required
Markus Kottlaender <markus@intevation.de>
parents: 3546
diff changeset
642 if (this.isCredentialsRequired && !this.usernamePasswordFilled)
c9c806e35855 client: import configuration: check username/password only if required
Markus Kottlaender <markus@intevation.de>
parents: 3546
diff changeset
643 return false;
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
644 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
645 if (
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
646 !this.LOS ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
647 !this.minWidth ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
648 !this.maxWidth ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
649 !this.depth ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
650 !this.sourceOrganization
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
651 )
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
652 return false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
653 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
654 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
655 return true;
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
656 },
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
657 ttWaitRetry() {
4231
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
658 return `${this.$gettext(
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
659 "Time between retries. Valid units are 's' , 'm' and 'h' "
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
660 )}<div style="text-align:left;">${this.$gettext(
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
661 "Examples:"
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
662 )}<ul><li>${this.$gettext("60 for 60 Seconds ")}
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
663 </li><li> ${this.$gettext("30m for 30 Minutes")}</li><li> ${this.$gettext(
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
664 "2h45m for for two hours and 45 Minutes"
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
665 )}</li></ul></div>`;
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
666 },
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
667 ttRetries() {
4231
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
668 return ` ${this.$gettext("Maximum retry count")}<br> ${this.$gettext(
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
669 "If there is no error during import, there will be no retry"
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
670 )}
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
671 <br><div style="margin-left:45px;text-align:left;"<ul><li> ${this.$gettext(
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
672 "Negative values mean endless retry"
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
673 )}
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
674 </li><li> ${this.$gettext("0 means no retry")}</li><li> ${this.$gettext(
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
675 "Positive values are the upper limit for retries"
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
676 )}
6f31a99cd92d clinet: fix translations process and update source strings
Fadi Abbud <fadi.abbud@intevation.de>
parents: 3839
diff changeset
677 </li></ul></div>`;
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
678 },
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
679 ttRetry() {
3821
08eed1328ec9 client: Added tooltips for import retry feature in en_GB and de_AT.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3777
diff changeset
680 return this.$gettext("retryDescription");
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
681 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
682 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
683 methods: {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
684 back() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
685 this.$store.commit("importschedule/setListMode");
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
686 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
687 fileSelected(e) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
688 const files = e.target.files || e.dataTransfer.files;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
689 if (!files) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
690 this.uploadLabel = files[0].name;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
691 this.uploadFile = files[0];
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
692 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
693 setUrl(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
694 this.url = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
695 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
696 setFeatureType(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
697 this.featureType = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
698 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
699 setSortBy(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
700 this.sortBy = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
701 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
702 setTolerance(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
703 this.tolerance = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
704 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
705 setUsername(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
706 this.username = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
707 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
708 setPassword(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
709 this.password = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
710 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
711 setLOS(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
712 this.LOS = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
713 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
714 setMinWidth(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
715 this.minWidth = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
716 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
717 setMaxWidth(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
718 this.maxWidth = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
719 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
720 setDepth(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
721 this.depth = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
722 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
723 setSourceOrganization(value) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
724 this.sourceOrganization = value;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
725 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
726 calcCronString() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
727 let getValue = value => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
728 return this[value] !== null ? this[value] : "*";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
729 };
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
730
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
731 const min = getValue("minutes");
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
732 const h = getValue("hour");
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
733 const dm = getValue("dayOfMonth");
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
734 const m = getValue("month");
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
735 const wd = getValue("day");
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
736
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
737 if (this.cronMode === "15minutes") return "0 */15 * * * *";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
738 if (this.cronMode === "hour") return `0 ${min} * * * *`;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
739 if (this.cronMode === "day") return `0 ${min} ${h} * * *`;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
740 if (this.cronMode === "week") return `0 ${min} ${h} * * ${wd}`;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
741 if (this.cronMode === "month") return `0 ${min} ${h} ${dm} * *`;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
742 if (this.cronMode === "year") return `0 ${min} ${h} ${dm} ${m} *`;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
743 return this.cronString;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
744 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
745 validateBottleneckfields() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
746 return !!this.url;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
747 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
748 initialize() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
749 this.id = this.currentSchedule.id;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
750 this.importType = this.currentSchedule.importType;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
751 this.schedule = this.currentSchedule.schedule;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
752 this.scheduled = this.currentSchedule.scheduled;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
753 this.importSource = this.currentSchedule.importSource;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
754 this.eMailNotification = this.currentSchedule.eMailNotification;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
755 this.easyCron = this.currentSchedule.easyCron;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
756 this.cronMode = this.currentSchedule.cronMode;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
757 this.minutes = this.currentSchedule.minutes;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
758 this.month = this.currentSchedule.month;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
759 this.hour = this.currentSchedule.hour;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
760 this.day = this.currentSchedule.day;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
761 this.dayOfMonth = this.currentSchedule.dayOfMonth;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
762 this.simple = this.currentSchedule.simple;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
763 this.url = this.currentSchedule.url;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
764 this.insecure = this.currentSchedule.insecure;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
765 this.cronString = this.currentSchedule.cronString;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
766 this.featureType = this.currentSchedule.featureType;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
767 this.sortBy = this.currentSchedule.sortBy;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
768 this.tolerance = this.currentSchedule.tolerance;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
769 this.username = this.currentSchedule.username;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
770 this.password = this.currentSchedule.password;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
771 this.LOS = this.currentSchedule.LOS;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
772 this.minWidth = this.currentSchedule.minWidth;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
773 this.maxWidth = this.currentSchedule.maxWidth;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
774 this.depth = this.currentSchedule.depth;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
775 this.sourceOrganization = this.currentSchedule.sourceOrganization;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
776 this.directImport = false;
2998
adc8e9ccf706 imports: add tries and wait-retry to client
Thomas Junk <thomas.junk@intevation.de>
parents: 2994
diff changeset
777 this.trys = this.currentSchedule.trys;
adc8e9ccf706 imports: add tries and wait-retry to client
Thomas Junk <thomas.junk@intevation.de>
parents: 2994
diff changeset
778 this.waitRetry = this.currentSchedule.waitRetry;
3777
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
779 this.retry =
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
780 this.currentSchedule.trys === null ||
c373758ca2df client: Improved import retry ui.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3761
diff changeset
781 this.currentSchedule.trys === undefined ||
3839
03e8e6cc0b79 import_schedule: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 3821
diff changeset
782 this.currentSchedule === 0
03e8e6cc0b79 import_schedule: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 3821
diff changeset
783 ? false
03e8e6cc0b79 import_schedule: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 3821
diff changeset
784 : true;
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
785 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
786 isWeekly(cron) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
787 return /0 \d{1,2} \d{1,2} \* \* \d{1}/.test(cron);
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
788 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
789 isMonthly(cron) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
790 return /0 \d{1,2} \d{1,2} \d{1,2} \* \*/.test(cron);
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
791 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
792 clearInputs() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
793 this.minutes = this.currentSchedule.minutes;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
794 this.month = this.currentSchedule.month;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
795 this.hour = this.currentSchedule.hour;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
796 this.day = this.currentSchedule.day;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
797 this.dayOfMonth = this.currentSchedule.dayOfMonth;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
798 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
799 triggerFileUpload() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
800 if (!this.uploadFile) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
801 let formData = new FormData();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
802 let routeParam = "";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
803 switch (this.import_) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
804 case this.$options.IMPORTTYPES.BOTTLENECK:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
805 formData.append("tolerance", this.tolerance);
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
806 routeParam = "ubn";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
807 break;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
808 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
809 routeParam = "ufa";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
810 break;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
811 case this.$options.IMPORTTYPES.GAUGEMEASUREMENT:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
812 routeParam = "ugm";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
813 break;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
814 default:
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
815 throw new Error("invalid importroute");
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
816 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
817
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
818 formData.append(routeParam, this.uploadFile);
2994
5124644494df imports: send email when triggering file-upload for ubn, ufa, ugm
Thomas Junk <thomas.junk@intevation.de>
parents: 2993
diff changeset
819 if (this.eMailNotification) {
5124644494df imports: send email when triggering file-upload for ubn, ufa, ugm
Thomas Junk <thomas.junk@intevation.de>
parents: 2993
diff changeset
820 formData.append("send-email", this.eMailNotification);
5124644494df imports: send email when triggering file-upload for ubn, ufa, ugm
Thomas Junk <thomas.junk@intevation.de>
parents: 2993
diff changeset
821 }
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
822 HTTP.post("/imports/" + routeParam, formData, {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
823 headers: {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
824 "X-Gemma-Auth": localStorage.getItem("token"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
825 "Content-Type": "multipart/form-data"
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
826 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
827 })
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
828 .then(response => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
829 const { id } = response.data;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
830 displayInfo({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
831 title: this.$gettext("File Import"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
832 message: this.$gettext("Import import: #") + id
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
833 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
834 this.closeDetailview();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
835 this.$store.dispatch("importschedule/loadSchedules").catch(error => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
836 const { status, data } = error.response;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
837 displayError({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
838 title: this.gettext("Backend Error"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
839 message: `${status}: ${data.message || data}`
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
840 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
841 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
842 })
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
843 .catch(error => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
844 const { status, data } = error.response;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
845 displayError({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
846 title: this.$gettext("Backend Error"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
847 message: `${status}: ${data.message || data}`
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
848 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
849 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
850 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
851 triggerManualImport() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
852 if (!this.triggerActive) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
853 if (!this.import_) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
854 if (this.directImport) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
855 if (!this.uploadFile) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
856 this.triggerFileUpload();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
857 return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
858 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
859 let data = {};
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
860 if (this.isURLRequired) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
861 if (!this.url) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
862 data["url"] = this.url;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
863 data["insecure"] = this.insecure;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
864 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
865 if (this.isFeatureTypeRequired) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
866 if (!this.featureType) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
867 data["feature-type"] = this.featureType;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
868 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
869 if (this.isSortbyRequired) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
870 if (!this.sortBy) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
871 data["sort-by"] = this.sortBy;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
872 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
873 if (this.isToleranceRequired) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
874 if (!this.tolerance) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
875 data["tolerance"] = parseFloat(this.tolerance);
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
876 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
877 if (this.isCredentialsRequired) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
878 if (!this.username || !this.password) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
879 data["user"] = this.username;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
880 data["password"] = this.password;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
881 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
882 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
883 if (
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
884 !this.LOS ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
885 !this.minWidth ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
886 !this.maxWidth ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
887 !this.depth ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
888 !this.sourceOrganization
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
889 )
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
890 return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
891 data["feature-type"] = this.featureType;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
892 data["sort-by"] = this.sortBy;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
893 data["los"] = this.LOS * 1;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
894 data["min-width"] = this.minWidth * 1;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
895 data["max-width"] = this.maxWidth * 1;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
896 data["depth"] = this.depth * 1;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
897 data["source-organization"] = this.sourceOrganization;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
898 }
3761
f14ff00ad82a import_configuration: retries and wait parameter added for trigger function
Thomas Junk <thomas.junk@intevation.de>
parents: 3699
diff changeset
899 if (this.waitRetry) data["wait-retry"] = this.waitRetry;
f14ff00ad82a import_configuration: retries and wait parameter added for trigger function
Thomas Junk <thomas.junk@intevation.de>
parents: 3699
diff changeset
900 if (this.trys) data["trys"] = Number(this.trys);
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
901 data["send-email"] = this.eMailNotification;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
902 this.triggerActive = false;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
903 this.$store
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
904 .dispatch("importschedule/triggerImport", {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
905 type: IMPORTTYPEKIND[this.import_],
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
906 data
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
907 })
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
908 .then(response => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
909 const { id } = response.data;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
910 displayInfo({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
911 title: this.$gettext("Import"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
912 message: this.$gettext("Manually triggered import: #") + id
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
913 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
914 })
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
915 .catch(error => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
916 const { status, data } = error.response;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
917 displayError({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
918 title: this.$gettext("Backend Error"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
919 message: `${status}: ${data.message || data}`
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
920 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
921 })
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
922 .finally(() => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
923 this.triggerActive = true;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
924 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
925 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
926 save() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
927 if (!this.import_) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
928 let cron = this.cronString;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
929 if (this.easyCron) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
930 if (this.simple === "weekly") cron = "0 0 0 * * 0";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
931 if (this.simple === "monthly") cron = "0 0 0 1 * *";
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
932 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
933 let data = {};
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
934 let config = {};
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
935 data["kind"] = IMPORTTYPEKIND[this.import_];
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
936
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
937 if (this.isURLRequired) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
938 if (!this.url) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
939 config["url"] = this.url;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
940 config["insecure"] = this.insecure;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
941 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
942 if (this.isSortbyRequired) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
943 if (!this.sortBy) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
944 config["sort-by"] = this.sortBy;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
945 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
946 if (this.isFeatureTypeRequired) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
947 if (!this.featureType) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
948 config["feature-type"] = this.featureType;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
949 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
950 if (this.isToleranceRequired) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
951 if (!this.tolerance) return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
952 config["tolerance"] = parseFloat(this.tolerance);
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
953 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
954 if (this.isCredentialsRequired) {
3515
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
955 if (!this.usernamePasswordFilled) return;
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
956 config = {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
957 ...config,
3515
c64c47ff2ab1 import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents: 3427
diff changeset
958 user: this.username
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
959 };
3546
7ffc42bb6ec5 sent password when explicitely set
Thomas Junk <thomas.junk@intevation.de>
parents: 3545
diff changeset
960 if (this.password) {
3545
8cb5a99784b5 sent password when explicitely set
Thomas Junk <thomas.junk@intevation.de>
parents: 3515
diff changeset
961 config["password"] = this.password;
8cb5a99784b5 sent password when explicitely set
Thomas Junk <thomas.junk@intevation.de>
parents: 3515
diff changeset
962 }
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
963 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
964 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
965 if (
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
966 !this.LOS ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
967 !this.minWidth ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
968 !this.maxWidth ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
969 !this.depth ||
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
970 !this.sourceOrganization
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
971 )
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
972 return;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
973 config = { ...config, los: this.LOS, depth: this.depth };
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
974 config["min-width"] = this.minWidth;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
975 config["max-width"] = this.maxWidth;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
976 config["source-organization"] = this.sourceOrganization;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
977 }
2998
adc8e9ccf706 imports: add tries and wait-retry to client
Thomas Junk <thomas.junk@intevation.de>
parents: 2994
diff changeset
978 if (this.scheduled) {
adc8e9ccf706 imports: add tries and wait-retry to client
Thomas Junk <thomas.junk@intevation.de>
parents: 2994
diff changeset
979 config["cron"] = cron;
adc8e9ccf706 imports: add tries and wait-retry to client
Thomas Junk <thomas.junk@intevation.de>
parents: 2994
diff changeset
980 }
3001
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
981 if (this.waitRetry) config["wait-retry"] = this.waitRetry;
23f4fb9a205a imports: moved email notification
Thomas Junk <thomas.junk@intevation.de>
parents: 2998
diff changeset
982 if (this.trys) config["trys"] = Number(this.trys);
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
983 config["send-email"] = this.eMailNotification;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
984 if (!this.id) {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
985 data["config"] = config;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
986 this.$store
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
987 .dispatch("importschedule/saveCurrentSchedule", data)
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
988 .then(response => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
989 const { id } = response.data;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
990 displayInfo({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
991 title: this.$gettext("Import"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
992 message: this.$gettext("Saved import: #") + id
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
993 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
994 this.closeDetailview();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
995 this.$store
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
996 .dispatch("importschedule/loadSchedules")
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
997 .catch(error => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
998 const { status, data } = error.response;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
999 displayError({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1000 title: this.gettext("Backend Error"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1001 message: `${status}: ${data.message || data}`
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1002 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1003 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1004 })
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1005 .catch(error => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1006 const { status, data } = error.response;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1007 displayError({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1008 title: this.$gettext("Backend Error"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1009 message: `${status}: ${data.message || data}`
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1010 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1011 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1012 } else {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1013 this.$store
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1014 .dispatch("importschedule/updateCurrentSchedule", {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1015 data: config,
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1016 id: this.id
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1017 })
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1018 .then(response => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1019 const { id } = response.data;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1020 displayInfo({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1021 title: this.$gettext("Import"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1022 message: this.$gettext("update import: #") + id
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1023 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1024 this.closeDetailview();
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1025 this.$store
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1026 .dispatch("importschedule/loadSchedules")
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1027 .catch(error => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1028 const { status, data } = error.response;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1029 displayError({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1030 title: this.gettext("Backend Error"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1031 message: `${status}: ${data.message || data}`
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1032 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1033 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1034 })
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1035 .catch(error => {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1036 const { status, data } = error.response;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1037 displayError({
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1038 title: this.$gettext("Backend Error"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1039 message: `${status}: ${data.message || data}`
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1040 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1041 });
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1042 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1043 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1044 closeDetailview() {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1045 this.$store.commit("importschedule/clearCurrentSchedule");
2980
a9b61290fcc2 unified_imports: edit capabilities added
Thomas Junk <thomas.junk@intevation.de>
parents: 2979
diff changeset
1046 this.$store.commit("importschedule/setListMode");
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1047 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1048 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1049 IMPORTTYPES: IMPORTTYPES,
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1050 on: "on",
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1051 off: "off",
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1052 FILE: app.$gettext("File"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1053 URL: app.$gettext("URL"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1054 EVERY: app.$gettext("Every"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1055 MINUTESPAST: app.$gettext("minutes past"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1056 ON: app.$gettext("on"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1057 OF: app.$gettext("of"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1058 AT: app.$gettext("at"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1059 OCLOCK: app.$gettext("o' clock"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1060 CRONMODE: {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1061 "15minutes": app.$gettext("15 minutes"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1062 hour: app.$gettext("hour"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1063 day: app.$gettext("day"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1064 week: app.$gettext("week"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1065 month: app.$gettext("month"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1066 year: app.$gettext("year")
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1067 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1068 DAYSOFWEEK: {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1069 1: app.$gettext("Monday"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1070 2: app.$gettext("Tuesday"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1071 3: app.$gettext("Wednesday"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1072 4: app.$gettext("Thursday"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1073 5: app.$gettext("Friday"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1074 6: app.$gettext("Saturday"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1075 0: app.$gettext("Sunday")
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1076 },
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1077 MONTHS: {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1078 1: app.$gettext("January"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1079 2: app.$gettext("February"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1080 3: app.$gettext("March"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1081 4: app.$gettext("April"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1082 5: app.$gettext("May"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1083 6: app.$gettext("June"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1084 7: app.$gettext("July"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1085 8: app.$gettext("August"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1086 9: app.$gettext("September"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1087 10: app.$gettext("October"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1088 11: app.$gettext("November"),
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1089 12: app.$gettext("December")
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1090 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1091 };
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1092 </script>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1093
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1094 <style lang="scss" scoped>
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1095 .cronfield {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1096 width: 55px;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1097 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1098
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1099 .importscheduledetailscard {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1100 min-height: 550px;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1101 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1102
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1103 .importscheduledetails {
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1104 width: 100%;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1105 margin-top: $offset;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1106 margin-right: $offset;
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1107 }
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1108 </style>