Mercurial > gemma
annotate client/src/components/importschedule/Importscheduledetail.vue @ 1999:c420add2dec2 importschedulerefac
small errors fixed
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 24 Jan 2019 14:24:00 +0100 |
parents | ceb6aaff6c8b |
children | d8874f78fd7b |
rev | line source |
---|---|
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
2 <div |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
3 class="importscheduledetails fadeIn animated" |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
4 v-if="importScheduleDetailVisible" |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
5 > |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
6 <div class="card shadow-xs importscheduledetailscard pb-5"> |
1480 | 7 <h6 |
8 class="mb-0 py-2 px-3 border-bottom d-flex text-info align-items-center" | |
9 > | |
1773
bd72d1a7ffe6
in edit case, the title shows import and its according id
Thomas Junk <thomas.junk@intevation.de>
parents:
1767
diff
changeset
|
10 {{ dialogLabel }} |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
11 <span @click="closeDetailview" class="closebutton"> |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
12 <font-awesome-icon icon="times"></font-awesome-icon> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
13 </span> |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
14 </h6> |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
15 <div class="card-body"> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
16 <form @submit.prevent="save" class="ml-2 mr-2"> |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
17 <div class="d-flex flex-row"> |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
18 <div class="flex-column w-50 mr-3"> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
19 <div class="flex-row text-left"> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
20 <small class="text-muted"> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
21 <translate>Imports</translate> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
22 </small> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
23 </div> |
1587
af17c29df8f0
unattended imports: added bottlenecks as import
Thomas Junk <thomas.junk@intevation.de>
parents:
1586
diff
changeset
|
24 <select v-model="import_" class="custom-select" id="importtype"> |
af17c29df8f0
unattended imports: added bottlenecks as import
Thomas Junk <thomas.junk@intevation.de>
parents:
1586
diff
changeset
|
25 <option :value="$options.IMPORTTYPES.BOTTLENECK" |
af17c29df8f0
unattended imports: added bottlenecks as import
Thomas Junk <thomas.junk@intevation.de>
parents:
1586
diff
changeset
|
26 ><translate>Bottlenecks</translate></option |
af17c29df8f0
unattended imports: added bottlenecks as import
Thomas Junk <thomas.junk@intevation.de>
parents:
1586
diff
changeset
|
27 > |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
28 <option :value="$options.IMPORTTYPES.WATERWAYAXIS" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
29 ><translate>Waterway axis</translate></option |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
30 > |
1749
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
31 <option :value="$options.IMPORTTYPES.GAUGEMEASUREMENT" |
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
32 ><translate>Gauge measurement</translate></option |
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
33 > |
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
34 <option :value="$options.IMPORTTYPES.FAIRWAYAVAILABILITY" |
1767
e84f78cd0d2f
Available Fairway Depths
Thomas Junk <thomas.junk@intevation.de>
parents:
1750
diff
changeset
|
35 ><translate>Available Fairway Depths</translate></option |
1749
0a6b2ace7b7e
Gauge measurement, Fairway availability implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
1747
diff
changeset
|
36 > |
1789
4a7aa3f57efe
importschedule: frontend for WW_Area and Fairwaydimensions
Thomas Junk <thomas.junk@intevation.de>
parents:
1773
diff
changeset
|
37 <option :value="$options.IMPORTTYPES.WATERWAYAREA" |
4a7aa3f57efe
importschedule: frontend for WW_Area and Fairwaydimensions
Thomas Junk <thomas.junk@intevation.de>
parents:
1773
diff
changeset
|
38 ><translate>Waterwayarea</translate></option |
4a7aa3f57efe
importschedule: frontend for WW_Area and Fairwaydimensions
Thomas Junk <thomas.junk@intevation.de>
parents:
1773
diff
changeset
|
39 > |
1858
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
40 <option :value="$options.IMPORTTYPES.FAIRWAYDIMENSION" |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
41 ><translate>Fairwaydimension</translate></option |
1789
4a7aa3f57efe
importschedule: frontend for WW_Area and Fairwaydimensions
Thomas Junk <thomas.junk@intevation.de>
parents:
1773
diff
changeset
|
42 > |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
43 <option :value="$options.IMPORTTYPES.WATERWAYGAUGES" |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
44 ><translate>Waterway gauges</translate></option |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
45 > |
1863
3bf2e5a91e50
import: distance marks virtual added
Thomas Junk <thomas.junk@intevation.de>
parents:
1858
diff
changeset
|
46 <option :value="$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL" |
3bf2e5a91e50
import: distance marks virtual added
Thomas Junk <thomas.junk@intevation.de>
parents:
1858
diff
changeset
|
47 ><translate>Distance Marks Virtual</translate></option |
3bf2e5a91e50
import: distance marks virtual added
Thomas Junk <thomas.junk@intevation.de>
parents:
1858
diff
changeset
|
48 > |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
49 </select> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
50 </div> |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
51 <div class="flex-column ml-4"> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
52 <div class="flex-row text-left"> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
53 <small class="text-muted"> |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
54 <translate>Email Notification</translate> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
55 </small> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
56 </div> |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
57 <div class="flex-flex-row text-left"> |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
58 <toggle-button |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
59 v-model="eMailNotification" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
60 class="mt-2" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
61 :speed="100" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
62 :labels="{ |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
63 checked: this.$options.on, |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
64 unchecked: this.$options.off |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
65 }" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
66 :width="60" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
67 :height="30" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
68 /> |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
69 </div> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
70 </div> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
71 </div> |
1992 | 72 |
73 <Availablefairwaydepth | |
74 v-if="import_ == $options.IMPORTTYPES.FAIRWAYAVAILABILITY" | |
1996 | 75 @urlChanged="setUrl" |
76 :url="url" | |
1992 | 77 ></Availablefairwaydepth> |
78 <Bottleneck | |
79 v-if="import_ == $options.IMPORTTYPES.BOTTLENECK" | |
1996 | 80 @urlChanged="setUrl" |
81 :url="url" | |
1992 | 82 ></Bottleneck> |
83 <Distancemarksvirtual | |
84 v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSVIRTUAL" | |
1996 | 85 @urlChanged="setUrl" |
86 @usernameChanged="setUsername" | |
87 @passwordChanged="setPassword" | |
88 :url="url" | |
89 :username="username" | |
90 :password="password" | |
1992 | 91 ></Distancemarksvirtual> |
92 <Faiwaydimensions | |
93 v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSION" | |
1996 | 94 @urlChanged="setUrl" |
95 @featureTypeChanged="setFeatureType" | |
96 @sortByChanged="setSortBy" | |
97 @LOSChanged="setLOS" | |
98 @depthChanged="setDepth" | |
99 @minWidthChanged="setMinWidth" | |
100 @maxWidthChanged="setMaxWidth" | |
101 @sourceOrganizationChanged="setSourceOrganization" | |
102 :url="url" | |
103 :featureType="featureType" | |
104 :sortBy="sortBy" | |
105 :LOS="LOS" | |
106 :minWidth="minWidth" | |
107 :maxWidth="maxWidth" | |
108 :sourceOrganization="sourceOrganization" | |
109 :depth="depth" | |
1992 | 110 ></Faiwaydimensions> |
111 <Gaugemeasurement | |
112 v-if="import_ == $options.IMPORTTYPES.GAUGEMEASUREMENT" | |
1996 | 113 @urlChanged="setUrl" |
114 :url="url" | |
1992 | 115 ></Gaugemeasurement> |
116 <Waterwayarea | |
117 v-if="import_ == $options.IMPORTTYPES.WATERWAYAREA" | |
1996 | 118 @urlChanged="setUrl" |
119 @featureTypeChanged="setFeatureType" | |
120 @sortByChanged="setSortBy" | |
121 :url="url" | |
122 :featureType="featureType" | |
123 :sortBy="sortBy" | |
1992 | 124 ></Waterwayarea> |
125 <Waterwaygauges | |
126 v-if="import_ == $options.IMPORTTYPES.WATERWAYGAUGES" | |
1996 | 127 @urlChanged="setUrl" |
128 @usernameChanged="setUsername" | |
129 @passwordChanged="setPassword" | |
130 :url="url" | |
131 :username="username" | |
132 :password="password" | |
1992 | 133 ></Waterwaygauges> |
134 <Waterwayaxis | |
135 v-if="import_ == $options.IMPORTTYPES.WATERWAYAXIS" | |
1996 | 136 @urlChanged="setUrl" |
137 @featureTypeChanged="setFeatureType" | |
138 @sortByChanged="setSortBy" | |
139 :url="url" | |
140 :featureType="featureType" | |
141 :sortBy="sortBy" | |
1992 | 142 ></Waterwayaxis> |
143 | |
1712
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
144 <div class="d-flex flex-row"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
145 <div class="flex-column mt-3 mr-4"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
146 <div class="flex-row text-left"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
147 <small class="text-muted"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
148 <translate>Scheduled</translate>? |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
149 </small> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
150 </div> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
151 <div class="flex-flex-row text-left"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
152 <toggle-button |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
153 v-model="scheduled" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
154 class="mt-2" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
155 :speed="100" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
156 :labels="{ |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
157 checked: this.$options.on, |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
158 unchecked: this.$options.off |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
159 }" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
160 :width="60" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
161 :height="30" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
162 /> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
163 </div> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
164 </div> |
1712
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
165 <div class="flex-column mt-3 mr-2"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
166 <div class="flex-row text-left"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
167 <small class="text-muted"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
168 <translate>Simple Schedule</translate> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
169 </small> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
170 </div> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
171 <div class="flex-flex-row text-left"> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
172 <toggle-button |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
173 :disabled="!scheduled" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
174 v-model="easyCron" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
175 class="mt-2" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
176 :speed="100" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
177 :labels="{ |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
178 checked: this.$options.on, |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
179 unchecked: this.$options.off |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
180 }" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
181 :width="60" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
182 :height="30" |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
183 /> |
1368e2a52c29
schedule_detail: scheduling last
Thomas Junk <thomas.junk@intevation.de>
parents:
1711
diff
changeset
|
184 </div> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
185 </div> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
186 </div> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
187 <div class="flex-column w-100 mr-2"> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
188 <div class="flex-row text-left"> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
189 <small class="text-muted"> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
190 <translate>Schedule</translate> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
191 </small> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
192 </div> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
193 <div v-if="easyCron" class="text-left w-50"> |
1707
74b66527ae81
feat: schedule toggle added to en-/disable scheduling for import
Thomas Junk <thomas.junk@intevation.de>
parents:
1613
diff
changeset
|
194 <select |
74b66527ae81
feat: schedule toggle added to en-/disable scheduling for import
Thomas Junk <thomas.junk@intevation.de>
parents:
1613
diff
changeset
|
195 :disabled="!scheduled" |
74b66527ae81
feat: schedule toggle added to en-/disable scheduling for import
Thomas Junk <thomas.junk@intevation.de>
parents:
1613
diff
changeset
|
196 v-model="simple" |
74b66527ae81
feat: schedule toggle added to en-/disable scheduling for import
Thomas Junk <thomas.junk@intevation.de>
parents:
1613
diff
changeset
|
197 class="form-control" |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
198 ><option value="weekly"><translate>Weekly</translate></option> |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
199 <option value="monthly"><translate>Monthly</translate></option> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
200 </select> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
201 </div> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
202 <div v-if="!easyCron" class="text-left w-100"> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
203 <div class="d-flex flex-row"> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
204 <h4 class="mt-auto mb-auto mr-2">{{ $options.EVERY }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
205 <select |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
206 :disabled="!scheduled" |
1571
b3f2d43f43e4
added 15minutes as custom value
Thomas Junk <thomas.junk@intevation.de>
parents:
1570
diff
changeset
|
207 style="width: 130px;" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
208 v-model="cronMode" |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
209 class="form-control" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
210 @change="clearInputs" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
211 > |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
212 <option |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
213 v-for="(option, key) in $options.CRONMODE" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
214 :value="key" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
215 :key="key" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
216 >{{ option }}</option |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
217 > |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
218 </select> |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
219 <div v-if="cronMode == 'hour'" class="ml-1 d-flex flex-row"> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
220 <h4 class="mt-auto mb-auto">{{ $options.ON }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
221 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
222 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
223 v-model="minutes" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
224 class="cronfield ml-1 mr-1 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
225 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
226 /> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
227 <h4 class="mt-auto mb-auto">{{ $options.MINUTESPAST }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
228 </div> |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
229 <div v-if="cronMode == 'day'" class="ml-1 d-flex flex-row"> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
230 <h4 class="mt-auto mb-auto">{{ $options.AT }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
231 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
232 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
233 v-model="hour" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
234 class="cronfield ml-1 mr-1 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
235 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
236 /> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
237 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
238 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
239 v-model="minutes" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
240 class="cronfield ml-1 mr-1 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
241 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
242 /> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
243 <h4 class="mt-auto mb-auto">{{ $options.OCLOCK }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
244 </div> |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
245 <div v-if="cronMode == 'week'" class="ml-1 d-flex flex-row"> |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
246 <h4 class="ml-1 mr-1 mt-auto mb-auto">{{ $options.ON }}</h4> |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
247 <select |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
248 :disabled="!scheduled" |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
249 v-model="day" |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
250 class="form-control" |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
251 > |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
252 <option |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
253 v-for="(option, key) in $options.DAYSOFWEEK" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
254 :key="key" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
255 :value="key" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
256 >{{ option }}</option |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
257 > |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
258 </select> |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
259 <h4 class="ml-1 mt-auto mb-auto">{{ $options.AT }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
260 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
261 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
262 v-model="hour" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
263 class="cronfield ml-1 mr-1 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
264 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
265 /> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
266 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
267 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
268 v-model="minutes" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
269 class="cronfield ml-1 mr-1 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
270 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
271 /> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
272 </div> |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
273 <div v-if="cronMode == 'month'" class="ml-1 d-flex flex-row"> |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
274 <h4 class="ml-1 mt-auto mb-auto">{{ $options.ON }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
275 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
276 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
277 v-model="dayOfMonth" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
278 class="cronfield ml-1 mr-1 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
279 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
280 /> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
281 <h4 class="mt-auto mb-auto">{{ $options.AT }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
282 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
283 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
284 v-model="hour" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
285 class="cronfield ml-1 mr-2 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
286 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
287 /> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
288 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
289 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
290 v-model="minutes" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
291 class="cronfield ml-1 mr-2 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
292 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
293 /> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
294 <h4 class="mt-auto mb-auto">{{ $options.OCLOCK }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
295 </div> |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
296 <div v-if="cronMode == 'year'" class="ml-1 d-flex flex-row"> |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
297 <h4 class="ml-1 mt-auto mb-auto">{{ $options.ON }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
298 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
299 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
300 v-model="dayOfMonth" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
301 class="cronfield ml-1 mr-1 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
302 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
303 /> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
304 <h4 class="mt-auto mb-auto">{{ $options.OF }}</h4> |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
305 <select |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
306 :disabled="!scheduled" |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
307 v-model="month" |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
308 class="ml-1 mr-1 form-control" |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
309 > |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
310 <option |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
311 v-for="(option, key) in $options.MONTHS" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
312 :value="key" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
313 :key="key" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
314 >{{ option }}</option |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
315 > |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
316 </select> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
317 <h4 class="mt-auto mb-auto">{{ $options.ON }}</h4> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
318 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
319 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
320 v-model="hour" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
321 class="cronfield ml-1 mr-1 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
322 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
323 /> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
324 <input |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
325 :disabled="!scheduled" |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
326 v-model="minutes" |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
327 class="cronfield ml-1 mr-1 form-control" |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
328 type="number" |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
329 /> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
330 </div> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
331 </div> |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
332 <div class="mt-3 w-50 d-flex flex-row"> |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
333 <h5 class="mt-auto mb-auto mr-2"> |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
334 <translate>Cronstring</translate> |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
335 </h5> |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
336 <input |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
337 :disabled="!scheduled" |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
338 class="form-control" |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
339 v-model="cronString" |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
340 type="text" |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
341 /> |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
342 </div> |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
343 </div> |
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
344 </div> |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
345 <button type="submit" class="shadow-sm btn btn-info submit-button"> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
346 <translate>Submit</translate> |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
347 </button> |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
348 <button |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
349 @click="triggerManualImport" |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
350 type="button" |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
351 class="shadow-sm btn btn-outline-info trigger" |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
352 :disabled="!triggerActive" |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
353 > |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
354 <font-awesome-icon |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
355 class="fa-fw mr-2" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
356 fixed-width |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
357 icon="play" |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
358 ></font-awesome-icon |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
359 ><translate>Trigger import</translate> |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
360 </button> |
1529 | 361 </form> |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
362 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
363 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
364 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
365 </template> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
366 |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
367 <script> |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
368 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
369 * without warranty, see README.md and license for details. |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
370 * |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
371 * SPDX-License-Identifier: AGPL-3.0-or-later |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
372 * License-Filename: LICENSES/AGPL-3.0.txt |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
373 * |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
374 * Copyright (C) 2018 by via donau |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
375 * – Österreichische Wasserstraßen-Gesellschaft mbH |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
376 * Software engineering by Intevation GmbH |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
377 * |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
378 * Author(s): |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
379 * Thomas Junk <thomas.junk@intevation.de> |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
380 */ |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
381 import { |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
382 IMPORTTYPES, |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
383 IMPORTTYPEKIND, |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
384 initializeCurrentSchedule |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
385 } from "@/store/imports.js"; |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
386 import { mapState } from "vuex"; |
1613
f2d24dceecc7
refac: cleanup import paths
Thomas Junk <thomas.junk@intevation.de>
parents:
1598
diff
changeset
|
387 import { displayInfo, displayError } from "@/lib/errors.js"; |
f2d24dceecc7
refac: cleanup import paths
Thomas Junk <thomas.junk@intevation.de>
parents:
1598
diff
changeset
|
388 import app from "@/main.js"; |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
389 |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
390 export default { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
391 name: "importscheduledetail", |
1992 | 392 components: { |
1996 | 393 Availablefairwaydepth: () => |
394 import("@/components/importschedule/importtypes/Availablefairwaydepth"), | |
395 Bottleneck: () => | |
396 import("@/components/importschedule/importtypes/Bottleneck"), | |
397 Distancemarksvirtual: () => | |
398 import("@/components/importschedule/importtypes/Distancemarksvirtual"), | |
399 Faiwaydimensions: () => | |
400 import("@/components/importschedule/importtypes/Fairwaydimensions"), | |
401 Gaugemeasurement: () => | |
402 import("@/components/importschedule/importtypes/Gaugemeasurement"), | |
403 Waterwayarea: () => | |
404 import("@/components/importschedule/importtypes/Waterwayarea"), | |
405 Waterwaygauges: () => | |
406 import("@/components/importschedule/importtypes/Waterwaygauges"), | |
407 Waterwayaxis: () => | |
408 import("@/components/importschedule/importtypes/Waterwayaxis") | |
1992 | 409 }, |
1529 | 410 data() { |
1953
3ccdd635d4fd
import schedule: password field instead of plaintext
Thomas Junk <thomas.junk@intevation.de>
parents:
1869
diff
changeset
|
411 return { |
3ccdd635d4fd
import schedule: password field instead of plaintext
Thomas Junk <thomas.junk@intevation.de>
parents:
1869
diff
changeset
|
412 passwordVisible: false, |
3ccdd635d4fd
import schedule: password field instead of plaintext
Thomas Junk <thomas.junk@intevation.de>
parents:
1869
diff
changeset
|
413 ...initializeCurrentSchedule() |
3ccdd635d4fd
import schedule: password field instead of plaintext
Thomas Junk <thomas.junk@intevation.de>
parents:
1869
diff
changeset
|
414 }; |
1529 | 415 }, |
1713
d4702b0ff15f
use IMPORTTYPES from store
Thomas Junk <thomas.junk@intevation.de>
parents:
1712
diff
changeset
|
416 IMPORTTYPES: IMPORTTYPES, |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
417 EVERY: app.$gettext("Every"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
418 MINUTESPAST: app.$gettext("minutes past"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
419 ON: app.$gettext("on"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
420 OF: app.$gettext("of"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
421 AT: app.$gettext("at"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
422 OCLOCK: app.$gettext("o' clock"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
423 CRONMODE: { |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
424 "15minutes": app.$gettext("15 minutes"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
425 hour: app.$gettext("hour"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
426 day: app.$gettext("day"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
427 week: app.$gettext("week"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
428 month: app.$gettext("month"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
429 year: app.$gettext("year") |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
430 }, |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
431 DAYSOFWEEK: { |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
432 1: app.$gettext("Monday"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
433 2: app.$gettext("Tuesday"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
434 3: app.$gettext("Wednesday"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
435 4: app.$gettext("Thursday"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
436 5: app.$gettext("Friday"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
437 6: app.$gettext("Saturday"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
438 0: app.$gettext("Sunday") |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
439 }, |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
440 MONTHS: { |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
441 1: app.$gettext("January"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
442 2: app.$gettext("February"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
443 3: app.$gettext("March"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
444 4: app.$gettext("April"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
445 5: app.$gettext("May"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
446 6: app.$gettext("June"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
447 7: app.$gettext("July"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
448 8: app.$gettext("August"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
449 9: app.$gettext("September"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
450 10: app.$gettext("October"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
451 11: app.$gettext("November"), |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
452 12: app.$gettext("December") |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
453 }, |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
454 mounted() { |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
455 this.initialize(); |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
456 }, |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
457 watch: { |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
458 cronMode() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
459 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
460 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
461 minutes() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
462 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
463 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
464 hour() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
465 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
466 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
467 month() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
468 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
469 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
470 day() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
471 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
472 }, |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
473 dayOfMonth() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
474 this.cronString = this.calcCronString(); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
475 }, |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
476 importScheduleDetailVisible() { |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
477 this.initialize(); |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
478 }, |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
479 cronString() { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
480 if (this.isWeekly(this.cronString)) { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
481 this.simple = "weekly"; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
482 } |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
483 if (this.isMonthly(this.cronString)) { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
484 this.simple = "monthly"; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
485 } |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
486 } |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
487 }, |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
488 computed: { |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
489 ...mapState("imports", ["importScheduleDetailVisible", "currentSchedule"]), |
1773
bd72d1a7ffe6
in edit case, the title shows import and its according id
Thomas Junk <thomas.junk@intevation.de>
parents:
1767
diff
changeset
|
490 dialogLabel() { |
bd72d1a7ffe6
in edit case, the title shows import and its according id
Thomas Junk <thomas.junk@intevation.de>
parents:
1767
diff
changeset
|
491 if (this.id) return this.$gettext("Import") + " " + this.id; |
bd72d1a7ffe6
in edit case, the title shows import and its according id
Thomas Junk <thomas.junk@intevation.de>
parents:
1767
diff
changeset
|
492 return this.$gettext("New Import"); |
1999
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
493 }, |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
494 isCredentialsRequired() { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
495 switch (this.import_) { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
496 case this.$options.IMPORTTYPES.WATERWAYGAUGES: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
497 case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
498 return true; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
499 default: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
500 return false; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
501 } |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
502 }, |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
503 isURLRequired() { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
504 switch (this.import_) { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
505 case this.$options.IMPORTTYPES.BOTTLENECK: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
506 case this.$options.IMPORTTYPES.WATERWAYAXIS: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
507 case this.$options.IMPORTTYPES.GAUGEMEASUREMENT: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
508 case this.$options.IMPORTTYPES.FAIRWAYAVAILABILITY: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
509 case this.$options.IMPORTTYPES.WATERWAYAREA: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
510 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
511 case this.$options.IMPORTTYPES.WATERWAYGAUGES: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
512 case this.$options.IMPORTTYPES.DISTANCEMARKSVIRTUAL: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
513 return true; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
514 default: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
515 return false; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
516 } |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
517 }, |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
518 isFeatureTypeRequired() { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
519 switch (this.import_) { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
520 case this.$options.IMPORTTYPES.WATERWAYAXIS: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
521 case this.$options.IMPORTTYPES.WATERWAYAREA: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
522 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
523 return true; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
524 default: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
525 return false; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
526 } |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
527 }, |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
528 isSortbyRequired() { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
529 switch (this.import_) { |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
530 case this.$options.IMPORTTYPES.WATERWAYAXIS: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
531 case this.$options.IMPORTTYPES.WATERWAYAREA: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
532 case this.$options.IMPORTTYPES.FAIRWAYDIMENSION: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
533 return true; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
534 default: |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
535 return false; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
536 } |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
537 } |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
538 }, |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
539 methods: { |
1996 | 540 setUrl(value) { |
541 this.url = value; | |
542 }, | |
543 setFeatureType(value) { | |
544 this.featureType = value; | |
545 }, | |
546 setSortBy(value) { | |
547 this.sortBy = value; | |
548 }, | |
549 setUsername(value) { | |
550 this.username = value; | |
551 }, | |
552 setPassword(value) { | |
553 this.password = value; | |
554 }, | |
555 setLOS(value) { | |
556 this.LOS = value; | |
557 }, | |
558 setMinWidth(value) { | |
559 this.minWidth = value; | |
560 }, | |
561 setMaxWidth(value) { | |
562 this.maxWidth = value; | |
563 }, | |
564 setDepth(value) { | |
565 this.depth = value; | |
566 }, | |
567 setSourceOrganization(value) { | |
568 this.sourceOrganization = value; | |
569 }, | |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
570 calcCronString() { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
571 let getValue = value => { |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
572 return this[value] ? this[value] : "*"; |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
573 }; |
1738
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
574 if (this.cronMode === "15minutes") return "0 */15 * * * *"; |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
575 const min = getValue("minutes"); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
576 const h = getValue("hour"); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
577 const dm = getValue("dayOfMonth"); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
578 const m = getValue("month"); |
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
579 const wd = getValue("day"); |
1738
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
580 return `0 ${min} ${h} ${dm} ${m} ${wd}`; |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
581 }, |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
582 validateBottleneckfields() { |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
583 return !!this.url; |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
584 }, |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
585 initialize() { |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
586 this.id = this.currentSchedule.id; |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
587 this.importType = this.currentSchedule.importType; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
588 this.schedule = this.currentSchedule.schedule; |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
589 this.scheduled = this.currentSchedule.scheduled; |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
590 this.import_ = this.currentSchedule.import_; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
591 this.importSource = this.currentSchedule.importSource; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
592 this.eMailNotification = this.currentSchedule.eMailNotification; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
593 this.easyCron = this.currentSchedule.easyCron; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
594 this.cronMode = this.currentSchedule.cronMode; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
595 this.minutes = this.currentSchedule.minutes; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
596 this.month = this.currentSchedule.month; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
597 this.hour = this.currentSchedule.hour; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
598 this.day = this.currentSchedule.day; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
599 this.dayOfMonth = this.currentSchedule.dayOfMonth; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
600 this.simple = this.currentSchedule.simple; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
601 this.url = this.currentSchedule.url; |
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
602 this.insecure = this.currentSchedule.insecure; |
1734
549337e6facd
importschedule: POC edit functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
1731
diff
changeset
|
603 this.cronString = this.currentSchedule.cronString; |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
604 this.featureType = this.currentSchedule.featureType; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
605 this.sortBy = this.currentSchedule.sortBy; |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
606 this.username = this.currentSchedule.username; |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
607 this.password = this.currentSchedule.password; |
1830
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
608 this.LOS = this.currentSchedule.LOS; |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
609 this.minWidth = this.currentSchedule.minWidth; |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
610 this.maxWidth = this.currentSchedule.maxWidth; |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
611 this.depth = this.currentSchedule.depth; |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
612 this.sourceOrganization = this.currentSchedule.sourceOrganization; |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
613 }, |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
614 isWeekly(cron) { |
1738
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
615 return /0 \d{1,2} \d{1,2} \* \* \d{1}/.test(cron); |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
616 }, |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
617 isMonthly(cron) { |
1738
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
618 return /0 \d{1,2} \d{1,2} \d{1,2} \* \*/.test(cron); |
1575
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
619 }, |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
620 clearInputs() { |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
621 this.minutes = null; |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
622 this.month = null; |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
623 this.hour = null; |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
624 this.day = null; |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
625 this.dayOfMonth = null; |
51f924cbac23
Feat: Importscheduler renamed to "unattended imports"
Thomas Junk <thomas.junk@intevation.de>
parents:
1571
diff
changeset
|
626 }, |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
627 triggerManualImport() { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
628 if (!this.triggerActive) return; |
1725
b24a54c684bd
importschedule: UI improvements
Thomas Junk <thomas.junk@intevation.de>
parents:
1724
diff
changeset
|
629 if (!this.import_) return; |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
630 let data = {}; |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
631 if (this.isURLRequired) { |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
632 if (!this.url) return; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
633 data["url"] = this.url; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
634 data["insecure"] = this.insecure; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
635 } |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
636 if (this.isFeatureTypeRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
637 if (!this.featureType) return; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
638 data["feature-type"] = this.featureType; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
639 } |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
640 if (this.isSortbyRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
641 if (!this.sortBy) return; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
642 data["sort-by"] = this.sortBy; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
643 } |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
644 if (this.isCredentialsRequired) { |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
645 if (!this.username || !this.password) return; |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
646 data["username"] = this.username; |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
647 data["password"] = this.password; |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
648 } |
1858
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
649 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) { |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
650 if ( |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
651 !this.LOS || |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
652 !this.minWidth || |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
653 !this.maxWidth || |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
654 !this.depth || |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
655 !this.sourceOrganization |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
656 ) |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
657 return; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
658 data["feature-type"] = this.featureType; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
659 data["sort-by"] = this.sortBy; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
660 data["los"] = this.LOS * 1; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
661 data["min-width"] = this.minWidth * 1; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
662 data["max-width"] = this.maxWidth * 1; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
663 data["depth"] = this.depth * 1; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
664 data["source-organization"] = this.sourceOrganization; |
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
665 } |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
666 this.triggerActive = false; |
1709
8ff8d873ef6b
refac: trigger manual import via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1707
diff
changeset
|
667 this.$store |
1713
d4702b0ff15f
use IMPORTTYPES from store
Thomas Junk <thomas.junk@intevation.de>
parents:
1712
diff
changeset
|
668 .dispatch("imports/triggerImport", { type: this.import_, data }) |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
669 .then(response => { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
670 const { id } = response.data; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
671 displayInfo({ |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
672 title: this.$gettext("Import"), |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
673 message: this.$gettext("Manually triggered import: #") + id |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
674 }); |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
675 }) |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
676 .catch(error => { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
677 const { status, data } = error.response; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
678 displayError({ |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
679 title: this.$gettext("Backend Error"), |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
680 message: `${status}: ${data.message || data}` |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
681 }); |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
682 }) |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
683 .finally(() => { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
684 this.triggerActive = true; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
685 }); |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
686 }, |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
687 save() { |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
688 const addAttribute = (data, attribute) => { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
689 if (!data["attributes"]) data.attributes = {}; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
690 data["attributes"] = { ...data["attributes"], ...attribute }; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
691 }; |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
692 if (!this.import_) return; |
1728
647195199dc8
importschedule: now with display of cron and delete function
Thomas Junk <thomas.junk@intevation.de>
parents:
1726
diff
changeset
|
693 let cron = this.cronString; |
647195199dc8
importschedule: now with display of cron and delete function
Thomas Junk <thomas.junk@intevation.de>
parents:
1726
diff
changeset
|
694 if (this.easyCron) { |
1738
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
695 if (this.simple === "weekly") cron = "0 0 0 * * 0"; |
8202d485331b
importschedule: set seconds constant 0
Thomas Junk <thomas.junk@intevation.de>
parents:
1736
diff
changeset
|
696 if (this.simple === "monthly") cron = "0 0 0 1 * *"; |
1728
647195199dc8
importschedule: now with display of cron and delete function
Thomas Junk <thomas.junk@intevation.de>
parents:
1726
diff
changeset
|
697 } |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
698 let data = {}; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
699 if (this.isURLRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
700 if (!this.url) return; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
701 data["url"] = this.url; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
702 addAttribute(data, { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
703 insecure: this.insecure + "" |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
704 }); |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
705 } |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
706 if (this.isSortbyRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
707 if (!this.sortBy) return; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
708 addAttribute(data, { |
1750 | 709 "sort-by": this.sortBy |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
710 }); |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
711 } |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
712 if (this.isFeatureTypeRequired) { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
713 if (!this.featureType) return; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
714 addAttribute(data, { |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
715 "feature-type": this.featureType |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
716 }); |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
717 } |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
718 if (this.isCredentialsRequired) { |
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
719 if (!this.username || !this.password) return; |
1830
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
720 addAttribute(data, { |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
721 username: this.username, |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
722 password: this.password |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
723 }); |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
724 } |
1858
108a049c8394
importqueue: fairwaydimensions removed typos. should work now
Thomas Junk <thomas.junk@intevation.de>
parents:
1857
diff
changeset
|
725 if (this.import_ == this.$options.IMPORTTYPES.FAIRWAYDIMENSION) { |
1830
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
726 if ( |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
727 !this.LOS || |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
728 !this.minWidth || |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
729 !this.maxWidth || |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
730 !this.depth || |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
731 !this.sourceOrganization |
f1ac917ec4a0
import fairwaydimensions: added fields. PLUS TRANSLATIONS
Thomas Junk <thomas.junk@intevation.de>
parents:
1791
diff
changeset
|
732 ) |
1857
9141abe7c75a
import fairwaydimensions: fields pushed/retrieved
Thomas Junk <thomas.junk@intevation.de>
parents:
1854
diff
changeset
|
733 return; |
1867
954a099425df
import: fairwaydimensions correct attribute names
Thomas Junk <thomas.junk@intevation.de>
parents:
1863
diff
changeset
|
734 const values = { |
1999
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
735 los: this.LOS * 1, |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
736 depth: this.depth * 1 |
1867
954a099425df
import: fairwaydimensions correct attribute names
Thomas Junk <thomas.junk@intevation.de>
parents:
1863
diff
changeset
|
737 }; |
1999
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
738 values["min-width"] = this.minWidth * 1; |
c420add2dec2
small errors fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
1998
diff
changeset
|
739 values["max-width"] = this.maxWidth * 1; |
1867
954a099425df
import: fairwaydimensions correct attribute names
Thomas Junk <thomas.junk@intevation.de>
parents:
1863
diff
changeset
|
740 values["source-organization"] = this.sourceOrganization; |
954a099425df
import: fairwaydimensions correct attribute names
Thomas Junk <thomas.junk@intevation.de>
parents:
1863
diff
changeset
|
741 addAttribute(data, values); |
1791
0f98ef2531a5
importschedule: frontend for waterway gauges etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1789
diff
changeset
|
742 } |
1747
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
743 if (this.scheduled) data["cron"] = cron; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
744 data["kind"] = IMPORTTYPEKIND[this.import_]; |
90178f4ce255
import waterway axis
Thomas Junk <thomas.junk@intevation.de>
parents:
1738
diff
changeset
|
745 data["send-email"] = this.eMailNotification; |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
746 if (!this.id) { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
747 this.$store |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
748 .dispatch("imports/saveCurrentSchedule", data) |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
749 .then(response => { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
750 const { id } = response.data; |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
751 displayInfo({ |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
752 title: this.$gettext("Import"), |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
753 message: this.$gettext("Saved import: #") + id |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
754 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
755 this.closeDetailview(); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
756 this.$store.dispatch("imports/loadSchedules").catch(error => { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
757 const { status, data } = error.response; |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
758 displayError({ |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
759 title: this.gettext("Backend Error"), |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
760 message: `${status}: ${data.message || data}` |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
761 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
762 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
763 }) |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
764 .catch(error => { |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
765 const { status, data } = error.response; |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
766 displayError({ |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
767 title: this.$gettext("Backend Error"), |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
768 message: `${status}: ${data.message || data}` |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
769 }); |
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
770 }); |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
771 } else { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
772 this.$store |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
773 .dispatch("imports/updateCurrentSchedule", { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
774 data: data, |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
775 id: this.id |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
776 }) |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
777 .then(response => { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
778 const { id } = response.data; |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
779 displayInfo({ |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
780 title: this.$gettext("Import"), |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
781 message: this.$gettext("update import: #") + id |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
782 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
783 this.closeDetailview(); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
784 this.$store.dispatch("imports/loadSchedules").catch(error => { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
785 const { status, data } = error.response; |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
786 displayError({ |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
787 title: this.gettext("Backend Error"), |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
788 message: `${status}: ${data.message || data}` |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
789 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
790 }); |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
791 }) |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
792 .catch(error => { |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
793 const { status, data } = error.response; |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
794 displayError({ |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
795 title: this.$gettext("Backend Error"), |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
796 message: `${status}: ${data.message || data}` |
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
797 }); |
1724
79a18eb1672b
import: POC import saveable
Thomas Junk <thomas.junk@intevation.de>
parents:
1714
diff
changeset
|
798 }); |
1731
8dd7452929ca
WIP: edit scheduled imports
Thomas Junk <thomas.junk@intevation.de>
parents:
1728
diff
changeset
|
799 } |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
800 }, |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
801 closeDetailview() { |
1714
1b25e7a3a92e
importschedule: manage initial data from detailsview via store
Thomas Junk <thomas.junk@intevation.de>
parents:
1713
diff
changeset
|
802 this.$store.commit("imports/clearCurrentSchedule"); |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
803 this.$store.commit("imports/setImportScheduleDetailInvisible"); |
1998
ceb6aaff6c8b
Backed out changeset 74c03fec0a91
Thomas Junk <thomas.junk@intevation.de>
parents:
1997
diff
changeset
|
804 } |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
805 }, |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
806 imports: [], |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
807 on: "on", |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
808 off: "off", |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
809 periods: { |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
810 DAILY: "daily", |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
811 MONTHLY: "monthly" |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
812 } |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
813 }; |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
814 </script> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
815 |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
816 <style lang="scss" scoped> |
1598
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
817 .cronfield { |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
818 width: 55px; |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
819 } |
4057b366db5f
unattended imports: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
1593
diff
changeset
|
820 |
1593
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
821 .importscheduledetailscard { |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
822 min-height: 550px; |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
823 } |
bbbc27a7ec99
unattended imports: manual trigger of import
Thomas Junk <thomas.junk@intevation.de>
parents:
1587
diff
changeset
|
824 |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
825 .importscheduledetails { |
1570
424793472f28
nice advanced schedule selection
Thomas Junk <thomas.junk@intevation.de>
parents:
1565
diff
changeset
|
826 width: 100%; |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
827 margin-top: $offset; |
1529 | 828 margin-right: $offset; |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1430
diff
changeset
|
829 } |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
830 |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
831 .trigger { |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
832 position: absolute; |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
833 left: $large-offset; |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
834 bottom: $offset; |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
835 } |
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
836 |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
837 .submit-button { |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
838 position: absolute; |
1586
3a30a6f4c96d
unattended imports: translations added
Thomas Junk <thomas.junk@intevation.de>
parents:
1576
diff
changeset
|
839 right: $large-offset; |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
840 bottom: $offset; |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1529
diff
changeset
|
841 } |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
842 </style> |