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>
|
|
61 .kind {
|
|
62 width: 30px;
|
|
63 }
|
|
64 .time {
|
|
65 width: 150px;
|
|
66 }
|
|
67 </style>
|