Mercurial > gemma
annotate client/src/components/importoverview/LogEntry.vue @ 5629:84d01a536bec 729-node-js-newer-version
Transformed scss and sass styles into css
author | Luisa Beerboom <lbeerboom@intevation.de> |
---|---|
date | Thu, 11 May 2023 13:23:52 +0200 |
parents | 9f0830a1845d |
children |
rev | line source |
---|---|
2579 | 1 <template> |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
2 <div class="row w-100 no-gutters text-left"> |
4877
e89c1140f0a8
import_review: display review buttons in same line in firefox
Thomas Junk <thomas.junk@intevation.de>
parents:
4869
diff
changeset
|
3 <div style="width: 70px;" class="table-cell d-flex justify-content-between"> |
2902
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
4 <UISpinnerButton |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
5 @click="toggleDetails" |
2902
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
6 :loading="loading" |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
7 :state="entry.id === show" |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
8 :icons="['angle-right', 'angle-down']" |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
9 /> |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
10 {{ entry.id }} |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
11 </div> |
4981
9f0830a1845d
squashed the total layout to enable display of long fm importnames
Thomas Junk <thomas.junk@intevation.de>
parents:
4915
diff
changeset
|
12 <div style="width: 125px;" class="table-cell center"> |
4915
db134712519b
import overview remove fm prefix from import kind to circumvent layout problems
Thomas Junk <thomas.junk@intevation.de>
parents:
4877
diff
changeset
|
13 {{ entry.kind.replace("fm_", "").toUpperCase() }} |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
14 </div> |
4915
db134712519b
import overview remove fm prefix from import kind to circumvent layout problems
Thomas Junk <thomas.junk@intevation.de>
parents:
4877
diff
changeset
|
15 <div style="width: 135px;" class="table-cell center"> |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
16 {{ entry.enqueued | dateTime }} |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
17 </div> |
3506
e2ed741545e1
import_overview: added country column
Thomas Junk <thomas.junk@intevation.de>
parents:
3066
diff
changeset
|
18 <div style="width: 80px;" class="table-cell truncate"> |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
19 {{ entry.user }} |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
20 </div> |
4915
db134712519b
import overview remove fm prefix from import kind to circumvent layout problems
Thomas Junk <thomas.junk@intevation.de>
parents:
4877
diff
changeset
|
21 <div style="width: 50px;" class="table-cell center"> |
3506
e2ed741545e1
import_overview: added country column
Thomas Junk <thomas.junk@intevation.de>
parents:
3066
diff
changeset
|
22 {{ userCountries[entry.user] }} |
e2ed741545e1
import_overview: added country column
Thomas Junk <thomas.junk@intevation.de>
parents:
3066
diff
changeset
|
23 </div> |
e2ed741545e1
import_overview: added country column
Thomas Junk <thomas.junk@intevation.de>
parents:
3066
diff
changeset
|
24 <div style="width: 80px;" class="table-cell truncate"> |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
25 {{ entry.signer }} |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
26 </div> |
3005
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
27 <div style="width: 72px;" :class="stateStyle"> |
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
28 {{ entry.state }} |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
29 </div> |
4774
1fd771b08ced
import_overview: added 'changed' column
Thomas Junk <thomas.junk@intevation.de>
parents:
4447
diff
changeset
|
30 <div style="width: 138px;" class="table-cell center"> |
1fd771b08ced
import_overview: added 'changed' column
Thomas Junk <thomas.junk@intevation.de>
parents:
4447
diff
changeset
|
31 {{ entry.changed | dateTime }} |
1fd771b08ced
import_overview: added 'changed' column
Thomas Junk <thomas.junk@intevation.de>
parents:
4447
diff
changeset
|
32 </div> |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
33 <div style="width: 44px;" class="table-cell center"> |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
34 <font-awesome-icon |
4447
725bdc6a9d38
import_overview: mark imports with errors with a red warning sign instead of yellow
Thomas Junk <thomas.junk@intevation.de>
parents:
4368
diff
changeset
|
35 v-if="entry.warnings || entry.errors" |
725bdc6a9d38
import_overview: mark imports with errors with a red warning sign instead of yellow
Thomas Junk <thomas.junk@intevation.de>
parents:
4368
diff
changeset
|
36 :class="{ |
725bdc6a9d38
import_overview: mark imports with errors with a red warning sign instead of yellow
Thomas Junk <thomas.junk@intevation.de>
parents:
4368
diff
changeset
|
37 'text-warning': entry.warnings && !entry.errors, |
725bdc6a9d38
import_overview: mark imports with errors with a red warning sign instead of yellow
Thomas Junk <thomas.junk@intevation.de>
parents:
4368
diff
changeset
|
38 'text-danger': entry.errors |
725bdc6a9d38
import_overview: mark imports with errors with a red warning sign instead of yellow
Thomas Junk <thomas.junk@intevation.de>
parents:
4368
diff
changeset
|
39 }" |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
40 icon="exclamation-triangle" |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
41 fixed-width |
2919
6c5364ff0abb
client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
42 /> |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
43 </div> |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
44 <div style="flex-grow: 1; padding: 0;" class="table-cell text-right"> |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
45 <button |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
46 :class="['action approved', { active: isApproved }]" |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
47 @click="toggleApproval($options.STATES.APPROVED)" |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
48 v-if="entry.state === 'pending'" |
2720
305af1e2975d
client: table headers: improved component to accept specific widths for columns
Markus Kottlaender <markus@intevation.de>
parents:
2699
diff
changeset
|
49 > |
2919
6c5364ff0abb
client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
50 <font-awesome-icon class="small pointer" icon="check" /> |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
51 </button> |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
52 <button |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
53 :class="['action rejected', { active: isRejected }]" |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
54 @click="toggleApproval($options.STATES.REJECTED)" |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
55 v-if="entry.state === 'pending'" |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
56 > |
2919
6c5364ff0abb
client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
57 <font-awesome-icon icon="times" class="small pointer" /> |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
58 </button> |
2592 | 59 </div> |
2579 | 60 </div> |
61 </template> | |
62 | |
5629
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
63 <style scoped> |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
64 .action { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
65 height: 100%; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
66 width: 50%; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
67 border: 0; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
68 background: white; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
69 outline: none; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
70 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
71 .action.approved { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
72 color: green; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
73 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
74 .action.approved.active, |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
75 .action.approved:hover { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
76 color: white; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
77 background: green; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
78 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
79 .action.rejected { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
80 border-left: 1px solid #dee2e6; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
81 color: red; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
82 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
83 .action.rejected.active, |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
84 .action.rejected:hover { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
85 color: white; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
86 background: red; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
87 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
88 |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
89 .active .action { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
90 background-color: #d2eaee; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
91 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
92 .active .action.rejected { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
93 border-left: solid 1px rgba(255, 255, 255, 0.3); |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
4981
diff
changeset
|
94 } |
2720
305af1e2975d
client: table headers: improved component to accept specific widths for columns
Markus Kottlaender <markus@intevation.de>
parents:
2699
diff
changeset
|
95 </style> |
305af1e2975d
client: table headers: improved component to accept specific widths for columns
Markus Kottlaender <markus@intevation.de>
parents:
2699
diff
changeset
|
96 |
2579 | 97 <script> |
2592 | 98 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
99 * without warranty, see README.md and license for details. | |
100 * | |
101 * SPDX-License-Identifier: AGPL-3.0-or-later | |
102 * License-Filename: LICENSES/AGPL-3.0.txt | |
103 * | |
3065
f6eae0b6c221
Client: fix license header for LogEntry.vue
Bernhard Reiter <bernhard@intevation.de>
parents:
3005
diff
changeset
|
104 * Copyright (C) 2018, 2019 by via donau |
2592 | 105 * – Österreichische Wasserstraßen-Gesellschaft mbH |
106 * Software engineering by Intevation GmbH | |
107 * | |
108 * Author(s): | |
3065
f6eae0b6c221
Client: fix license header for LogEntry.vue
Bernhard Reiter <bernhard@intevation.de>
parents:
3005
diff
changeset
|
109 * * Thomas Junk <thomas.junk@intevation.de> |
f6eae0b6c221
Client: fix license header for LogEntry.vue
Bernhard Reiter <bernhard@intevation.de>
parents:
3005
diff
changeset
|
110 * * Markus Kottländer <markus.kottlaender@intevation.de> |
2592 | 111 */ |
3506
e2ed741545e1
import_overview: added country column
Thomas Junk <thomas.junk@intevation.de>
parents:
3066
diff
changeset
|
112 import { mapState, mapGetters } from "vuex"; |
2985
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2919
diff
changeset
|
113 import { STATES } from "@/store/imports"; |
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2919
diff
changeset
|
114 import { displayError } from "@/lib/errors"; |
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2919
diff
changeset
|
115 import { HTTP } from "@/lib/http"; |
2592 | 116 |
2579 | 117 export default { |
2881
44c6551511c1
client: importoverview: fixed review buttons
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
118 STATES, |
2875
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
119 props: ["entry"], |
2902
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
120 data() { |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
121 return { |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
122 loading: false |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
123 }; |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
124 }, |
2875
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
125 computed: { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
126 ...mapState("imports", ["show"]), |
3506
e2ed741545e1
import_overview: added country column
Thomas Junk <thomas.junk@intevation.de>
parents:
3066
diff
changeset
|
127 ...mapGetters("usermanagement", ["userCountries"]), |
3005
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
128 stateStyle() { |
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
129 return [ |
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
130 "table-cell", |
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
131 "center", |
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
132 { |
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
133 "text-danger": this.entry.state === "failed", |
3066
e22ad52cc252
client: cleanup styling for LogEntry.vue a bit
Bernhard Reiter <bernhard@intevation.de>
parents:
3065
diff
changeset
|
134 "font-weight-bolder": this.entry.state === "running" |
3005
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
135 } |
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
136 ]; |
870d2a0e866b
import_overview: improved style calculus
Thomas Junk <thomas.junk@intevation.de>
parents:
3004
diff
changeset
|
137 }, |
2875
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
138 needsApproval() { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
139 return this.entry.status === STATES.NEEDSAPPROVAL; |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
140 }, |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
141 isRejected() { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
142 return this.entry.status === STATES.REJECTED; |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
143 }, |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
144 isApproved() { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
145 return this.entry.status === STATES.APPROVED; |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
146 } |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
147 }, |
2592 | 148 methods: { |
149 toggleApproval(state) { | |
150 this.$store.commit("imports/toggleApprove", { | |
151 id: this.entry.id, | |
152 newStatus: state | |
153 }); | |
154 }, | |
155 toggleDetails() { | |
156 const { id } = this.entry; | |
157 if (id === this.show) { | |
158 this.$store.commit("imports/hideDetails"); | |
2597 | 159 this.$store.commit("imports/hideAdditionalInfo"); |
160 this.$store.commit("imports/hideAdditionalLogs"); | |
4368
e9d2573329da
import_overview: make layer for review togglable (currently only for development visible)
Thomas Junk <thomas.junk@intevation.de>
parents:
3506
diff
changeset
|
161 this.$store.commit("map/reviewActive", false); |
2592 | 162 } else { |
2902
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
163 this.loading = true; |
2799
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
164 HTTP.get("/imports/" + this.entry.id, { |
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
165 headers: { "X-Gemma-Auth": localStorage.getItem("token") } |
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
166 }) |
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
167 .then(response => { |
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
168 this.$store.commit("imports/showDetailsFor", id); |
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
169 this.$store.commit("imports/setCurrentDetails", response.data); |
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
170 }) |
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
171 .catch(error => { |
4869
6b054b91d9b2
backend not reachable as error message etd. Login adjusted
Thomas Junk <thomas.junk@intevation.de>
parents:
4868
diff
changeset
|
172 let message = "Backend not reachable"; |
4868
008bc1ae8897
exception handling
Thomas Junk <thomas.junk@intevation.de>
parents:
4774
diff
changeset
|
173 if (error.response) { |
008bc1ae8897
exception handling
Thomas Junk <thomas.junk@intevation.de>
parents:
4774
diff
changeset
|
174 const { status, data } = error.response; |
008bc1ae8897
exception handling
Thomas Junk <thomas.junk@intevation.de>
parents:
4774
diff
changeset
|
175 message = `${status}: ${data.message || data}`; |
008bc1ae8897
exception handling
Thomas Junk <thomas.junk@intevation.de>
parents:
4774
diff
changeset
|
176 } |
2799
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
177 displayError({ |
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
178 title: this.$gettext("Backend Error"), |
4868
008bc1ae8897
exception handling
Thomas Junk <thomas.junk@intevation.de>
parents:
4774
diff
changeset
|
179 message: message |
2799
e19fac818aab
import_overview: specifying single imports via URL should open the overview with all logentries of the according hour and open the details for the specified import
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
180 }); |
2902
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
181 }) |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2881
diff
changeset
|
182 .finally(() => (this.loading = false)); |
2592 | 183 } |
184 } | |
2875
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2874
diff
changeset
|
185 } |
2579 | 186 }; |
187 </script> |