Stations: every station checked by default

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-17 09:08:21 +01:00
1 parent 07639748ee
commit b2923d8d49
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -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
+3 -3
View File
@@ -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();