annotate client/src/components/importconfiguration/types/ScheduledImports.vue @ 2985:1b8bb4f89227

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