Mercurial > gemma
annotate client/src/components/importoverview/AdditionalLog.vue @ 2647:c52bf6f994c0
overview2: bottleneckview added
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 14 Mar 2019 14:07:25 +0100 |
parents | 13377f2a5c42 |
children | b219ca1514f4 |
rev | line source |
---|---|
2594 | 1 <template> |
2599 | 2 <div class="additionallog d-flex flex-column text-left"> |
2597 | 3 <div class="d-flex flex-row" v-for="(line, index) in logLines" :key="index"> |
2599 | 4 <small class="kind">{{ line.kind }}</small> |
5 <small class="time">{{ line.time }}</small> | |
6 <small class="message">{{ line.message }}</small> | |
2597 | 7 </div> |
2594 | 8 </div> |
9 </template> | |
10 | |
11 <script> | |
12 /* This is Free Software under GNU Affero General Public License v >= 3.0 | |
13 * without warranty, see README.md and license for details. | |
14 * | |
15 * SPDX-License-Identifier: AGPL-3.0-or-later | |
16 * License-Filename: LICENSES/AGPL-3.0.txt | |
17 * | |
18 * Copyright (C) 2018 by via donau | |
19 * – Österreichische Wasserstraßen-Gesellschaft mbH | |
20 * Software engineering by Intevation GmbH | |
21 * | |
22 * Author(s): | |
23 * Thomas Junk <thomas.junk@intevation.de> | |
24 */ | |
2597 | 25 import { displayError } from "@/lib/errors.js"; |
26 import { HTTP } from "@/lib/http.js"; | |
27 | |
2594 | 28 export default { |
29 name: "additionallogs", | |
2597 | 30 props: ["entry"], |
31 data() { | |
32 return { | |
33 logLines: [] | |
34 }; | |
35 }, | |
36 methods: { | |
37 loadEntries() { | |
38 HTTP.get("/imports/" + this.entry.id, { | |
39 headers: { "X-Gemma-Auth": localStorage.getItem("token") } | |
40 }) | |
41 .then(response => { | |
42 const { entries } = response.data; | |
43 this.logLines = entries; | |
44 }) | |
45 .catch(error => { | |
46 const { status, data } = error.response; | |
47 displayError({ | |
48 title: this.$gettext("Backend Error"), | |
49 message: `${status}: ${data.message || data}` | |
50 }); | |
51 }); | |
52 } | |
53 }, | |
54 mounted() { | |
55 this.loadEntries(); | |
56 } | |
2594 | 57 }; |
58 </script> | |
59 | |
2599 | 60 <style lang="scss" scoped> |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2599
diff
changeset
|
61 .additionallog { |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2599
diff
changeset
|
62 width: 600px; |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2599
diff
changeset
|
63 max-height: 20vh; |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2599
diff
changeset
|
64 overflow-y: auto; |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2599
diff
changeset
|
65 } |
2599 | 66 .kind { |
67 width: 30px; | |
68 } | |
69 .time { | |
70 width: 150px; | |
71 } | |
72 </style> |