annotate client/src/components/importoverview/LogEntry.vue @ 3004:0d74727725d3

import_overview: one failed is enough
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 11 Apr 2019 10:00:03 +0200
parents 85d1f3e94945
children 870d2a0e866b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2579
5295a182b4a4 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
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">
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
3 <div style="width: 79px;" 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>
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
12 <div style="width: 53px;" class="table-cell center">
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
13 {{ entry.kind.toUpperCase() }}
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
14 </div>
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
15 <div style="width: 138px;" class="table-cell center">
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>
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
18 <div style="width: 105px;" class="table-cell truncate">
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>
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
21 <div style="width: 105px;" class="table-cell truncate">
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
22 {{ entry.signer }}
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
23 </div>
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
24 <div style="width: 72px;" class="table-cell center">
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
25 <span v-if="entry.state === 'failed'" class="text-danger">
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
26 {{ entry.state }}
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
27 </span>
3000
85d1f3e94945 client: Print import status 'running' bold in review list.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2985
diff changeset
28 <span v-if="entry.state === 'running'" class="text-bold">
85d1f3e94945 client: Print import status 'running' bold in review list.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2985
diff changeset
29 {{ entry.state }}
85d1f3e94945 client: Print import status 'running' bold in review list.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2985
diff changeset
30 </span>
3004
0d74727725d3 import_overview: one failed is enough
Thomas Junk <thomas.junk@intevation.de>
parents: 3000
diff changeset
31 <span v-if="entry.state !== 'running' && entry.state !== 'failed'">{{
0d74727725d3 import_overview: one failed is enough
Thomas Junk <thomas.junk@intevation.de>
parents: 3000
diff changeset
32 entry.state
0d74727725d3 import_overview: one failed is enough
Thomas Junk <thomas.junk@intevation.de>
parents: 3000
diff changeset
33 }}</span>
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
34 </div>
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
35 <div style="width: 44px;" class="table-cell center">
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
36 <font-awesome-icon
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
37 v-if="entry.warnings"
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
38 class="text-warning"
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
39 icon="exclamation-triangle"
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
40 fixed-width
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
41 />
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
42 </div>
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
43 <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
44 <button
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
45 :class="['action approved', { active: isApproved }]"
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
46 @click="toggleApproval($options.STATES.APPROVED)"
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
47 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
48 >
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
49 <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
50 </button>
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 :class="['action rejected', { active: isRejected }]"
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
53 @click="toggleApproval($options.STATES.REJECTED)"
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
54 v-if="entry.state === 'pending'"
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
55 >
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
56 <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
57 </button>
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
58 </div>
2579
5295a182b4a4 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
59 </div>
5295a182b4a4 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
60 </template>
5295a182b4a4 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
61
2720
305af1e2975d client: table headers: improved component to accept specific widths for columns
Markus Kottlaender <markus@intevation.de>
parents: 2699
diff changeset
62 <style lang="sass" scoped>
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
63 .action
2874
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
64 height: 100%
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
65 width: 50%
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
66 border: 0
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
67 background: white
2874
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
68 outline: none
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
69 &.approved
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
70 color: green
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
71 &.active,
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
72 &:hover
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
73 color: white
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
74 background: green
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
75 &.rejected
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
76 border-left: 1px solid #dee2e6
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
77 color: red
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
78 &.active,
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
79 &:hover
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
80 color: white
b9a6abef9f1c client: more unified table layout
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
81 background: red
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
82 .active
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
83 .action
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
84 background-color: #d2eaee
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
85 &.rejected
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
86 border-left: solid 1px rgba(255, 255, 255, 0.3)
3000
85d1f3e94945 client: Print import status 'running' bold in review list.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2985
diff changeset
87 .text-bold
85d1f3e94945 client: Print import status 'running' bold in review list.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2985
diff changeset
88 font-weight: bold
2720
305af1e2975d client: table headers: improved component to accept specific widths for columns
Markus Kottlaender <markus@intevation.de>
parents: 2699
diff changeset
89 </style>
305af1e2975d client: table headers: improved component to accept specific widths for columns
Markus Kottlaender <markus@intevation.de>
parents: 2699
diff changeset
90
2579
5295a182b4a4 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
91 <script>
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
92 /* This is Free Software under GNU Affero General Public License v >= 3.0
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
93 * without warranty, see README.md and license for details.
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
94 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
95 * SPDX-License-Identifier: AGPL-3.0-or-later
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
96 * License-Filename: LICENSES/AGPL-3.0.txt
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
97 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
98 * Copyright (C) 2018 by via donau
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
99 * – Österreichische Wasserstraßen-Gesellschaft mbH
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
100 * Software engineering by Intevation GmbH
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
101 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
102 * Author(s):
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
103 * Thomas Junk <thomas.junk@intevation.de>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
104 */
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
105 import { mapState } from "vuex";
2985
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2919
diff changeset
106 import { STATES } from "@/store/imports";
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2919
diff changeset
107 import { displayError } from "@/lib/errors";
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2919
diff changeset
108 import { HTTP } from "@/lib/http";
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
109
2579
5295a182b4a4 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
110 export default {
2881
44c6551511c1 client: importoverview: fixed review buttons
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
111 STATES,
2875
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
112 props: ["entry"],
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2881
diff changeset
113 data() {
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2881
diff changeset
114 return {
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2881
diff changeset
115 loading: false
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2881
diff changeset
116 };
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2881
diff changeset
117 },
2875
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
118 computed: {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
119 ...mapState("imports", ["show"]),
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
120 needsApproval() {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
121 return this.entry.status === STATES.NEEDSAPPROVAL;
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
122 },
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
123 isRejected() {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
124 return this.entry.status === STATES.REJECTED;
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
125 },
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
126 isApproved() {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
127 return this.entry.status === STATES.APPROVED;
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
128 }
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
129 },
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
130 methods: {
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
131 toggleApproval(state) {
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
132 this.$store.commit("imports/toggleApprove", {
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
133 id: this.entry.id,
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
134 newStatus: state
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
135 });
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
136 },
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
137 toggleDetails() {
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
138 const { id } = this.entry;
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
139 if (id === this.show) {
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
140 this.$store.commit("imports/hideDetails");
2597
02d5de05291f overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2594
diff changeset
141 this.$store.commit("imports/hideAdditionalInfo");
02d5de05291f overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2594
diff changeset
142 this.$store.commit("imports/hideAdditionalLogs");
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
143 } else {
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2881
diff changeset
144 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
145 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
146 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
147 })
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
148 .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
149 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
150 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
151 })
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
152 .catch(error => {
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
153 const { status, data } = error.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
154 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
155 title: this.$gettext("Backend Error"),
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
156 message: `${status}: ${data.message || 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
157 });
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2881
diff changeset
158 })
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2881
diff changeset
159 .finally(() => (this.loading = false));
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
160 }
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2579
diff changeset
161 }
2875
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2874
diff changeset
162 }
2579
5295a182b4a4 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
163 };
5295a182b4a4 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
164 </script>