mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 07:57:07 +00:00
Add group map view
This commit is contained in:
1226
lib/www/client/source/src/components/groups/group-map.vue
Normal file
1226
lib/www/client/source/src/components/groups/group-map.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container fluid fill-height class="ma-0 pa-0">
|
<dougal-group-map v-if="mapView"
|
||||||
|
:baseline="baseline"
|
||||||
|
:monitor="monitor"
|
||||||
|
:monitors="monitors"
|
||||||
|
@input="mapView=$event"
|
||||||
|
></dougal-group-map>
|
||||||
|
<v-container fluid fill-height class="ma-0 pa-0" v-else>
|
||||||
|
|
||||||
<v-overlay :value="loading && !comparisons.length" absolute>
|
<v-overlay :value="loading && !comparisons.length" absolute>
|
||||||
<v-progress-circular
|
<v-progress-circular
|
||||||
@@ -21,7 +27,6 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
</v-overlay>
|
</v-overlay>
|
||||||
|
|
||||||
|
|
||||||
<v-row no-gutters align="stretch" class="fill-height">
|
<v-row no-gutters align="stretch" class="fill-height">
|
||||||
<v-col cols="12" v-if="groupFound">
|
<v-col cols="12" v-if="groupFound">
|
||||||
|
|
||||||
@@ -79,6 +84,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:footer.prepend>
|
<template v-slot:footer.prepend>
|
||||||
|
|
||||||
|
<v-btn v-if="baseline && !mapView"
|
||||||
|
text
|
||||||
|
color="primary"
|
||||||
|
title="Switch to map view"
|
||||||
|
@click="mapView = true"
|
||||||
|
>View map</v-btn>
|
||||||
|
|
||||||
<v-btn v-if="comparison"
|
<v-btn v-if="comparison"
|
||||||
text
|
text
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -123,6 +136,7 @@ import { mapActions, mapGetters } from 'vuex'
|
|||||||
import AccessMixin from '@/mixins/access';
|
import AccessMixin from '@/mixins/access';
|
||||||
import DougalGroupRepeatabilitySummary from '@/components/groups/group-repeatability-summary.vue';
|
import DougalGroupRepeatabilitySummary from '@/components/groups/group-repeatability-summary.vue';
|
||||||
import DougalGroupComparisonSummary from '@/components/groups/group-comparison-summary';
|
import DougalGroupComparisonSummary from '@/components/groups/group-comparison-summary';
|
||||||
|
import DougalGroupMap from '@/components/groups/group-map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Group',
|
name: 'Group',
|
||||||
@@ -134,7 +148,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
DougalGroupRepeatabilitySummary,
|
DougalGroupRepeatabilitySummary,
|
||||||
DougalGroupComparisonSummary,
|
DougalGroupComparisonSummary,
|
||||||
|
DougalGroupMap
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
@@ -182,6 +196,8 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
mapView: false,
|
||||||
|
|
||||||
baseline: null,
|
baseline: null,
|
||||||
monitor: null,
|
monitor: null,
|
||||||
comparisons: []
|
comparisons: []
|
||||||
@@ -210,6 +226,16 @@ export default {
|
|||||||
return this.projects.indexOf(this.baseline);
|
return this.projects.indexOf(this.baseline);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
monitors () {
|
||||||
|
if (this.baseline && this.comparisons) {
|
||||||
|
return this.comparisons
|
||||||
|
.filter( i => i.baseline_pid == this.baseline.pid )
|
||||||
|
.map( i => this.projects.find( p => p.pid == i.monitor_pid ));
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
comparison () {
|
comparison () {
|
||||||
return this.comparisons.find( row =>
|
return this.comparisons.find( row =>
|
||||||
row.baseline_pid == this.baseline?.pid && row.monitor_pid == this.monitor?.pid
|
row.baseline_pid == this.baseline?.pid && row.monitor_pid == this.monitor?.pid
|
||||||
|
|||||||
Reference in New Issue
Block a user