annotate client/src/components/importoverview/importlogs/Logs.vue @ 2427:171ea4b5e8dc

staging_area: more space for logs
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 28 Feb 2019 16:52:45 +0100
parents 77baf4f0ee1e
children 78d4ce079f9b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2422
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
2 <div class="w-95">
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
3 <div class="text-left"><h2>Logs</h2></div>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
4 <div class="d-flex justify-content-between flex-row">
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
5 <button @click="setFilter('failed')" :class="failedStyle">
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
6 <translate>Failed</translate>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
7 </button>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
8 <button @click="setFilter('pending')" :class="pendingStyle">
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
9 <translate>Pending</translate>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
10 </button>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
11 <button @click="setFilter('rejected')" :class="rejectedStyle">
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
12 <translate>Rejected</translate>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
13 </button>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
14 <button @click="setFilter('accepted')" :class="acceptedStyle">
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
15 <translate>Accepted</translate>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
16 </button>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
17 <button @click="setFilter('warning')" :class="warningStyle">
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
18 <translate>Warning</translate>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
19 </button>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
20 </div>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
21 <div class="logdetails">
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
22 <div v-for="job in imports" :key="job.id" class="d-flex flex-row">
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
23 <LogDetail :job="job"></LogDetail>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
24 </div>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
25 </div>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
26 </div>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
27 </template>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
28
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
29 <script>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
30 /* This is Free Software under GNU Affero General Public License v >= 3.0
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
31 * without warranty, see README.md and license for details.
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
32 *
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
33 * SPDX-License-Identifier: AGPL-3.0-or-later
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
34 * License-Filename: LICENSES/AGPL-3.0.txt
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
35 *
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
36 * Copyright (C) 2018 by via donau
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
37 * – Österreichische Wasserstraßen-Gesellschaft mbH
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
38 * Software engineering by Intevation GmbH
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
39 *
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
40 * Author(s):
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
41 * Thomas Junk <thomas.junk@intevation.de>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
42 */
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
43
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
44 import { mapState } from "vuex";
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
45
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
46 export default {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
47 name: "logsection",
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
48 components: {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
49 LogDetail: () => import("./LogDetail.vue")
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
50 },
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
51 data() {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
52 return {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
53 failed: false,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
54 pending: false,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
55 rejected: false,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
56 accepted: false,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
57 warning: false
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
58 };
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
59 },
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
60 computed: {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
61 ...mapState("imports", ["imports"]),
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
62 pendingStyle() {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
63 return {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
64 btn: true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
65 "btn-sm": true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
66 "btn-light": !this.pending,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
67 "btn-info": this.pending
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
68 };
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
69 },
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
70 failedStyle() {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
71 return {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72 btn: true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
73 "btn-sm": true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
74 "btn-light": !this.failed,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
75 "btn-info": this.failed
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
76 };
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
77 },
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
78 rejectedStyle() {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
79 return {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
80 btn: true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
81 "btn-sm": true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
82 "btn-light": !this.rejected,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
83 "btn-info": this.rejected
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
84 };
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
85 },
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
86 acceptedStyle() {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
87 return {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
88 btn: true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
89 "btn-sm": true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
90 "btn-light": !this.accepted,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
91 "btn-info": this.accepted
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
92 };
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
93 },
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
94 warningStyle() {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
95 return {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
96 btn: true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
97 "btn-sm": true,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
98 "btn-light": !this.warning,
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
99 "btn-info": this.warning
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
100 };
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
101 }
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
102 },
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
103 methods: {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
104 setFilter(name) {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
105 this[name] = !this[name];
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
106 const allSet =
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
107 this.failed &&
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
108 this.pending &&
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
109 this.accepted &&
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
110 this.rejected &&
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
111 this.warning;
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
112 if (allSet) {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
113 this.warning = false;
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
114 this.successful = false;
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
115 this.failed = false;
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
116 this.pending = false;
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
117 this.accepted = false;
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
118 this.rejected = false;
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
119 }
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
120 }
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
121 }
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
122 };
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
123 </script>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
124
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
125 <style lang="scss" scoped>
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
126 .logdetails {
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
127 overflow-y: auto;
2427
171ea4b5e8dc staging_area: more space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2422
diff changeset
128 height: 650px;
2422
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
129 }
77baf4f0ee1e logs->importlogs due to .hgignore
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
130 </style>