Mercurial > gemma
annotate client/src/components/importoverview/ImportOverview.vue @ 2579:5295a182b4a4
overview2 WIP
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 11 Mar 2019 15:53:31 +0100 |
parents | d9e1db955d49 |
children | 0d2650dd8f62 |
rev | line source |
---|---|
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
2 <div class="overview"> |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
3 <UIBoxHeader |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
4 icon="clipboard-check" |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
5 title="Staging Area" |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
6 :closeCallback="$parent.close" |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
7 /> |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
8 <div class="d-flex flex-row w-100 justify-content-end"> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
9 <button |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
10 class="btn btn-sm btn-outline-info align-self-start mr-3" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
11 @click="refresh" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
12 > |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
13 <font-awesome-icon icon="redo"></font-awesome-icon> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
14 </button> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
15 </div> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
16 <div class="d-flex flex-row w-100 border-bottom"> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
17 <font-awesome-icon |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
18 class="pointer" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
19 @click="toggleStaging()" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
20 v-if="stagingVisible && staging.length > 0" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
21 icon="angle-up" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
22 fixed-width |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
23 ></font-awesome-icon> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
24 <font-awesome-icon |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
25 class="pointer" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
26 @click="toggleStaging()" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
27 v-if="!stagingVisible && staging.length > 0" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
28 icon="angle-down" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
29 fixed-width |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
30 ></font-awesome-icon> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
31 <span style="width:1.25em;" v-if="!(staging.length > 0)"></span> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
32 <Staging v-if="stagingVisible && staging.length > 0"></Staging> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
33 <div v-else class="d-flex flex-row"> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
34 <h6> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
35 <small><translate>Review</translate></small> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
36 </h6> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
37 <small class="ml-3" v-if="!(staging.length > 0)" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
38 ><translate>Nothing to review</translate></small |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
39 > |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
40 </div> |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
41 </div> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
42 <div class="mt-2"> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
43 <div class="d-flex flex-row"> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
44 <font-awesome-icon |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
45 class="pointer" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
46 @click="toggleLogs()" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
47 v-if="logsVisible" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
48 icon="angle-up" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
49 fixed-width |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
50 ></font-awesome-icon> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
51 <font-awesome-icon |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
52 class="pointer" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
53 @click="toggleLogs()" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
54 v-if="!logsVisible" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
55 icon="angle-down" |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
56 fixed-width |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
57 ></font-awesome-icon> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
58 <Logs v-if="logsVisible" :reload="reload"></Logs> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
59 <div v-else> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
60 <h6> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
61 <small><translate>Logs</translate></small> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
62 </h6> |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
63 </div> |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
64 </div> |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
65 </div> |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
66 </div> |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
67 </template> |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
68 |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
69 <script> |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
70 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
71 * without warranty, see README.md and license for details. |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
72 * |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
73 * SPDX-License-Identifier: AGPL-3.0-or-later |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
74 * License-Filename: LICENSES/AGPL-3.0.txt |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
75 * |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
76 * Copyright (C) 2018 by via donau |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
77 * – Österreichische Wasserstraßen-Gesellschaft mbH |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
78 * Software engineering by Intevation GmbH |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
79 * |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
80 * Author(s): |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
81 * Thomas Junk <thomas.junk@intevation.de> |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
82 */ |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
83 import { displayError } from "@/lib/errors.js"; |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
84 import { mapState } from "vuex"; |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
85 |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
86 export default { |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
87 name: "importoverview", |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
88 data() { |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
89 return { |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
90 reload: false |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
91 }; |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
92 }, |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
93 components: { |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
94 Staging: () => import("./staging/Staging.vue"), |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
95 Logs: () => import("./importlogs/Logs.vue") |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
96 }, |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
97 computed: { |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
98 ...mapState("imports", ["stagingVisible", "logsVisible", "staging"]) |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
99 }, |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
100 methods: { |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
101 toggleStaging() { |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
102 this.$store.commit("imports/setStagingVisibility", !this.stagingVisible); |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
103 }, |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
104 toggleLogs() { |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
105 this.$store.commit("imports/setLogsVisibility", !this.logsVisible); |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
106 }, |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
107 refresh() { |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
108 this.reload = true; |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
109 this.loadImportQueue(); |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
110 this.loadLogs(); |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
111 }, |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
112 loadImportQueue() { |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
113 this.$store |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
114 .dispatch("imports/getStaging") |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
115 .then(() => { |
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
116 this.reload = false; |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
117 }) |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
118 .catch(error => { |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
119 const { status, data } = error.response; |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
120 displayError({ |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
121 title: "Backend Error", |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
122 message: `${status}: ${data.message || data}` |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
123 }); |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
124 }); |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
125 }, |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
126 loadLogs() { |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
127 this.$store |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
128 .dispatch("imports/getImports") |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
129 .then(() => { |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
130 this.reload = false; |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
131 }) |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
132 .catch(error => { |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
133 const { status, data } = error.response; |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
134 displayError({ |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
135 title: this.$gettext("Backend Error"), |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
136 message: `${status}: ${data.message || data}` |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
137 }); |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
138 }); |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
139 } |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
140 }, |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
141 mounted() { |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
142 this.refresh(); |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
143 } |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
144 }; |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
145 </script> |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
146 |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
147 <style lang="scss" scoped> |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
148 .overview { |
2559
d9e1db955d49
Backed out changeset 91c68153e7b6
Thomas Junk <thomas.junk@intevation.de>
parents:
2557
diff
changeset
|
149 max-height: 850px; |
2543
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
150 overflow-y: auto; |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
151 } |
a542045f28a6
staging: imports/overview2 alternative implementation
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
152 </style> |