From b2923d8d4982253c603fa99e5450c1a40f1d1599 Mon Sep 17 00:00:00 2001 From: maxime Date: Tue, 17 Nov 2026 09:08:21 +0100 Subject: [PATCH] Stations: every station checked by default Co-Authored-By: Claude Opus 5.5 --- app/README.md | 2 +- app/web/src/pages/Stations.jsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/README.md b/app/README.md index 94f8cd6..deb29c2 100644 --- a/app/README.md +++ b/app/README.md @@ -20,7 +20,7 @@ The address keeps the station and the range (UTC, `end` excluded): `#/data?stati ## The Stations page -The tracked stations, `extraction/stations.txt` of `~/aimsight-data` (`SERIAL [position]`), to edit (serial, position: `lat,lon` or a Swiss place, for the weather of Data; empty for an indoor site: no weather), and the checked ones pumped (`extraction/pump.sh`, `--delay 300`) over a range (by default the station and the range of the address, from 3 days before: the history of the detectors) or, without dates, their missing days up to now; the end of `out/pump.log` follows. The end of a pumping launched by the app empties the cache of the detectors' events. +The tracked stations, `extraction/stations.txt` of `~/aimsight-data` (`SERIAL [position]`), to edit (serial, position: `lat,lon` or a Swiss place, for the weather of Data; empty for an indoor site: no weather), and the checked ones pumped (`extraction/pump.sh`, `--delay 300`) over a range (by default every station, over the range of the address, from 3 days before: the history of the detectors) or, without dates, their missing days up to now; the end of `out/pump.log` follows. The end of a pumping launched by the app empties the cache of the detectors' events. ## The Analysis tab diff --git a/app/web/src/pages/Stations.jsx b/app/web/src/pages/Stations.jsx index 47cc5c1..8062ba6 100644 --- a/app/web/src/pages/Stations.jsx +++ b/app/web/src/pages/Stations.jsx @@ -7,13 +7,13 @@ const shift = (d, n) => (d ? new Date(Date.parse(d) + n * 864e5).toISOString().s // The tracked stations (extraction/stations.txt of ~/aimsight-data): serial and position (for the weather of the Data page); // the checked ones pumped (extraction/pump.sh) over a range, or without range their missing days up to now. The state of -// the pumping read every 2 s. By default, the station and the range of the address (From 3 days before: the history of +// the pumping read every 2 s. By default, every station checked, and the range of the address (From 3 days before: the history of // the detectors) export default function Stations({ selection }) { - const [rows, setRows] = useState([]), [checked, setChecked] = useState(selection.station ? [selection.station] : []); + const [rows, setRows] = useState([]), [checked, setChecked] = useState([]); const [range, setRange] = useState({ start: shift(selection.start, -3), end: selection.end }); const [images, setImages] = useState(true), [state, setState] = useState(null); - useEffect(() => { call("/api/tracked").then(l => l && setRows(l)); }, []); + useEffect(() => { call("/api/tracked").then(l => { if (l) { setRows(l); setChecked(l.map(r => r.serial)); } }); }, []); useEffect(() => { const read = () => fetch("/api/pump").then(r => r.ok && r.json()).then(p => p && setState(p)).catch(() => {}); // silently read();