Mercurial > gemma
annotate client/src/components/importschedule/Importscheduledetail.vue @ 2684:c4da269238a4
client: waterlevel diagram: visualize data gaps
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 15 Mar 2019 12:43:30 +0100 |
parents | 2ee6c32f1ba6 |
children | c1f2b9148cc8 |
rev | line source |
---|---|
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
2 <div |
2577
fcb139bfa56b
client: (minor) remove unsignificant space
Bernhard Reiter <bernhard@intevation.de>
parents:
2563
diff
changeset
|
3 class="importscheduledetails fadeIn animated" |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
4 v-if="importScheduleDetailVisible" |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
5 > |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
6 <div class="card shadow-xs importscheduledetailscard pb-5"> |
2387
f185503ef35a
client: unified box's header styles by creating a reusable component
Markus Kottlaender <markus@intevation.de>
parents:
2377
diff
changeset
|
7 <UIBoxHeader :title="dialogLabel" :closeCallback="closeDetailview" /> |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
8 <div class="card-body"> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
9 <form @submit.prevent="save" class="ml-2 mr-2"> |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
10 <div class="d-flex flex-row"> |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
11 <div class="flex-column w-50 mr-3"> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
12 <div class="flex-row text-left"> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
13 <small class="text-muted"> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
14 <translate>Imports</translate> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
15 </small> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
16 </div> |
1587
af17c29df8f0
unattended imports: added bottlenecks as import
Thomas Junk <thomas.junk@intevation.de>
parents:
1586
diff
changeset
|
17 <select v-model="import_" class="custom-select" id="importtype"> |
af17c29df8f0
unattended imports: added bottlenecks as import
Thomas Junk <thomas.junk@intevation.de>
parents:
1586
diff
changeset
|
18 <option :value="$options.IMPORTTYPES.BOTTLENECK" |
af17c29df8f0
unattended imports: added bottlenecks as import
Thomas Junk <thomas.junk@intevation.de>
parents:
1586
diff
changeset
|
19 ><translate>Bottlenecks</translate></option |
af17c29df8f0
unattended imports: added bottlenecks as import
Thomas Junk <thomas.junk@intevation.de>
parents:
1586
diff
changeset
|
20 > |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
21 <option :value="$options.IMPORTTYPES.WATERWAYAXIS" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
22 ><translate>Waterway axis</translate></option |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
23 > |
1749
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
24 <option :value="$options.IMPORTTYPES.GAUGEMEASUREMENT" |
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
25 ><translate>Gauge measurement</translate></option |
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
26 > |
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
27 <option :value="$options.IMPORTTYPES.FAIRWAYAVAILABILITY" |
2088
e972567100d3
input events for import schedule
Thomas Junk <thomas.junk@intevation.de>
parents:
2068
diff
changeset
|
28 ><translate>Available fairway depths</translate></option |
1749
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
29 > |
1789
4a7aa3f57efe
importschedule: frontend for WW_Area and Fairwaydimensions
Thomas Junk <thomas.junk@intevation.de>
parents:
1773
diff
changeset
|
30 <option :value="$options.IMPORTTYPES.WATERWAYAREA" |
2062 | 31 ><translate>Waterway area</translate></option |
1789
4a7aa3f57efe
importschedule: frontend for WW_Area and Fairwaydimensions
Thomas Junk <thomas.junk@intevation.de>
parents:
1773
diff
changeset
|
32 > |
1858
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
33 <option :value="$options.IMPORTTYPES.FAIRWAYDIMENSION" |
2062 | 34 ><translate>Fairway dimension</translate></option |
1789
4a7aa3f57efe
importschedule: frontend for WW_Area and Fairwaydimensions
Thomas Junk <thomas.junk@intevation.de>
parents:
1773
diff
changeset
|
35 > |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
36 <option :value="$options.IMPORTTYPES.WATERWAYGAUGES" |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
37 ><translate>Waterway gauges</translate></option |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
38 > |
1863
3bf2e5a91e50
import: distance marks virtual added
Thomas Junk <thomas.junk@intevation.de>
parents:
1858
diff
changeset
|
39 <option :value="$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL" |
2062 | 40 ><translate>Distance marks virtual</translate></option |
1863
3bf2e5a91e50
import: distance marks virtual added
Thomas Junk <thomas.junk@intevation.de>
parents:
1858
diff
changeset
|
41 > |
2068 | 42 <option :value="$options.IMPORTTYPES.DISTANCEMARKSASHORE" |
43 ><translate>Distance marks ashore</translate></option | |
44 > | |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
45 </select> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
46 </div> |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
47 <div class="flex-column ml-4"> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
48 <div class="flex-row text-left"> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
49 <small class="text-muted"> |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
50 <translate>Email Notification</translate> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
51 </small> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
52 </div> |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
53 <div class="flex-flex-row text-left"> |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
54 <toggle-button |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
55 v-model="eMailNotification" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
56 class="mt-2" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
57 :speed="100" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
58 :labels="{ |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
59 checked: this.$options.on, |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
60 unchecked: this.$options.off |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
61 }" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
62 :width="60" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
63 :height="30" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
64 /> |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
65 </div> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
66 </div> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
67 </div> |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
68 <div v-if="directImportAvailable" class="flex-column"> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
69 <div class="flex-row text-left"> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
70 <small class="text-muted"> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
71 <translate>Import via</translate> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
72 </small> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
73 </div> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
74 <div class="flex-flex-row text-left"> |
2613
2ee6c32f1ba6
client: fix UI for URL/file import settings
Bernhard Reiter <bernhard@intevation.de>
parents:
2586
diff
changeset
|
75 <!-- '#75c791' is the DEFAULT_COLOR_CHECKED |
2ee6c32f1ba6
client: fix UI for URL/file import settings
Bernhard Reiter <bernhard@intevation.de>
parents:
2586
diff
changeset
|
76 from vue-js-toggle-button as here both states are active --> |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
77 <toggle-button |
2613
2ee6c32f1ba6
client: fix UI for URL/file import settings
Bernhard Reiter <bernhard@intevation.de>
parents:
2586
diff
changeset
|
78 :color="{ unchecked: '#75c791' }" |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
79 v-model="directImport" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
80 class="mt-2" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
81 :speed="100" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
82 :labels="{ |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
83 checked: this.$options.FILE, |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
84 unchecked: this.$options.URL |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
85 }" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
86 :width="60" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
87 :height="30" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
88 /> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
89 </div> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
90 </div> |
1992 | 91 <Availablefairwaydepth |
2262
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
92 v-if=" |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
93 import_ == $options.IMPORTTYPES.FAIRWAYAVAILABILITY && |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
94 !directImport |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
95 " |
1996 | 96 @urlChanged="setUrl" |
97 :url="url" | |
1992 | 98 ></Availablefairwaydepth> |
99 <Bottleneck | |
2586
bc1b43885a4d
Expose axis snapping tolerance in bottleneck upload import
Tom Gottfried <tom@intevation.de>
parents:
2582
diff
changeset
|
100 v-if="import_ == $options.IMPORTTYPES.BOTTLENECK" |
1996 | 101 @urlChanged="setUrl" |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
102 @toleranceChanged="setTolerance" |
1996 | 103 :url="url" |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
104 :tolerance="tolerance" |
2586
bc1b43885a4d
Expose axis snapping tolerance in bottleneck upload import
Tom Gottfried <tom@intevation.de>
parents:
2582
diff
changeset
|
105 :directImport="directImport" |
1992 | 106 ></Bottleneck> |
107 <Distancemarksvirtual | |
108 v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSVIRTUAL" | |
1996 | 109 @urlChanged="setUrl" |
110 @usernameChanged="setUsername" | |
111 @passwordChanged="setPassword" | |
112 :url="url" | |
113 :username="username" | |
114 :password="password" | |
1992 | 115 ></Distancemarksvirtual> |
2068 | 116 <Distancemarksashore |
117 v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSASHORE" | |
118 @urlChanged="setUrl" | |
119 @featureTypeChanged="setFeatureType" | |
120 @sortByChanged="setSortBy" | |
121 :url="url" | |
122 :featureType="featureType" | |
123 :sortBy="sortBy" | |
124 ></Distancemarksashore> | |
1992 | 125 <Faiwaydimensions |
126 v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSION" | |
1996 | 127 @urlChanged="setUrl" |
128 @featureTypeChanged="setFeatureType" | |
129 @sortByChanged="setSortBy" | |
130 @LOSChanged="setLOS" | |
131 @depthChanged="setDepth" | |
132 @minWidthChanged="setMinWidth" | |
133 @maxWidthChanged="setMaxWidth" | |
134 @sourceOrganizationChanged="setSourceOrganization" | |
135 :url="url" | |
136 :featureType="featureType" | |
137 :sortBy="sortBy" | |
138 :LOS="LOS" | |
139 :minWidth="minWidth" | |
140 :maxWidth="maxWidth" | |
141 :sourceOrganization="sourceOrganization" | |
142 :depth="depth" | |
1992 | 143 ></Faiwaydimensions> |
144 <Gaugemeasurement | |
2262
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
145 v-if=" |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
146 import_ == $options.IMPORTTYPES.GAUGEMEASUREMENT && !directImport |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
147 " |
1996 | 148 @urlChanged="setUrl" |
149 :url="url" | |
1992 | 150 ></Gaugemeasurement> |
151 <Waterwayarea | |
152 v-if="import_ == $options.IMPORTTYPES.WATERWAYAREA" | |
1996 | 153 @urlChanged="setUrl" |
154 @featureTypeChanged="setFeatureType" | |
155 @sortByChanged="setSortBy" | |
156 :url="url" | |
157 :featureType="featureType" | |
158 :sortBy="sortBy" | |
1992 | 159 ></Waterwayarea> |
160 <Waterwaygauges | |
161 v-if="import_ == $options.IMPORTTYPES.WATERWAYGAUGES" | |
1996 | 162 @urlChanged="setUrl" |
163 @usernameChanged="setUsername" | |
164 @passwordChanged="setPassword" | |
165 :url="url" | |
166 :username="username" | |
167 :password="password" | |
1992 | 168 ></Waterwaygauges> |
169 <Waterwayaxis | |
170 v-if="import_ == $options.IMPORTTYPES.WATERWAYAXIS" | |
1996 | 171 @urlChanged="setUrl" |
172 @featureTypeChanged="setFeatureType" | |
173 @sortByChanged="setSortBy" | |
174 :url="url" | |
175 :featureType="featureType" | |
176 :sortBy="sortBy" | |
1992 | 177 ></Waterwayaxis> |
178 | |
2581
5466800da970
Fix conditional rendering of file/URL import form elements
Tom Gottfried <tom@intevation.de>
parents:
2577
diff
changeset
|
179 <template v-if="!directImport || !directImportAvailable"> |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
180 <div class="d-flex flex-row"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
181 <div class="flex-column mt-3 mr-4"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
182 <div class="flex-row text-left"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
183 <small class="text-muted"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
184 <translate>Scheduled</translate>? |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
185 </small> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
186 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
187 <div class="flex-flex-row text-left"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
188 <toggle-button |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
189 v-model="scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
190 class="mt-2" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
191 :speed="100" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
192 :labels="{ |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
193 checked: this.$options.on, |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
194 unchecked: this.$options.off |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
195 }" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
196 :width="60" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
197 :height="30" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
198 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
199 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
200 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
201 <div class="flex-column mt-3 mr-2"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
202 <div class="flex-row text-left"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
203 <small class="text-muted"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
204 <translate>Simple schedule</translate> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
205 </small> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
206 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
207 <div class="flex-flex-row text-left"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
208 <toggle-button |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
209 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
210 v-model="easyCron" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
211 class="mt-2" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
212 :speed="100" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
213 :labels="{ |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
214 checked: this.$options.on, |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
215 unchecked: this.$options.off |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
216 }" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
217 :width="60" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
218 :height="30" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
219 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
220 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
221 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
222 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
223 <div class="flex-column w-100 mr-2"> |
1712
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
224 <div class="flex-row text-left"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
225 <small class="text-muted"> |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
226 <translate>Schedule</translate> |
1712
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
227 </small> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
228 </div> |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
229 <div v-if="easyCron" class="text-left w-50"> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
230 <select |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
231 :disabled="!scheduled" |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
232 v-model="simple" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
233 class="form-control" |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
234 ><option value="weekly"><translate>Weekly</translate></option> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
235 <option value="monthly" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
236 ><translate>Monthly</translate> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
237 </option> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
238 </select> |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
239 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
240 <div v-if="!easyCron" class="text-left w-100"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
241 <div class="d-flex flex-row"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
242 <h4 class="mt-auto mb-auto mr-2">{{ $options.EVERY }}</h4> |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
243 <select |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
244 :disabled="!scheduled" |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
245 style="width: 130px;" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
246 v-model="cronMode" |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
247 class="form-control" |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
248 @change="clearInputs" |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
249 > |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
250 <option :value="null"></option> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
251 <option |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
252 v-for="(option, key) in $options.CRONMODE" |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
253 :value="key" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
254 :key="key" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
255 >{{ option }}</option |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
256 > |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
257 </select> |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
258 <div v-if="cronMode == 'hour'" class="ml-1 d-flex flex-row"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
259 <h4 class="mt-auto mb-auto">{{ $options.ON }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
260 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
261 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
262 v-model="minutes" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
263 class="cronfield ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
264 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
265 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
266 <h4 class="mt-auto mb-auto">{{ $options.MINUTESPAST }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
267 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
268 <div v-if="cronMode == 'day'" class="ml-1 d-flex flex-row"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
269 <h4 class="mt-auto mb-auto">{{ $options.AT }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
270 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
271 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
272 v-model="hour" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
273 class="cronfield ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
274 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
275 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
276 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
277 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
278 v-model="minutes" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
279 class="cronfield ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
280 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
281 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
282 <h4 class="mt-auto mb-auto">{{ $options.OCLOCK }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
283 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
284 <div v-if="cronMode == 'week'" class="ml-1 d-flex flex-row"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
285 <h4 class="ml-1 mr-1 mt-auto mb-auto">{{ $options.ON }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
286 <select |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
287 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
288 v-model="day" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
289 class="form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
290 > |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
291 <option |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
292 v-for="(option, key) in $options.DAYSOFWEEK" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
293 :key="key" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
294 :value="key" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
295 >{{ option }}</option |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
296 > |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
297 </select> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
298 <h4 class="ml-1 mt-auto mb-auto">{{ $options.AT }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
299 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
300 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
301 v-model="hour" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
302 class="cronfield ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
303 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
304 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
305 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
306 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
307 v-model="minutes" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
308 class="cronfield ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
309 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
310 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
311 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
312 <div v-if="cronMode == 'month'" class="ml-1 d-flex flex-row"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
313 <h4 class="ml-1 mt-auto mb-auto">{{ $options.ON }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
314 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
315 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
316 v-model="dayOfMonth" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
317 class="cronfield ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
318 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
319 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
320 <h4 class="mt-auto mb-auto">{{ $options.AT }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
321 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
322 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
323 v-model="hour" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
324 class="cronfield ml-1 mr-2 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
325 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
326 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
327 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
328 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
329 v-model="minutes" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
330 class="cronfield ml-1 mr-2 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
331 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
332 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
333 <h4 class="mt-auto mb-auto">{{ $options.OCLOCK }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
334 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
335 <div v-if="cronMode == 'year'" class="ml-1 d-flex flex-row"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
336 <h4 class="ml-1 mt-auto mb-auto">{{ $options.ON }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
337 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
338 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
339 v-model="dayOfMonth" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
340 class="cronfield ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
341 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
342 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
343 <h4 class="mt-auto mb-auto">{{ $options.OF }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
344 <select |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
345 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
346 v-model="month" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
347 class="ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
348 > |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
349 <option |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
350 v-for="(option, key) in $options.MONTHS" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
351 :value="key" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
352 :key="key" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
353 >{{ option }}</option |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
354 > |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
355 </select> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
356 <h4 class="mt-auto mb-auto">{{ $options.ON }}</h4> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
357 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
358 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
359 v-model="hour" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
360 class="cronfield ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
361 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
362 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
363 <input |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
364 :disabled="!scheduled" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
365 v-model="minutes" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
366 class="cronfield ml-1 mr-1 form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
367 type="number" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
368 /> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
369 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
370 </div> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
371 <div class="mt-3 w-50 d-flex flex-row"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
372 <h5 class="mt-auto mb-auto mr-2"> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
373 <translate>Cronstring</translate> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
374 </h5> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
375 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
376 :disabled="!scheduled" |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
377 class="form-control" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
378 v-model="cronString" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
379 type="text" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
380 /> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
381 </div> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
382 </div> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
383 </div> |
2582
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
384 <button |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
385 :disabled="!isValid" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
386 type="submit" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
387 class="shadow-sm btn btn-info submit-button" |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
388 > |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
389 <translate>Save</translate> |
ab819b1b748b
Fix indentation to make linter happy again
Tom Gottfried <tom@intevation.de>
parents:
2581
diff
changeset
|
390 </button> |
2581
5466800da970
Fix conditional rendering of file/URL import form elements
Tom Gottfried <tom@intevation.de>
parents:
2577
diff
changeset
|
391 </template> |
5466800da970
Fix conditional rendering of file/URL import form elements
Tom Gottfried <tom@intevation.de>
parents:
2577
diff
changeset
|
392 <div v-else class="d-flex flex-row text-left"> |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
393 <div class="mt-3 mb-3 flex-column w-100"> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
394 <div class="custom-file"> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
395 <input |
2199 | 396 accept=".xml" |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
397 type="file" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
398 @change="fileSelected" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
399 class="custom-file-input" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
400 id="uploadFile" |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
401 /> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
402 <label class="pointer custom-file-label" for="uploadFile"> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
403 {{ uploadLabel }} |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
404 </label> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
405 </div> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
406 </div> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
407 </div> |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
408 <button |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
409 @click="triggerManualImport" |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
410 type="button" |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
411 class="shadow-sm btn btn-outline-info trigger" |
2353
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
412 :disabled="!triggerActive || !isValid" |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
413 > |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
414 <font-awesome-icon |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
415 class="fa-fw mr-2" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
416 fixed-width |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
417 icon="play" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
418 ></font-awesome-icon |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
419 ><translate>Trigger import</translate> |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
420 </button> |
1529 | 421 </form> |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
422 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
423 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
424 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
425 </template> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
426 |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
427 <script> |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
428 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
429 * without warranty, see README.md and license for details. |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
430 * |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
431 * SPDX-License-Identifier: AGPL-3.0-or-later |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
432 * License-Filename: LICENSES/AGPL-3.0.txt |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
433 * |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
434 * Copyright (C) 2018, 2019 by via donau |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
435 * – Österreichische Wasserstraßen-Gesellschaft mbH |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
436 * Software engineering by Intevation GmbH |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
437 * |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
438 * Author(s): |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
439 * Thomas Junk <thomas.junk@intevation.de> |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
440 * Tom Gottfried <tom.gottfried@intevation.de> |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
441 */ |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
442 import { |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
443 IMPORTTYPES, |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
444 IMPORTTYPEKIND, |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
445 initializeCurrentSchedule |
2033
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
446 } from "@/store/importschedule"; |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
447 import { mapState } from "vuex"; |
1613
f2d24dceecc7
refac: cleanup import paths
Thomas Junk <thomas.junk@intevation.de>
parents:
1598
diff
changeset
|
448 import { displayInfo, displayError } from "@/lib/errors.js"; |
f2d24dceecc7
refac: cleanup import paths
Thomas Junk <thomas.junk@intevation.de>
parents:
1598
diff
changeset
|
449 import app from "@/main.js"; |
2199 | 450 import { HTTP } from "@/lib/http"; |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
451 |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
452 export default { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
453 name: "importscheduledetail", |
1992 | 454 components: { |
1996 | 455 Availablefairwaydepth: () => |
456 import("@/components/importschedule/importtypes/Availablefairwaydepth"), | |
457 Bottleneck: () => | |
458 import("@/components/importschedule/importtypes/Bottleneck"), | |
459 Distancemarksvirtual: () => | |
460 import("@/components/importschedule/importtypes/Distancemarksvirtual"), | |
2068 | 461 Distancemarksashore: () => |
462 import("@/components/importschedule/importtypes/Distancemarksashore"), | |
1996 | 463 Faiwaydimensions: () => |
464 import("@/components/importschedule/importtypes/Fairwaydimensions"), | |
465 Gaugemeasurement: () => | |
466 import("@/components/importschedule/importtypes/Gaugemeasurement"), | |
467 Waterwayarea: () => | |
468 import("@/components/importschedule/importtypes/Waterwayarea"), | |
469 Waterwaygauges: () => | |
470 import("@/components/importschedule/importtypes/Waterwaygauges"), | |
471 Waterwayaxis: () => | |
472 import("@/components/importschedule/importtypes/Waterwayaxis") | |
1992 | 473 }, |
1529 | 474 data() { |
1953
3ccdd635d4fd
import schedule: password field instead of plaintext
Thomas Junk <thomas.junk@intevation.de>
parents:
1869
diff
changeset
|
475 return { |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
476 directImport: false, |
1953
3ccdd635d4fd
import schedule: password field instead of plaintext
Thomas Junk <thomas.junk@intevation.de>
parents:
1869
diff
changeset
|
477 passwordVisible: false, |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
478 uploadLabel: this.$gettext("choose file to upload"), |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
479 uploadFile: null, |
1953
3ccdd635d4fd
import schedule: password field instead of plaintext
Thomas Junk <thomas.junk@intevation.de>
parents:
1869
diff
changeset
|
480 ...initializeCurrentSchedule() |
3ccdd635d4fd
import schedule: password field instead of plaintext
Thomas Junk <thomas.junk@intevation.de>
parents:
1869
diff
changeset
|
481 }; |
1529 | 482 }, |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
483 mounted() { |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
484 this.initialize(); |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
485 }, |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
486 watch: { |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
487 cronMode() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
488 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
489 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
490 minutes() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
491 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
492 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
493 hour() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
494 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
495 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
496 month() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
497 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
498 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
499 day() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
500 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
501 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
502 dayOfMonth() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
503 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
504 }, |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
505 importScheduleDetailVisible() { |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
506 this.initialize(); |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
507 }, |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
508 cronString() { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
509 if (this.isWeekly(this.cronString)) { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
510 this.simple = "weekly"; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
511 } |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
512 if (this.isMonthly(this.cronString)) { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
513 this.simple = "monthly"; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
514 } |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
515 } |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
516 }, |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
517 computed: { |
2033
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
518 ...mapState("importschedule", [ |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
519 "importScheduleDetailVisible", |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
520 "currentSchedule" |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
521 ]), |
1773
bd72d1a7ffe6
in edit case, the title shows import and its according id
Thomas Junk <thomas.junk@intevation.de>
parents:
1767
diff
changeset
|
522 dialogLabel() { |
bd72d1a7ffe6
in edit case, the title shows import and its according id
Thomas Junk <thomas.junk@intevation.de>
parents:
1767
diff
changeset
|
523 if (this.id) return this.$gettext("Import") + " " + this.id; |
bd72d1a7ffe6
in edit case, the title shows import and its according id
Thomas Junk <thomas.junk@intevation.de>
parents:
1767
diff
changeset
|
524 return this.$gettext("New Import"); |
1999
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
525 }, |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
526 directImportAvailable() { |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
527 switch (this.import_) { |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
528 case this.$options.IMPORTTYPES.BOTTLENECK: |
2262
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
529 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY: |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
530 case this.$options.IMPORTTYPES.GAUGEMEASUREMENT: |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
531 return true; |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
532 default: |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
533 return false; |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
534 } |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
535 }, |
1999
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
536 isCredentialsRequired() { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
537 switch (this.import_) { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
538 case this.$options.IMPORTTYPES.WATERWAYGAUGES: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
539 case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
540 return true; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
541 default: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
542 return false; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
543 } |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
544 }, |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
545 isURLRequired() { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
546 switch (this.import_) { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
547 case this.$options.IMPORTTYPES.BOTTLENECK: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
548 case this.$options.IMPORTTYPES.WATERWAYAXIS: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
549 case this.$options.IMPORTTYPES.GAUGEMEASUREMENT: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
550 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
551 case this.$options.IMPORTTYPES.WATERWAYAREA: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
552 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
553 case this.$options.IMPORTTYPES.WATERWAYGAUGES: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
554 case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL: |
2068 | 555 case this.$options.IMPORTTYPES.DISTANCEMARKSASHORE: |
1999
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
556 return true; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
557 default: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
558 return false; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
559 } |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
560 }, |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
561 isFeatureTypeRequired() { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
562 switch (this.import_) { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
563 case this.$options.IMPORTTYPES.WATERWAYAXIS: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
564 case this.$options.IMPORTTYPES.WATERWAYAREA: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
565 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: |
2068 | 566 case this.$options.IMPORTTYPES.DISTANCEMARKSASHORE: |
1999
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
567 return true; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
568 default: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
569 return false; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
570 } |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
571 }, |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
572 isSortbyRequired() { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
573 switch (this.import_) { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
574 case this.$options.IMPORTTYPES.WATERWAYAXIS: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
575 case this.$options.IMPORTTYPES.WATERWAYAREA: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
576 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: |
2068 | 577 case this.$options.IMPORTTYPES.DISTANCEMARKSASHORE: |
1999
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
578 return true; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
579 default: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
580 return false; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
581 } |
2353
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
582 }, |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
583 isToleranceRequired() { |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
584 switch (this.import_) { |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
585 case this.$options.IMPORTTYPES.BOTTLENECK: |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
586 return true; |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
587 default: |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
588 return false; |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
589 } |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
590 }, |
2353
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
591 isValid() { |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
592 if (!this.import_) return false; |
2586
bc1b43885a4d
Expose axis snapping tolerance in bottleneck upload import
Tom Gottfried <tom@intevation.de>
parents:
2582
diff
changeset
|
593 if (this.isToleranceRequired && !this.tolerance) return false; |
2353
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
594 if (this.directImport && !this.uploadFile) return false; |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
595 else if (!this.directImport) { |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
596 if (this.isURLRequired && !this.url) return false; |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
597 if (this.isSortbyRequired && !this.sortBy) return false; |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
598 if (this.isFeatureTypeRequired && !this.featureType) return false; |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
599 if (this.isCredentialsRequired && (!this.username || !this.password)) |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
600 return false; |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
601 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) { |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
602 if ( |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
603 !this.LOS || |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
604 !this.minWidth || |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
605 !this.maxWidth || |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
606 !this.depth || |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
607 !this.sourceOrganization |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
608 ) |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
609 return false; |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
610 } |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
611 } |
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
612 return true; |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
613 } |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
614 }, |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
615 methods: { |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
616 fileSelected(e) { |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
617 const files = e.target.files || e.dataTransfer.files; |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
618 if (!files) return; |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
619 this.uploadLabel = files[0].name; |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
620 this.uploadFile = files[0]; |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
621 }, |
1996 | 622 setUrl(value) { |
623 this.url = value; | |
624 }, | |
625 setFeatureType(value) { | |
626 this.featureType = value; | |
627 }, | |
628 setSortBy(value) { | |
629 this.sortBy = value; | |
630 }, | |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
631 setTolerance(value) { |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
632 this.tolerance = value; |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
633 }, |
1996 | 634 setUsername(value) { |
635 this.username = value; | |
636 }, | |
637 setPassword(value) { | |
638 this.password = value; | |
639 }, | |
640 setLOS(value) { | |
641 this.LOS = value; | |
642 }, | |
643 setMinWidth(value) { | |
644 this.minWidth = value; | |
645 }, | |
646 setMaxWidth(value) { | |
647 this.maxWidth = value; | |
648 }, | |
649 setDepth(value) { | |
650 this.depth = value; | |
651 }, | |
652 setSourceOrganization(value) { | |
653 this.sourceOrganization = value; | |
654 }, | |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
655 calcCronString() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
656 let getValue = value => { |
2344
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
657 return this[value] !== null ? this[value] : "*"; |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
658 }; |
2344
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
659 |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
660 const min = getValue("minutes"); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
661 const h = getValue("hour"); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
662 const dm = getValue("dayOfMonth"); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
663 const m = getValue("month"); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
664 const wd = getValue("day"); |
2344
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
665 |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
666 if (this.cronMode === "15minutes") return "0 */15 * * * *"; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
667 if (this.cronMode === "hour") return `0 ${min} * * * *`; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
668 if (this.cronMode === "day") return `0 ${min} ${h} * * *`; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
669 if (this.cronMode === "week") return `0 ${min} ${h} * * ${wd}`; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
670 if (this.cronMode === "month") return `0 ${min} ${h} ${dm} * *`; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
671 if (this.cronMode === "year") return `0 ${min} ${h} ${dm} ${m} *`; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
672 return this.cronString; |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
673 }, |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
674 validateBottleneckfields() { |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
675 return !!this.url; |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
676 }, |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
677 initialize() { |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
678 this.id = this.currentSchedule.id; |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
679 this.importType = this.currentSchedule.importType; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
680 this.schedule = this.currentSchedule.schedule; |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
681 this.scheduled = this.currentSchedule.scheduled; |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
682 this.import_ = this.currentSchedule.import_; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
683 this.importSource = this.currentSchedule.importSource; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
684 this.eMailNotification = this.currentSchedule.eMailNotification; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
685 this.easyCron = this.currentSchedule.easyCron; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
686 this.cronMode = this.currentSchedule.cronMode; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
687 this.minutes = this.currentSchedule.minutes; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
688 this.month = this.currentSchedule.month; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
689 this.hour = this.currentSchedule.hour; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
690 this.day = this.currentSchedule.day; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
691 this.dayOfMonth = this.currentSchedule.dayOfMonth; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
692 this.simple = this.currentSchedule.simple; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
693 this.url = this.currentSchedule.url; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
694 this.insecure = this.currentSchedule.insecure; |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
695 this.cronString = this.currentSchedule.cronString; |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
696 this.featureType = this.currentSchedule.featureType; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
697 this.sortBy = this.currentSchedule.sortBy; |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
698 this.tolerance = this.currentSchedule.tolerance; |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
699 this.username = this.currentSchedule.username; |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
700 this.password = this.currentSchedule.password; |
1830
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
701 this.LOS = this.currentSchedule.LOS; |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
702 this.minWidth = this.currentSchedule.minWidth; |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
703 this.maxWidth = this.currentSchedule.maxWidth; |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
704 this.depth = this.currentSchedule.depth; |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
705 this.sourceOrganization = this.currentSchedule.sourceOrganization; |
2353
b9c317236ebc
client: imports: disabled save/trigger buttons if form is invalid/not filled
Markus Kottlaender <markus@intevation.de>
parents:
2344
diff
changeset
|
706 this.directImport = false; |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
707 }, |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
708 isWeekly(cron) { |
1738
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
709 return /0 \d{1,2} \d{1,2} \* \* \d{1}/.test(cron); |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
710 }, |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
711 isMonthly(cron) { |
1738
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
712 return /0 \d{1,2} \d{1,2} \d{1,2} \* \*/.test(cron); |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
713 }, |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
714 clearInputs() { |
2344
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
715 this.minutes = this.currentSchedule.minutes; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
716 this.month = this.currentSchedule.month; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
717 this.hour = this.currentSchedule.hour; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
718 this.day = this.currentSchedule.day; |
a5b87a695469
client: imports: fixed cron string
Markus Kottlaender <markus@intevation.de>
parents:
2312
diff
changeset
|
719 this.dayOfMonth = this.currentSchedule.dayOfMonth; |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
720 }, |
2262
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
721 triggerFileUpload() { |
2199 | 722 if (!this.uploadFile) return; |
723 let formData = new FormData(); | |
2262
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
724 let routeParam = ""; |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
725 switch (this.import_) { |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
726 case this.$options.IMPORTTYPES.BOTTLENECK: |
2586
bc1b43885a4d
Expose axis snapping tolerance in bottleneck upload import
Tom Gottfried <tom@intevation.de>
parents:
2582
diff
changeset
|
727 formData.append("tolerance", this.tolerance); |
2262
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
728 routeParam = "ubn"; |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
729 break; |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
730 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY: |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
731 routeParam = "ufa"; |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
732 break; |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
733 case this.$options.IMPORTTYPES.GAUGEMEASUREMENT: |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
734 routeParam = "ugm"; |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
735 break; |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
736 default: |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
737 throw new Error("invalid importroute"); |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
738 } |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
739 |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
740 formData.append(routeParam, this.uploadFile); |
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
741 HTTP.post("/imports/" + routeParam, formData, { |
2199 | 742 headers: { |
743 "X-Gemma-Auth": localStorage.getItem("token"), | |
2241
5529e1f08dba
import_queue: ubn used correct endpoint
Thomas Junk <thomas.junk@intevation.de>
parents:
2199
diff
changeset
|
744 "Content-Type": "multipart/form-data" |
2199 | 745 } |
746 }) | |
747 .then(response => { | |
748 const { id } = response.data; | |
749 displayInfo({ | |
750 title: this.$gettext("File Import"), | |
751 message: this.$gettext("Import import: #") + id | |
752 }); | |
753 this.closeDetailview(); | |
754 this.$store.dispatch("importschedule/loadSchedules").catch(error => { | |
755 const { status, data } = error.response; | |
756 displayError({ | |
757 title: this.gettext("Backend Error"), | |
758 message: `${status}: ${data.message || data}` | |
759 }); | |
760 }); | |
761 }) | |
762 .catch(error => { | |
763 const { status, data } = error.response; | |
764 displayError({ | |
765 title: this.$gettext("Backend Error"), | |
766 message: `${status}: ${data.message || data}` | |
767 }); | |
768 }); | |
769 }, | |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
770 triggerManualImport() { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
771 if (!this.triggerActive) return; |
1725
b24a54c684bd
importschedule: UI improvements
Thomas Junk <thomas.junk@intevation.de>
parents:
1724
diff
changeset
|
772 if (!this.import_) return; |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
773 if (this.directImport) { |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
774 if (!this.uploadFile) return; |
2262
dedd7bbee846
testclient: ufa, vgm implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2241
diff
changeset
|
775 this.triggerFileUpload(); |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
776 return; |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
777 } |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
778 let data = {}; |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
779 if (this.isURLRequired) { |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
780 if (!this.url) return; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
781 data["url"] = this.url; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
782 data["insecure"] = this.insecure; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
783 } |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
784 if (this.isFeatureTypeRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
785 if (!this.featureType) return; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
786 data["feature-type"] = this.featureType; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
787 } |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
788 if (this.isSortbyRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
789 if (!this.sortBy) return; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
790 data["sort-by"] = this.sortBy; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
791 } |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
792 if (this.isToleranceRequired) { |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
793 if (!this.tolerance) return; |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
794 data["tolerance"] = parseFloat(this.tolerance); |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
795 } |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
796 if (this.isCredentialsRequired) { |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
797 if (!this.username || !this.password) return; |
2312
b87211f595ae
import-schedule: fix edit waterway gauge import. transmitting cedentials correctly
Thomas Junk <thomas.junk@intevation.de>
parents:
2307
diff
changeset
|
798 data["user"] = this.username; |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
799 data["password"] = this.password; |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
800 } |
1858
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
801 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) { |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
802 if ( |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
803 !this.LOS || |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
804 !this.minWidth || |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
805 !this.maxWidth || |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
806 !this.depth || |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
807 !this.sourceOrganization |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
808 ) |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
809 return; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
810 data["feature-type"] = this.featureType; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
811 data["sort-by"] = this.sortBy; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
812 data["los"] = this.LOS * 1; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
813 data["min-width"] = this.minWidth * 1; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
814 data["max-width"] = this.maxWidth * 1; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
815 data["depth"] = this.depth * 1; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
816 data["source-organization"] = this.sourceOrganization; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
817 } |
2307
e1aa9bb65da6
import_schedule: send email when manually triggering import
Thomas Junk <thomas.junk@intevation.de>
parents:
2262
diff
changeset
|
818 data["send-email"] = this.eMailNotification; |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
819 this.triggerActive = false; |
1709
8ff8d873ef6b
refac: trigger manual import via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1707
diff
changeset
|
820 this.$store |
2061
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
821 .dispatch("importschedule/triggerImport", { |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
822 type: IMPORTTYPEKIND[this.import_], |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
823 data |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
824 }) |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
825 .then(response => { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
826 const { id } = response.data; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
827 displayInfo({ |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
828 title: this.$gettext("Import"), |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
829 message: this.$gettext("Manually triggered import: #") + id |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
830 }); |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
831 }) |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
832 .catch(error => { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
833 const { status, data } = error.response; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
834 displayError({ |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
835 title: this.$gettext("Backend Error"), |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
836 message: `${status}: ${data.message || data}` |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
837 }); |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
838 }) |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
839 .finally(() => { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
840 this.triggerActive = true; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
841 }); |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
842 }, |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
843 save() { |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
844 if (!this.import_) return; |
1728
647195199dc8
importschedule: now with display of cron and delete function
Thomas Junk <thomas.junk@intevation.de>
parents:
1726
diff
changeset
|
845 let cron = this.cronString; |
647195199dc8
importschedule: now with display of cron and delete function
Thomas Junk <thomas.junk@intevation.de>
parents:
1726
diff
changeset
|
846 if (this.easyCron) { |
1738
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
847 if (this.simple === "weekly") cron = "0 0 0 * * 0"; |
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
848 if (this.simple === "monthly") cron = "0 0 0 1 * *"; |
1728
647195199dc8
importschedule: now with display of cron and delete function
Thomas Junk <thomas.junk@intevation.de>
parents:
1726
diff
changeset
|
849 } |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
850 let data = {}; |
2061
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
851 let config = {}; |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
852 data["kind"] = IMPORTTYPEKIND[this.import_]; |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
853 |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
854 if (this.isURLRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
855 if (!this.url) return; |
2061
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
856 config["url"] = this.url; |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
857 config["insecure"] = this.insecure; |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
858 } |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
859 if (this.isSortbyRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
860 if (!this.sortBy) return; |
2061
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
861 config["sort-by"] = this.sortBy; |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
862 } |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
863 if (this.isFeatureTypeRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
864 if (!this.featureType) return; |
2061
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
865 config["feature-type"] = this.featureType; |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
866 } |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
867 if (this.isToleranceRequired) { |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
868 if (!this.tolerance) return; |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
869 config["tolerance"] = parseFloat(this.tolerance); |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2387
diff
changeset
|
870 } |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
871 if (this.isCredentialsRequired) { |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
872 if (!this.username || !this.password) return; |
2061
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
873 config = { |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
874 ...config, |
2312
b87211f595ae
import-schedule: fix edit waterway gauge import. transmitting cedentials correctly
Thomas Junk <thomas.junk@intevation.de>
parents:
2307
diff
changeset
|
875 user: this.username, |
1830
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
876 password: this.password |
2061
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
877 }; |
1830
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
878 } |
1858
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
879 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) { |
1830
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
880 if ( |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
881 !this.LOS || |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
882 !this.minWidth || |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
883 !this.maxWidth || |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
884 !this.depth || |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
885 !this.sourceOrganization |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
886 ) |
1857
9141abe7c75a
import fairwaydimensions: fields pushed/retrieved
Thomas Junk <thomas.junk@intevation.de>
parents:
1854
diff
changeset
|
887 return; |
2061
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
888 config = { ...config, los: this.LOS, depth: this.depth }; |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
889 config["min-width"] = this.minWidth; |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
890 config["max-width"] = this.maxWidth; |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
891 config["source-organization"] = this.sourceOrganization; |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
892 } |
2061
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
893 if (this.scheduled) config["cron"] = cron; |
4a0d4e50768d
frontend adapted to new backend
Thomas Junk <thomas.junk@intevation.de>
parents:
2035
diff
changeset
|
894 config["send-email"] = this.eMailNotification; |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
895 if (!this.id) { |
2102
e9879eb7e965
importschedule: in case of UPDATE send proper document
Thomas Junk <thomas.junk@intevation.de>
parents:
2088
diff
changeset
|
896 data["config"] = config; |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
897 this.$store |
2033
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
898 .dispatch("importschedule/saveCurrentSchedule", data) |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
899 .then(response => { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
900 const { id } = response.data; |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
901 displayInfo({ |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
902 title: this.$gettext("Import"), |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
903 message: this.$gettext("Saved import: #") + id |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
904 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
905 this.closeDetailview(); |
2033
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
906 this.$store |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
907 .dispatch("importschedule/loadSchedules") |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
908 .catch(error => { |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
909 const { status, data } = error.response; |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
910 displayError({ |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
911 title: this.gettext("Backend Error"), |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
912 message: `${status}: ${data.message || data}` |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
913 }); |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
914 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
915 }) |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
916 .catch(error => { |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
917 const { status, data } = error.response; |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
918 displayError({ |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
919 title: this.$gettext("Backend Error"), |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
920 message: `${status}: ${data.message || data}` |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
921 }); |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
922 }); |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
923 } else { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
924 this.$store |
2033
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
925 .dispatch("importschedule/updateCurrentSchedule", { |
2102
e9879eb7e965
importschedule: in case of UPDATE send proper document
Thomas Junk <thomas.junk@intevation.de>
parents:
2088
diff
changeset
|
926 data: config, |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
927 id: this.id |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
928 }) |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
929 .then(response => { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
930 const { id } = response.data; |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
931 displayInfo({ |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
932 title: this.$gettext("Import"), |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
933 message: this.$gettext("update import: #") + id |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
934 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
935 this.closeDetailview(); |
2033
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
936 this.$store |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
937 .dispatch("importschedule/loadSchedules") |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
938 .catch(error => { |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
939 const { status, data } = error.response; |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
940 displayError({ |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
941 title: this.gettext("Backend Error"), |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
942 message: `${status}: ${data.message || data}` |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
943 }); |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
944 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
945 }) |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
946 .catch(error => { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
947 const { status, data } = error.response; |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
948 displayError({ |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
949 title: this.$gettext("Backend Error"), |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
950 message: `${status}: ${data.message || data}` |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
951 }); |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
952 }); |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
953 } |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
954 }, |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
955 closeDetailview() { |
2033
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
956 this.$store.commit("importschedule/clearCurrentSchedule"); |
431f97fd873b
importschedule: extracted to separate store
Thomas Junk <thomas.junk@intevation.de>
parents:
2031
diff
changeset
|
957 this.$store.commit("importschedule/setImportScheduleDetailInvisible"); |
1998
ceb6aaff6c8b
Backed out changeset 74c03fec0a91
Thomas Junk <thomas.junk@intevation.de>
parents:
1997
diff
changeset
|
958 } |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
959 }, |
2035
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
960 IMPORTTYPES: IMPORTTYPES, |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
961 on: "on", |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
962 off: "off", |
2197
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
963 FILE: app.$gettext("File"), |
3203c53a8d29
import_schedule: user is able to choose between file upload or URL as import type for bottleneckimport
Thomas Junk <thomas.junk@intevation.de>
parents:
2193
diff
changeset
|
964 URL: app.$gettext("URL"), |
2035
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
965 EVERY: app.$gettext("Every"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
966 MINUTESPAST: app.$gettext("minutes past"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
967 ON: app.$gettext("on"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
968 OF: app.$gettext("of"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
969 AT: app.$gettext("at"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
970 OCLOCK: app.$gettext("o' clock"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
971 CRONMODE: { |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
972 "15minutes": app.$gettext("15 minutes"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
973 hour: app.$gettext("hour"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
974 day: app.$gettext("day"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
975 week: app.$gettext("week"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
976 month: app.$gettext("month"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
977 year: app.$gettext("year") |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
978 }, |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
979 DAYSOFWEEK: { |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
980 1: app.$gettext("Monday"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
981 2: app.$gettext("Tuesday"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
982 3: app.$gettext("Wednesday"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
983 4: app.$gettext("Thursday"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
984 5: app.$gettext("Friday"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
985 6: app.$gettext("Saturday"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
986 0: app.$gettext("Sunday") |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
987 }, |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
988 MONTHS: { |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
989 1: app.$gettext("January"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
990 2: app.$gettext("February"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
991 3: app.$gettext("March"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
992 4: app.$gettext("April"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
993 5: app.$gettext("May"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
994 6: app.$gettext("June"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
995 7: app.$gettext("July"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
996 8: app.$gettext("August"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
997 9: app.$gettext("September"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
998 10: app.$gettext("October"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
999 11: app.$gettext("November"), |
2f6cadcb3558
importschedule: moved constants
Thomas Junk <thomas.junk@intevation.de>
parents:
2033
diff
changeset
|
1000 12: app.$gettext("December") |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1001 } |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1002 }; |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1003 </script> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1004 |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
1005 <style lang="scss" scoped> |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
1006 .cronfield { |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
1007 width: 55px; |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
1008 } |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
1009 |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
1010 .importscheduledetailscard { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
1011 min-height: 550px; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
1012 } |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
1013 |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
1014 .importscheduledetails { |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
1015 width: 100%; |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
1016 margin-top: $offset; |
1529 | 1017 margin-right: $offset; |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
1018 } |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
1019 |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
1020 .trigger { |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
1021 position: absolute; |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
1022 left: $large-offset; |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
1023 bottom: $offset; |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
1024 } |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
1025 |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
1026 .submit-button { |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
1027 position: absolute; |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
1028 right: $large-offset; |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
1029 bottom: $offset; |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
1030 } |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1031 </style> |