annotate client/src/components/importoverview/LogDetail.vue @ 2647:c52bf6f994c0

overview2: bottleneckview added
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 14 Mar 2019 14:07:25 +0100
parents 13377f2a5c42
children 39a05f8c34e6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
2 <div>
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
3 <div class="d-flex fex-row">
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
4 <div v-if="hasAdditionalInfo">
2601
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
5 <font-awesome-icon
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
6 v-if="entry.id === showAdditional"
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
7 @click="toggleAdditionalInfo"
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
8 class="my-auto mr-1 text-info pointer"
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
9 icon="angle-down"
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
10 fixed-width
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
11 ></font-awesome-icon>
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
12 <font-awesome-icon
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
13 v-if="entry.id !== showAdditional"
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
14 @click="toggleAdditionalInfo"
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
15 class="my-auto mr-1 text-info pointer"
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
16 icon="angle-right"
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
17 fixed-width
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
18 ></font-awesome-icon>
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
19 <span class="text-info"><translate>Additional Info</translate></span>
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
20 <span class="text-info" v-if="isApprovedGaugeMeasurement">
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
21 ({{ entry.summary.length }})</span
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
22 >
2647
c52bf6f994c0 overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
23 <span v-if="isBottleneck" class="text-info text-left">
c52bf6f994c0 overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
24 ({{ entry.summary.bottlenecks.length }})</span
c52bf6f994c0 overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
25 >
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
26 <span class="text-left" v-if="isFairwayDimension"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
27 >{{ entry.summary["source-organization"] }} (LOS:
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
28 {{ entry.summary.los }})</span
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
29 >
2601
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
30 </div>
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
31 <StretchDetail v-if="isStretch" :entry="entry"></StretchDetail>
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
32 <SoundingResultDetail
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
33 :entry="entry"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
34 v-if="isSoundingResult"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
35 ></SoundingResultDetail>
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
36 </div>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
37 <AdditionalDetail
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
38 v-if="entry.id === showAdditional"
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
39 class="ml-2 d-flex flex-row"
2597
02d5de05291f overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2594
diff changeset
40 :entry="entry"
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
41 ></AdditionalDetail>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
42 <div class="d-flex fex-row">
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
43 <font-awesome-icon
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
44 v-if="entry.id === showLogs"
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
45 @click="toggleAdditionalLogging"
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
46 class="my-auto mr-1 text-info pointer"
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
47 icon="angle-down"
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
48 fixed-width
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
49 ></font-awesome-icon>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
50 <font-awesome-icon
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
51 v-if="entry.id !== showLogs"
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
52 @click="toggleAdditionalLogging"
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
53 class="my-auto mr-1 text-info pointer"
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
54 icon="angle-right"
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
55 fixed-width
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
56 ></font-awesome-icon>
2601
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
57 <span class="text-info"><translate>Logs</translate></span>
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
58 </div>
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
59
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
60 <AdditionalLog
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
61 v-if="entry.id === showLogs"
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
62 class="ml-4 d-flex flex-row mr-1"
2597
02d5de05291f overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2594
diff changeset
63 :entry="entry"
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
64 ></AdditionalLog>
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
65 </div>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
66 </template>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
67
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
68 <script>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
69 /* This is Free Software under GNU Affero General Public License v >= 3.0
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
70 * without warranty, see README.md and license for details.
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
71 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72 * SPDX-License-Identifier: AGPL-3.0-or-later
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
73 * License-Filename: LICENSES/AGPL-3.0.txt
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
74 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
75 * Copyright (C) 2018 by via donau
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
76 * – Österreichische Wasserstraßen-Gesellschaft mbH
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
77 * Software engineering by Intevation GmbH
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
78 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
79 * Author(s):
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
80 * Thomas Junk <thomas.junk@intevation.de>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
81 */
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
82
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
83 import { mapState } from "vuex";
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
84
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
85 export default {
2593
956b230c6062 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2592
diff changeset
86 name: "logdetail",
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
87 props: ["entry"],
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
88 components: {
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
89 SoundingResultDetail: () => import("./SoundingResultDetail.vue"),
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
90 StretchDetail: () => import("./StretchDetails.vue"),
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
91 AdditionalDetail: () => import("./AdditionalDetail.vue"),
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
92 AdditionalLog: () => import("./AdditionalLog.vue")
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
93 },
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
94 methods: {
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
95 toggleAdditionalInfo() {
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
96 if (this.entry.id === this.showAdditional) {
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
97 this.$store.commit("imports/hideAdditionalInfo");
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
98 } else {
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
99 this.$store.commit("imports/showAdditionalInfoFor", this.entry.id);
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
100 }
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
101 },
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
102 toggleAdditionalLogging() {
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
103 if (this.entry.id === this.showLogs) {
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
104 this.$store.commit("imports/hideAdditionalLogs");
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
105 } else {
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
106 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id);
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
107 }
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
108 }
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
109 },
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
110 computed: {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
111 ...mapState("imports", ["showAdditional", "showLogs"]),
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
112 kind() {
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
113 return this.entry.kind.toUpperCase();
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
114 },
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
115 hasAdditionalInfo() {
2647
c52bf6f994c0 overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
116 return (
c52bf6f994c0 overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
117 this.entry.state == "pending" &&
c52bf6f994c0 overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
118 (this.isApprovedGaugeMeasurement || this.isBottleneck)
c52bf6f994c0 overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
119 );
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
120 },
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
121 isFairwayDimension() {
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
122 return this.kind === "FD";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
123 },
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
124 isApprovedGaugeMeasurement() {
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
125 return this.kind === "AGM";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
126 },
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
127 isBottleneck() {
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
128 return this.kind === "BN" || this.kind === "UBN";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
129 },
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
130 isStretch() {
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
131 return this.kind === "ST";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
132 },
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
133 isSoundingResult() {
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
134 return this.kind === "SR";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
135 }
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
136 }
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
137 };
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
138 </script>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
139
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
140 <style lang="scss" scoped></style>