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