annotate client/src/components/importoverview/ApprovedGaugeMeasurementDetail.vue @ 2914:84a40983bb9f

client: importsoverview: improved opening mechanism for additional details
author Markus Kottlaender <markus@intevation.de>
date Wed, 03 Apr 2019 12:55:32 +0200
parents 399b03e59411
children ce148a7fb896
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2602
5d0e5159190f overview2: detail components for unified log
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="{
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
4 diffs: true,
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2732
diff changeset
5 full: !showLogs,
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2732
diff changeset
6 split: showLogs
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
7 }"
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
8 >
2685
39a05f8c34e6 import_overview: Refactoring of detailed information.
Thomas Junk <thomas.junk@intevation.de>
parents: 2658
diff changeset
9 <div v-for="(result, index) in details.summary" :key="index">
2658
74031fbd3d50 import_overview. AGM details detailbutton on the left
Thomas Junk <thomas.junk@intevation.de>
parents: 2609
diff changeset
10 <div class="pl-2 d-flex flex-row">
2914
84a40983bb9f client: importsoverview: improved opening mechanism for additional details
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
11 <div @click="toggleDiff(index)" class="my-auto text-left">
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2882
diff changeset
12 <UISpinnerButton
2914
84a40983bb9f client: importsoverview: improved opening mechanism for additional details
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
13 :state="showDiff === index"
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2882
diff changeset
14 :icons="['angle-right', 'angle-down']"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2882
diff changeset
15 class="text-info"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2882
diff changeset
16 />
2658
74031fbd3d50 import_overview. AGM details detailbutton on the left
Thomas Junk <thomas.junk@intevation.de>
parents: 2609
diff changeset
17 </div>
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
18 <span v-if="result.versions.length == 1" class="agmcode text-left"
2708
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2697
diff changeset
19 ><div>
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2697
diff changeset
20 {{ result["fk-gauge-id"] }} <translate>( New )</translate>
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2697
diff changeset
21 </div></span
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
22 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
23 <span v-if="result.versions.length == 2" class="agmcode text-left"
2708
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2697
diff changeset
24 ><div>{{ result["fk-gauge-id"] }}</div></span
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
25 >
2697
8279c044c04b import_overview: AGM formatting of entries
Thomas Junk <thomas.junk@intevation.de>
parents: 2685
diff changeset
26 <span class="text-left"
2708
cefef8234d27 import_overview: larger fonts for log and details
Thomas Junk <thomas.junk@intevation.de>
parents: 2697
diff changeset
27 ><div>{{ result["measure-date"] | dateTime }}</div></span
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
28 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
29 </div>
2914
84a40983bb9f client: importsoverview: improved opening mechanism for additional details
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
30 <div v-if="showDiff === index" class="pl-3 d-flex flex-row">
2609
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
31 <div class="w-100">
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
32 <div class="d-flex flex-row pl-3 text-left">
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
33 <div class="header border-bottom agmdetailskeys">
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
34 <small><translate>Value</translate></small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
35 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
36 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
37 v-if="result.versions.length == 2"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
38 class="header border-bottom agmdetailsvalues"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
39 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
40 <small><translate>Old</translate></small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
41 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
42 <div class="header border-bottom agmdetailsvalues">
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
43 <small><translate>New</translate></small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
44 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
45 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
46 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
47 class="d-flex flex-row pl-3 text-left"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
48 v-for="(entry, index) in Object.keys(result.versions[0])"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
49 :key="index"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
50 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
51 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
52 v-if="
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
53 result.versions.length == 1 ||
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
54 result.versions[0][entry] != result.versions[1][entry]
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
55 "
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
56 class="agmdetailskeys"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
57 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
58 <small>{{ entry }}</small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
59 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
60 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
61 v-if="
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
62 result.versions.length == 1 ||
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
63 result.versions[0][entry] != result.versions[1][entry]
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
64 "
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
65 class="agmdetailsvalues"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
66 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
67 <small>{{ result.versions[0][entry] }}</small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
68 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
69 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
70 v-if="
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
71 result.versions.length == 2 &&
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
72 result.versions[0][entry] != result.versions[1][entry]
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
73 "
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
74 class="agmdetailsvalues"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
75 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
76 <small>{{ result.versions[1][entry] }}</small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
77 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
78 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
79 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
80 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
81 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
82 </div>
2602
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
83 </template>
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
84
2882
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
85 <style lang="sass" scoped>
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
86 .diffs
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
87 width: 100%
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
88 max-height: 20vh
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
89 overflow-y: auto
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
90
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
91 .agmcode
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
92 width: 35%
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
93
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
94 .agmdetailskeys
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
95 width: 33%
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
96
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
97 .agmdetailsvalues
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
98 width: 33%
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
99
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
100 .split
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
101 max-height: 35vh
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
102
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
103 .full
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
104 max-height: 70vh
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
105 </style>
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2880
diff changeset
106
2602
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
107 <script>
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
108 /* This is Free Software under GNU Affero General Public License v >= 3.0
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
109 * without warranty, see README.md and license for details.
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
110 *
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
111 * SPDX-License-Identifier: AGPL-3.0-or-later
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
112 * License-Filename: LICENSES/AGPL-3.0.txt
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
113 *
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
114 * Copyright (C) 2018 by via donau
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
115 * – Österreichische Wasserstraßen-Gesellschaft mbH
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
116 * Software engineering by Intevation GmbH
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
117 *
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
118 * Author(s):
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
119 * Thomas Junk <thomas.junk@intevation.de>
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
120 */
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
121 import { mapState } from "vuex";
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
122
2602
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
123 export default {
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
124 name: "agmdetails",
2732
0ab7985ef008 import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
125 props: ["entry"],
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
126 data() {
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
127 return {
2914
84a40983bb9f client: importsoverview: improved opening mechanism for additional details
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
128 showDiff: 0 // open first item by default
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
129 };
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
130 },
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
131 computed: {
2732
0ab7985ef008 import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
132 ...mapState("imports", ["showLogs", "details"])
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2708
diff changeset
133 },
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
134 methods: {
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
135 toggleDiff(number) {
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2732
diff changeset
136 if (this.showDiff !== number) {
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
137 this.showDiff = number;
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
138 } else {
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2732
diff changeset
139 this.showDiff = false;
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
140 }
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
141 }
2880
c40540889b53 client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents: 2732
diff changeset
142 }
2602
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
143 };
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
144 </script>