annotate client/src/components/importoverview/AdditionalLog.vue @ 3750:dbdef91a3ff3 infiniscroll

first implementation
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 20 Jun 2019 17:21:09 +0200
parents 91539caae611
children 7ca3b288ac5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
2 <div
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
3 :class="[
2886
9e849838d2e3 client: importoverview: formatted date in logs
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
4 'additionallog d-flex flex-column text-left',
2888
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
5 { split: showAdditional }
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
6 ]"
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
7 >
3750
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
8 <virtual-list :size="20" :remain="8">
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
9 <Item
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
10 class="d-flex flex-row px-2 border-top"
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
11 v-for="item in details.entries"
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
12 :key="item.time"
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
13 :line="item"
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
14 />
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
15 </virtual-list>
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
16 <!-- <div
2887
83acca8937de client: importoverview: improved log style
Markus Kottlaender <markus@intevation.de>
parents: 2886
diff changeset
17 class="d-flex flex-row px-2 border-top"
2732
0ab7985ef008 import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2727
diff changeset
18 v-for="(line, index) in details.entries"
0ab7985ef008 import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2727
diff changeset
19 :key="index"
0ab7985ef008 import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2727
diff changeset
20 >
2708
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2703
diff changeset
21 <span
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
22 :class="[
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
23 'kind',
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
24 {
2703
c887666b110f import_overview: increase log fontsize. errors in log are marked red
Thomas Junk <thomas.junk@intevation.de>
parents: 2685
diff changeset
25 'text-danger': /error/.test(line.kind),
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
26 'text-warning': /warn/.test(line.kind),
2703
c887666b110f import_overview: increase log fontsize. errors in log are marked red
Thomas Junk <thomas.junk@intevation.de>
parents: 2685
diff changeset
27 'font-weight-bold': /warn|error/.test(line.kind)
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
28 }
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
29 ]"
2708
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2703
diff changeset
30 >{{ line.kind.toUpperCase() }}</span
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
31 >
2708
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2703
diff changeset
32 <span
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
33 :class="[
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
34 'time',
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
35 {
2703
c887666b110f import_overview: increase log fontsize. errors in log are marked red
Thomas Junk <thomas.junk@intevation.de>
parents: 2685
diff changeset
36 'text-danger': /error/.test(line.kind),
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
37 'text-warning': /warn/.test(line.kind),
2703
c887666b110f import_overview: increase log fontsize. errors in log are marked red
Thomas Junk <thomas.junk@intevation.de>
parents: 2685
diff changeset
38 'font-weight-bold': /warn|error/.test(line.kind)
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
39 }
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
40 ]"
2886
9e849838d2e3 client: importoverview: formatted date in logs
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
41 >{{ line.time | dateTime }}</span
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
42 >
2708
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2703
diff changeset
43 <span
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
44 :class="[
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
45 'message',
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
46 {
2703
c887666b110f import_overview: increase log fontsize. errors in log are marked red
Thomas Junk <thomas.junk@intevation.de>
parents: 2685
diff changeset
47 'text-danger': /error/.test(line.kind),
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
48 'text-warning': /warn/.test(line.kind),
2703
c887666b110f import_overview: increase log fontsize. errors in log are marked red
Thomas Junk <thomas.junk@intevation.de>
parents: 2685
diff changeset
49 'font-weight-bold': /warn|error/.test(line.kind)
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
50 }
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
51 ]"
2708
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2703
diff changeset
52 >{{ line.message }}</span
2674
b219ca1514f4 overview2: highlight warnings in logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
53 >
3750
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
54 </div> -->
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
55 </div>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
56 </template>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
57
2888
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
58 <style lang="sass" scoped>
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
59 .additionallog
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
60 overflow-y: auto
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
61 &.split
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
62 max-height: 35vh
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
63
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
64 > div
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
65 &:not(:first-child)
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
66 border-top-style: dashed !important
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
67
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
68 &:hover
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
69 background-color: #fcfcfc
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
70 </style>
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
71
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72 <script>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
73 /* This is Free Software under GNU Affero General Public License v >= 3.0
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
74 * without warranty, see README.md and license for details.
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
75 *
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
76 * SPDX-License-Identifier: AGPL-3.0-or-later
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
77 * License-Filename: LICENSES/AGPL-3.0.txt
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
78 *
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
79 * Copyright (C) 2018 by via donau
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
80 * – Österreichische Wasserstraßen-Gesellschaft mbH
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
81 * Software engineering by Intevation GmbH
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
82 *
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
83 * Author(s):
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
84 * Thomas Junk <thomas.junk@intevation.de>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
85 */
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
86 import { mapState } from "vuex";
3750
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
87 import virtualList from "vue-virtual-scroll-list";
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
88
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
89 export default {
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
90 name: "additionallogs",
3750
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
91 components: {
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
92 "virtual-list": virtualList,
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
93 Item: () => import("./LogItem.vue")
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
94 },
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
95 computed: {
2732
0ab7985ef008 import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2727
diff changeset
96 ...mapState("imports", ["showAdditional", "details"])
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2732
diff changeset
97 }
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
98 };
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
99 </script>