Skip to content

Commit

Permalink
bugfix first row with data of each plot is NA; bugfix respect line co…
Browse files Browse the repository at this point in the history
…mment marks in config files plot_inventory and station_inventory; web app diagram view auto select entries if there is just one of project or group or plot or plotstation or sensor; config TreeTalkers; updated example
  • Loading branch information
swoellauer committed Feb 20, 2021
1 parent a957e43 commit ce75f5e
Show file tree
Hide file tree
Showing 53 changed files with 1,407 additions and 388 deletions.
84 changes: 69 additions & 15 deletions app/src/components/timeseries-selector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@
<template v-if="selectedPlotstations.length > 0">

<q-item tag="label" >
<q-item-section>
<q-item-section v-if="sensors.length > 0">
<q-select v-model="selectedSensorsModel" :options="sensors" option-value="id" for="id" option-label="id" label="Sensors" stack-label borderless dense options-dense options-cover :multiple="multiTimeseries">
<template v-if="selectedSensors.length > 0" v-slot:append>
<q-icon name="cancel" @click.stop="selectedSensorsModel = null" class="cursor-pointer" />
</template>
</q-select>
</q-item-section>
<q-item-section v-if="sensors.length === 0">
no sensors
</q-item-section>
</q-item>

<template v-if="selectedSensors.length > 0">
Expand Down Expand Up @@ -250,19 +253,18 @@ export default {
case 0: {
let id = plot.id;
let sensorSet = plot.sensorSet;
ps.push({id: id, sensorSet: sensorSet});
ps.push({id: id, plot: plot.id, station: plot.id, sensorSet: sensorSet});
break;
}
case 1: {
let stationName = plot.stations[0];
let id = plot.id + ":" + stationName;
let sensorSet = this.model.stations[stationName].sensorSet;
ps.push({id: id, sensorSet: sensorSet});
ps.push({id: id, plot: plot.id, station: stationName, sensorSet: sensorSet});
break;
}
default: {
let id = plot.id;
ps.push({id: id});
ps.push({id: plot.id, plot: plot.id, station: plot.id, sensorSet: plot.sensorSet});
for(let stationName of plot.stations) {
let id = plot.id + ":" + stationName;
let sensorSet = this.model.stations[stationName].sensorSet;
Expand Down Expand Up @@ -304,20 +306,72 @@ export default {
},
},
watch: {
projects() {
this.selectedProjectsModel = null;
projects: {
handler() {
this.selectedProjectsModel = null;
console.log("A");
if(this.projects.length === 1) {
console.log("A");
if(this.multiTimeseries) {
this.selectedProjectsModel = [this.projects[0]];
} else {
this.selectedProjectsModel = this.projects[0];
}
}
},
immediate: true,
},
groups() {
this.selectedGroupsModel = null;
groups: {
handler() {
this.selectedGroupsModel = null;
if(this.groups.length === 1) {
if(this.multiTimeseries) {
this.selectedGroupsModel = [this.groups[0]];
} else {
this.selectedGroupsModel = this.groups[0];
}
}
},
immediate: true,
},
plots() {
this.selectedPlotsModel = null;
plots: {
handler() {
this.selectedPlotsModel = null;
if(this.plots.length === 1) {
if(this.multiTimeseries) {
this.selectedPlotsModel = [this.plots[0]];
} else {
this.selectedPlotsModel = this.plots[0];
}
}
},
immediate: true,
},
plotstations() {
this.selectedPlotstationsModel = null;
plotstations: {
handler() {
this.selectedPlotstationsModel = null;
if(this.plotstations.length === 1) {
if(this.multiTimeseries) {
this.selectedPlotstationsModel = [this.plotstations[0]];
} else {
this.selectedPlotstationsModel = this.plotstations[0];
}
}
},
immediate: true,
},
sensors() {
this.selectedSensorsModel = null;
sensors: {
handler() {
this.selectedSensorsModel = null;
if(this.sensors.length === 1) {
if(this.multiTimeseries) {
this.selectedSensorsModel = [this.sensors[0]];
} else {
this.selectedSensorsModel = this.sensors[0];
}
}
},
immediate: true,
},
selectedPlotstations() {
this.$nextTick(() => this.onPlotSensorChanged());
Expand Down
2 changes: 1 addition & 1 deletion app/src/layouts/OverviewLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<q-layout view="hHh LpR fFf">

<q-header reveal elevated class="bg-grey-7 text-grey-4">
<pages-toolbar title="TubeDB Web App" active="/overview"/>
<pages-toolbar title="TubeDB Web App (beta)" active="/overview"/>
</q-header>

<q-page-container class="row justify-center">
Expand Down
12 changes: 4 additions & 8 deletions config/nature40/plot_inventory.csv
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,9 @@ SEW17_2_M,treetalker_be,,,,,be_treetalker_logger,,,
SEW17_2_S,treetalker_be,,,,,be_treetalker_logger,,,
SEW17_3_M,treetalker_be,,,,,be_treetalker_logger,,,
SEW17_CLOUD,treetalker_be_cloud,,,,,be_treetalker_node,,,
plot_tt_5F200025,treetalker_be,,,,,be_treetalker_logger,,,
tt_52040335,treetalker_be,,,,Y,be_treetalker_logger,,,
tt_52040346,treetalker_be,,,,Y,be_treetalker_logger,,,
#tt_52040335,treetalker_be,,,,Y,be_treetalker_logger,,,
#tt_52040346,treetalker_be,,,,Y,be_treetalker_logger,,,
SEW18_C0200140_CLOUD,treetalker_be_cloud,,,,,be_treetalker_node,,,
SEW18_C0200140,treetalker_be,,,,,be_treetalker_logger,,,
tt_C0200130,treetalker_be_cloud,,,,Y,be_treetalker_node,,,
tt_5F200021,treetalker_be,,,,Y,be_treetalker_logger,,,
tt_5F200022,treetalker_be,,,,Y,be_treetalker_logger,,,
tt_5F200023,treetalker_be,,,,Y,be_treetalker_logger,,,
tt_5F200024,treetalker_be,,,,Y,be_treetalker_logger,,,
SEW03_C0200130_CLOUD,treetalker_be_cloud,,,,,be_treetalker_node,,,
SEW03_C0200130,treetalker_be,,,,,be_treetalker_logger,,,
9 changes: 7 additions & 2 deletions config/nature40/station_inventory.csv
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ SEW17_1_N,be_treetalker_logger,tt_5F200007,2020-12-01,2025-12-31
SEW17_2_M,be_treetalker_logger,tt_5F200008,2020-12-01,2025-12-31
SEW17_2_S,be_treetalker_logger,tt_5F200009,2020-12-01,2025-12-31
SEW17_3_M,be_treetalker_logger,tt_5F200010,2020-12-01,2025-12-31
plot_tt_5F200025,be_treetalker_logger,tt_5F200025,2020-12-01,2025-12-31
SEW17_CLOUD,be_treetalker_node,tt_C0200132,*,*
JIG_0001,be_treetalker_logger,tt_5F200074,*,*
JIG_0001,be_treetalker_logger,tt_5F200057,*,*
Expand All @@ -97,4 +96,10 @@ SEW18_C0200140,be_treetalker_logger,tt_5F200016,*,*
SEW18_C0200140,be_treetalker_logger,tt_5F200017,*,*
SEW18_C0200140,be_treetalker_logger,tt_5F200018,*,*
SEW18_C0200140,be_treetalker_logger,tt_5F200019,*,*
SEW18_C0200140,be_treetalker_logger,tt_5F200020,*,*
SEW18_C0200140,be_treetalker_logger,tt_5F200020,*,*
SEW03_C0200130_CLOUD,be_treetalker_node,tt_C0200130,*,*
SEW03_C0200130,be_treetalker_logger,tt_5F200021,2020-12-01,2025-12-31
SEW03_C0200130,be_treetalker_logger,tt_5F200022,2020-12-01,2025-12-31
SEW03_C0200130,be_treetalker_logger,tt_5F200023,2020-12-01,2025-12-31
SEW03_C0200130,be_treetalker_logger,tt_5F200024,2020-12-01,2025-12-31
SEW03_C0200130,be_treetalker_logger,tt_5F200025,2020-12-01,2025-12-31
Loading

0 comments on commit ce75f5e

Please sign in to comment.