Mercurial > gemma
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 |
rev | line source |
---|---|
2592 | 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 | 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 | 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 | 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 | 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 | 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 | 48 <span class="text-info"><translate>Logs</translate></span> |
2594 | 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 | 51 </div> |
52 </template> | |
53 | |
54 <script> | |
55 /* This is Free Software under GNU Affero General Public License v >= 3.0 | |
56 * without warranty, see README.md and license for details. | |
57 * | |
58 * SPDX-License-Identifier: AGPL-3.0-or-later | |
59 * License-Filename: LICENSES/AGPL-3.0.txt | |
60 * | |
61 * Copyright (C) 2018 by via donau | |
62 * – Österreichische Wasserstraßen-Gesellschaft mbH | |
63 * Software engineering by Intevation GmbH | |
64 * | |
65 * Author(s): | |
66 * Thomas Junk <thomas.junk@intevation.de> | |
67 */ | |
2594 | 68 |
69 import { mapState } from "vuex"; | |
70 | |
2592 | 71 export default { |
2594 | 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 | 79 AdditionalLog: () => import("./AdditionalLog.vue") |
80 }, | |
2875
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
81 props: ["entry"], |
2594 | 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 | 130 } |
2592 | 131 }; |
132 </script> |