annotate client/src/components/importoverview/LogDetail.vue @ 4340:4d0a09ae0828

STSH: Review
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 06 Sep 2019 11:15:49 +0200
parents 45307cf4931a
children 8c0f2377ff47
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>
2882
6538ee93df72 client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents: 2875
diff changeset
2 <div>
2727
0fe0b3f1720f client: import overview: several style fixes
Markus Kottlaender <markus@intevation.de>
parents: 2718
diff changeset
3 <div
2925
ce148a7fb896 client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents: 2919
diff changeset
4 class="d-flex border-bottom"
2727
0fe0b3f1720f client: import overview: several style fixes
Markus Kottlaender <markus@intevation.de>
parents: 2718
diff changeset
5 style="padding-left: 3px;"
3358
c0c880553cd5 client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents: 2985
diff changeset
6 v-if="hasAdditionalInfo || isST || isSEC || isSR"
2727
0fe0b3f1720f client: import overview: several style fixes
Markus Kottlaender <markus@intevation.de>
parents: 2718
diff changeset
7 >
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
8 <div v-if="hasAdditionalInfo">
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
9 <UISpinnerButton
2601
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
10 @click="toggleAdditionalInfo"
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
11 :state="entry.id === showAdditional"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
12 :icons="['angle-right', 'angle-down']"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
13 class="text-info d-inline-block"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
14 />
2601
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
15 <span class="text-info"><translate>Additional Info</translate></span>
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
16 <span class="text-info" v-if="isAGM && details.summary">
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
17 ({{ details.summary.length }})
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
18 </span>
2733
4ae3453fcf50 import_review: fixed minor state bugs
Thomas Junk <thomas.junk@intevation.de>
parents: 2732
diff changeset
19 <span
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
20 v-if="isBN && details.summary && details.summary.bottlenecks"
2733
4ae3453fcf50 import_review: fixed minor state bugs
Thomas Junk <thomas.junk@intevation.de>
parents: 2732
diff changeset
21 class="text-info text-left"
4ae3453fcf50 import_review: fixed minor state bugs
Thomas Junk <thomas.junk@intevation.de>
parents: 2732
diff changeset
22 >
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
23 ({{ details.summary.bottlenecks.length }})
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
24 </span>
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
25 <span class="text-left" v-if="isFD">
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
26 {{ details.summary["source-organization"] }}
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
27 (LOS: {{ details.summary.los }})
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
28 </span>
2601
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
29 </div>
3358
c0c880553cd5 client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents: 2985
diff changeset
30 <SectionDetails v-if="isSEC && isPending" :entry="entry" />
c0c880553cd5 client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents: 2985
diff changeset
31 <StretchDetails v-if="isST && isPending" :entry="entry" />
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
32 <SoundingResultDetail :entry="entry" v-if="isSR && isPending" />
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
33 </div>
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
34 <div
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
35 v-if="entry.id === showAdditional && isPending && (isFD || isAGM || isBN)"
2925
ce148a7fb896 client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents: 2919
diff changeset
36 class="d-flex border-bottom"
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
37 >
4336
45307cf4931a Review of fairway dimensions
Thomas Junk <thomas.junk@intevation.de>
parents: 3358
diff changeset
38 <FairwayDimensionDetail :summary="details.summary" v-if="isFD" />
2944
73f537379203 client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents: 2927
diff changeset
39 <ApprovedGaugeMeasurementDetail v-if="isAGM" />
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
40 <BottleneckDetail :entry="entry" v-if="isBN" />
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
41 </div>
2925
ce148a7fb896 client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents: 2919
diff changeset
42 <div class="d-flex" style="padding-left: 3px;">
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
43 <UISpinnerButton
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
44 @click="toggleAdditionalLogging"
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
45 :state="entry.id === showLogs"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
46 :icons="['angle-right', 'angle-down']"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
47 classes="text-info"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
48 />
2601
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
49 <span class="text-info"><translate>Logs</translate></span>
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
50 </div>
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2917
diff changeset
51 <AdditionalLog v-if="entry.id === showLogs" class="d-flex flex-row" />
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
52 </div>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
53 </template>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
54
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
55 <script>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
56 /* 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
57 * without warranty, see README.md and license for details.
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
58 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
59 * SPDX-License-Identifier: AGPL-3.0-or-later
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
60 * License-Filename: LICENSES/AGPL-3.0.txt
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
61 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
62 * Copyright (C) 2018 by via donau
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
63 * – Österreichische Wasserstraßen-Gesellschaft mbH
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
64 * Software engineering by Intevation GmbH
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
65 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
66 * Author(s):
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
67 * Thomas Junk <thomas.junk@intevation.de>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
68 */
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
69
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
70 import { mapState } from "vuex";
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
71
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72 export default {
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
73 components: {
2985
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2944
diff changeset
74 SoundingResultDetail: () => import("./SoundingResultDetail"),
3358
c0c880553cd5 client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents: 2985
diff changeset
75 StretchDetails: () => import("./StretchDetails"),
c0c880553cd5 client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents: 2985
diff changeset
76 SectionDetails: () => import("./SectionDetails"),
2985
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2944
diff changeset
77 FairwayDimensionDetail: () => import("./FairwayDimensionDetail"),
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
78 ApprovedGaugeMeasurementDetail: () =>
2985
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2944
diff changeset
79 import("./ApprovedGaugeMeasurementDetail"),
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2944
diff changeset
80 BottleneckDetail: () => import("./BottleneckDetail"),
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2944
diff changeset
81 AdditionalLog: () => import("./AdditionalLog")
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
82 },
2875
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
83 props: ["entry"],
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
84 computed: {
2733
4ae3453fcf50 import_review: fixed minor state bugs
Thomas Junk <thomas.junk@intevation.de>
parents: 2732
diff changeset
85 ...mapState("imports", ["showAdditional", "showLogs", "details"]),
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
86 kind() {
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
87 return this.entry.kind.toUpperCase();
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
88 },
2776
a0b63e2fca99 import_overview: only display additional info when state of current entry is pending
Thomas Junk <thomas.junk@intevation.de>
parents: 2736
diff changeset
89 isPending() {
a0b63e2fca99 import_overview: only display additional info when state of current entry is pending
Thomas Junk <thomas.junk@intevation.de>
parents: 2736
diff changeset
90 return this.entry.state == "pending";
a0b63e2fca99 import_overview: only display additional info when state of current entry is pending
Thomas Junk <thomas.junk@intevation.de>
parents: 2736
diff changeset
91 },
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
92 hasAdditionalInfo() {
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
93 return this.isPending && (this.isAGM || this.isBN);
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
94 },
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
95 isFD() {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
96 return this.kind === "FD";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
97 },
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
98 isAGM() {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
99 return this.kind === "AGM";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
100 },
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
101 isBN() {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
102 return this.kind === "BN" || this.kind === "UBN";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
103 },
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
104 isST() {
4340
4d0a09ae0828 STSH: Review
Thomas Junk <thomas.junk@intevation.de>
parents: 4336
diff changeset
105 return this.kind === "STSH";
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
106 },
3358
c0c880553cd5 client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents: 2985
diff changeset
107 isSEC() {
c0c880553cd5 client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents: 2985
diff changeset
108 return this.kind === "SEC";
c0c880553cd5 client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents: 2985
diff changeset
109 },
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
110 isSR() {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
111 return this.kind === "SR";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
112 }
2875
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
113 },
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
114 methods: {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
115 toggleAdditionalInfo() {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
116 if (this.entry.id === this.showAdditional) {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
117 this.$store.commit("imports/hideAdditionalInfo");
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
118 } else {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
119 this.$store.commit("imports/showAdditionalInfoFor", this.entry.id);
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
120 }
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
121 },
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
122 toggleAdditionalLogging() {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
123 if (this.entry.id === this.showLogs) {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
124 this.$store.commit("imports/hideAdditionalLogs");
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
125 } else {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
126 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id);
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
127 }
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
128 }
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
129 },
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
130 mounted() {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
131 if (this.entry.state === "pending") {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
132 this.$store.commit("imports/showAdditionalInfoFor", this.entry.id);
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
133 }
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
134 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id);
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
135 }
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
136 };
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
137 </script>