mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
Fix whitespace
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<v-card>
|
||||
|
||||
|
||||
<v-toolbar v-if="$route.params.sequence" class="fixed">
|
||||
|
||||
|
||||
<v-toolbar-title>
|
||||
Sequence {{$route.params.sequence}}
|
||||
</v-toolbar-title>
|
||||
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
|
||||
<dougal-graph-settings-sequence :aspects="aspects" @update:aspects="configure">
|
||||
</dougal-graph-settings-sequence>
|
||||
|
||||
|
||||
<v-btn icon
|
||||
:disabled="!($route.params.sequence > firstSequence)"
|
||||
:to="{name: 'graphsBySequence', params: { sequence: firstSequence }}"
|
||||
@@ -35,7 +35,7 @@
|
||||
<v-icon>mdi-debug-step-over</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<v-autocomplete
|
||||
@@ -63,34 +63,34 @@
|
||||
>
|
||||
<v-icon>mdi-skip-forward</v-icon>
|
||||
</v-btn>
|
||||
|
||||
|
||||
</v-toolbar>
|
||||
|
||||
|
||||
<v-toolbar v-else-if="$route.params.sequence0">
|
||||
|
||||
|
||||
<v-toolbar-title>
|
||||
Sequences {{$route.params.sequence0}}‒{{$route.params.sequence1}}
|
||||
</v-toolbar-title>
|
||||
|
||||
|
||||
</v-toolbar>
|
||||
|
||||
|
||||
<v-toolbar v-else-if="$route.params.date">
|
||||
|
||||
|
||||
<v-toolbar-title>
|
||||
Date {{$route.params.date}}
|
||||
</v-toolbar-title>
|
||||
|
||||
|
||||
</v-toolbar>
|
||||
|
||||
|
||||
<v-toolbar v-else-if="$route.params.date0">
|
||||
|
||||
|
||||
<v-toolbar-title>
|
||||
Dates {{$route.params.date0}}‒{{$route.params.date1}}
|
||||
</v-toolbar-title>
|
||||
|
||||
|
||||
</v-toolbar>
|
||||
|
||||
|
||||
|
||||
|
||||
<v-toolbar flat>
|
||||
<!--
|
||||
This is a “ghost” toolbar so that elements further down in the page are
|
||||
@@ -149,7 +149,7 @@ import DougalGraphSettingsSequence from '@/components/graph-settings-sequence.vu
|
||||
|
||||
export default {
|
||||
name: "Graphs",
|
||||
|
||||
|
||||
components: {
|
||||
DougalGraphSettingsSequence,
|
||||
DougalGraphArraysIJScatter,
|
||||
@@ -158,7 +158,7 @@ export default {
|
||||
DougalGraphGunsDepth,
|
||||
DougalGraphGunsHeatmap
|
||||
},
|
||||
|
||||
|
||||
data () {
|
||||
const items = [
|
||||
{
|
||||
@@ -179,7 +179,7 @@ export default {
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
return {
|
||||
items,
|
||||
data: null,
|
||||
@@ -188,60 +188,60 @@ export default {
|
||||
aspects: items.map(i => i.component)
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
watch: {
|
||||
preferences () {
|
||||
this.configure(preferencesλ(this.preferences)(this.$options.name, {aspects: this.aspects}))
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
computed: {
|
||||
|
||||
|
||||
getRows() {
|
||||
return Array(this.rows).fill().map( (el, idx) => idx );
|
||||
},
|
||||
|
||||
|
||||
getCols () {
|
||||
return Array(this.cols).fill().map( (el, idx) => idx );
|
||||
},
|
||||
|
||||
|
||||
visibleItems () {
|
||||
return this.items.filter( i => this.aspects.includes(i.component) );
|
||||
},
|
||||
|
||||
|
||||
firstSequence () {
|
||||
return this.sequences[this.sequences.length-1]?.sequence;
|
||||
},
|
||||
|
||||
|
||||
prevSequence () {
|
||||
const seq = Number(this.$route.params.sequence);
|
||||
const val = this.sequences
|
||||
.filter(i => i.sequence < seq)
|
||||
.map(i => i.sequence)
|
||||
.reduce( (acc, cur) => Math.max(acc, cur), -Infinity);
|
||||
|
||||
|
||||
return isFinite(val) ? val : undefined;
|
||||
},
|
||||
|
||||
|
||||
nextSequence () {
|
||||
const seq = Number(this.$route.params.sequence);
|
||||
const val = this.sequences
|
||||
.filter(i => i.sequence > seq)
|
||||
.map(i => i.sequence)
|
||||
.reduce( (acc, cur) => Math.min(acc, cur), +Infinity);
|
||||
|
||||
|
||||
return isFinite(val) ? val : undefined;
|
||||
},
|
||||
|
||||
|
||||
lastSequence () {
|
||||
return this.sequences[0]?.sequence;
|
||||
},
|
||||
|
||||
|
||||
...mapGetters(['user', 'preferences', 'writeaccess', 'loading', 'serverEvent'])
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
configure (data) {
|
||||
if ("aspects" in data) {
|
||||
this.aspects = [...data.aspects];
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
this.saveUserPreference([`${this.$options.name}.${key}`, data[key]]);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
attributesFor (item) {
|
||||
return this.data
|
||||
? Object.assign({
|
||||
@@ -259,37 +259,37 @@ export default {
|
||||
}, item?.attributes)
|
||||
: null;
|
||||
},
|
||||
|
||||
|
||||
preferencesFor (key, defaults) {
|
||||
return preferencesλ(this.preferences)(`${this.$options.name}.${key}`, defaults);
|
||||
},
|
||||
|
||||
|
||||
gotoSequence(seq) {
|
||||
this.$route.params.sequence = seq;
|
||||
},
|
||||
|
||||
|
||||
...mapActions(["api", "showSnack", "saveUserPreference"])
|
||||
},
|
||||
|
||||
|
||||
beforeRouteLeave (to, from, next) {
|
||||
this.data = null;
|
||||
console.log("beforeRouteLeave");
|
||||
next();
|
||||
},
|
||||
|
||||
|
||||
async beforeRouteUpdate (to, from, next) {
|
||||
console.log("beforeRouteUpdate");
|
||||
this.data = null;
|
||||
next();
|
||||
|
||||
|
||||
const url = `/project/${this.$route.params.project}/sequence/${this.$route.params.sequence}?project=sequence,point,tstamp,geometrypreplot,errorraw,errorfinal,meta&path=$.raw.smsrc`;
|
||||
this.data = Object.freeze(await this.api([url]));
|
||||
this.data = Object.freeze(await this.api([url]));
|
||||
this.sequences = await this.api([`/project/${this.$route.params.project}/sequence`]);
|
||||
},
|
||||
|
||||
|
||||
async beforeRouteEnter (to, from, next) {
|
||||
console.log("beforeRouteEnter enter");
|
||||
|
||||
|
||||
next( async vm => {
|
||||
if (vm.$route.params.sequence) {
|
||||
const url = `/project/${vm.$route.params.project}/sequence/${vm.$route.params.sequence}?project=sequence,point,tstamp,geometrypreplot,errorraw,errorfinal,meta&path=$.raw.smsrc`;
|
||||
|
||||
Reference in New Issue
Block a user