annotate client/src/components/importoverview/AdditionalLog.vue @ 5267:aca4bf7af270

client: remove mapState from import statement
author Fadi Abbud <fadi.abbud@intevation.de>
date Wed, 10 Jun 2020 16:33:10 +0200
parents 7ca3b288ac5e
children da3fd4c3d1b5
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 >
3755
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
8 <virtual-list :size="scrollistConfig.size" :remain="scrollistConfig.remain">
3750
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>
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
16 </div>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
17 </template>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
18
2888
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
19 <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
20 .additionallog
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
21 overflow-y: auto
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
22 &.split
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
23 max-height: 35vh
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
24
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
25 > div
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
26 &:not(:first-child)
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
27 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
28
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
29 &:hover
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
30 background-color: #fcfcfc
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
31 </style>
65766706cdf4 client: importoverview: moved style block below template and converted to sass
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
32
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
33 <script>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
34 /* 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
35 * without warranty, see README.md and license for details.
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
36 *
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
37 * SPDX-License-Identifier: AGPL-3.0-or-later
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
38 * License-Filename: LICENSES/AGPL-3.0.txt
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
39 *
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
40 * Copyright (C) 2018 by via donau
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
41 * – Österreichische Wasserstraßen-Gesellschaft mbH
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
42 * Software engineering by Intevation GmbH
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
43 *
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
44 * Author(s):
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
45 * Thomas Junk <thomas.junk@intevation.de>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
46 */
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
47 import { mapState } from "vuex";
3750
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
48 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
49
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
50 export default {
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
51 name: "additionallogs",
3750
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
52 components: {
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
53 "virtual-list": virtualList,
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
54 Item: () => import("./LogItem.vue")
dbdef91a3ff3 first implementation
Thomas Junk <thomas.junk@intevation.de>
parents: 2949
diff changeset
55 },
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
56 computed: {
3755
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
57 ...mapState("imports", ["showAdditional", "details"]),
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
58 scrollistConfig() {
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
59 const smallLayout = {
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
60 size: 10,
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
61 remain: 20
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
62 };
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
63 const largeLayout = {
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
64 size: 12,
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
65 remain: 22
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
66 };
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
67 if (this.showAdditional) return smallLayout;
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
68 return largeLayout;
7ca3b288ac5e virtual_scrolling: size parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 3750
diff changeset
69 }
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2732
diff changeset
70 }
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
71 };
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72 </script>