annotate client/src/components/importconfiguration/ScheduledImports.vue @ 3761:f14ff00ad82a

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