annotate client/src/components/importoverview/LogDetail.vue @ 2945:ab771ea5e4fe

client: importoverview: improved display of date interval
author Markus Kottlaender <markus@intevation.de>
date Fri, 05 Apr 2019 10:37:58 +0200
parents 73f537379203
children 1b8bb4f89227
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;"
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
6 v-if="hasAdditionalInfo || isST || 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>
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
30 <StretchDetail v-if="isST && isPending" :entry="entry" />
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
31 <SoundingResultDetail :entry="entry" v-if="isSR && isPending" />
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
32 </div>
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
33 <div
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
34 v-if="entry.id === showAdditional && isPending && (isFD || isAGM || isBN)"
2925
ce148a7fb896 client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents: 2919
diff changeset
35 class="d-flex border-bottom"
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
36 >
2944
73f537379203 client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents: 2927
diff changeset
37 <FairwayDimensionDetail v-if="isFD" />
73f537379203 client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents: 2927
diff changeset
38 <ApprovedGaugeMeasurementDetail v-if="isAGM" />
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
39 <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
40 </div>
2925
ce148a7fb896 client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents: 2919
diff changeset
41 <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
42 <UISpinnerButton
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
43 @click="toggleAdditionalLogging"
2902
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
44 :state="entry.id === showLogs"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
45 :icons="['angle-right', 'angle-down']"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
46 classes="text-info"
399b03e59411 client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents: 2887
diff changeset
47 />
2601
b9523d876d01 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2599
diff changeset
48 <span class="text-info"><translate>Logs</translate></span>
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
49 </div>
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2917
diff changeset
50 <AdditionalLog v-if="entry.id === showLogs" class="d-flex flex-row" />
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
51 </div>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
52 </template>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
53
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
54 <script>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
55 /* 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
56 * without warranty, see README.md and license for details.
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
57 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
58 * SPDX-License-Identifier: AGPL-3.0-or-later
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
59 * License-Filename: LICENSES/AGPL-3.0.txt
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
60 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
61 * Copyright (C) 2018 by via donau
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
62 * – Österreichische Wasserstraßen-Gesellschaft mbH
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
63 * Software engineering by Intevation GmbH
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
64 *
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
65 * Author(s):
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
66 * Thomas Junk <thomas.junk@intevation.de>
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
67 */
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
68
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
69 import { mapState } from "vuex";
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
70
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
71 export default {
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
72 components: {
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2605
diff changeset
73 SoundingResultDetail: () => import("./SoundingResultDetail.vue"),
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
74 StretchDetail: () => import("./StretchDetails.vue"),
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
75 FairwayDimensionDetail: () => import("./FairwayDimensionDetail.vue"),
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
76 ApprovedGaugeMeasurementDetail: () =>
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
77 import("./ApprovedGaugeMeasurementDetail.vue"),
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
78 BottleneckDetail: () => import("./BottleneckDetail.vue"),
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
79 AdditionalLog: () => import("./AdditionalLog.vue")
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
80 },
2875
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
81 props: ["entry"],
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
82 computed: {
2733
4ae3453fcf50 import_review: fixed minor state bugs
Thomas Junk <thomas.junk@intevation.de>
parents: 2732
diff changeset
83 ...mapState("imports", ["showAdditional", "showLogs", "details"]),
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
84 kind() {
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
85 return this.entry.kind.toUpperCase();
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
86 },
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
87 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
88 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
89 },
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
90 hasAdditionalInfo() {
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
91 return this.isPending && (this.isAGM || this.isBN);
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
92 },
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
93 isFD() {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
94 return this.kind === "FD";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
95 },
2917
edc2633c3cc6 client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents: 2902
diff changeset
96 isAGM() {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
97 return this.kind === "AGM";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
98 },
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
99 isBN() {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
100 return this.kind === "BN" || this.kind === "UBN";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
101 },
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
102 isST() {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
103 return this.kind === "ST";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
104 },
2927
80815b0a665c client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents: 2925
diff changeset
105 isSR() {
2605
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
106 return this.kind === "SR";
11fd7ee37f10 overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents: 2601
diff changeset
107 }
2875
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
108 },
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
109 methods: {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
110 toggleAdditionalInfo() {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
111 if (this.entry.id === this.showAdditional) {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
112 this.$store.commit("imports/hideAdditionalInfo");
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
113 } else {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
114 this.$store.commit("imports/showAdditionalInfoFor", this.entry.id);
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
115 }
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
116 },
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
117 toggleAdditionalLogging() {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
118 if (this.entry.id === this.showLogs) {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
119 this.$store.commit("imports/hideAdditionalLogs");
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
120 } else {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
121 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id);
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
122 }
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
123 }
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
124 },
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
125 mounted() {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
126 if (this.entry.state === "pending") {
84effca50751 client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents: 2799
diff changeset
127 this.$store.commit("imports/showAdditionalInfoFor", this.entry.id);
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 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id);
2594
ecec6d5aae00 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 2593
diff changeset
130 }
2592
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
131 };
5472a5be09c2 overview2 WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
132 </script>