Dashboard web FastAPI + Chart.js

- 4 vues : spectre temps reel, historique detections, background, timeline CPS
- API REST : /api/status, /api/spectrum/current, /api/spectrum/difference,
  /api/background, /api/background/spectrum, /api/history, /api/cps/timeline
- Frontend vanilla JS + Chart.js (pas de Node.js, leger pour Pi 4)
- Moniteur modifie pour exporter son etat dans /data/monitor_state.json
  et le CPS dans /data/cps_log.jsonl chaque cycle
- Nouveau conteneur Docker 'web' sur port 8080
- Theme sombre, calibration energie (E = 0.33 + 2.97 * canal)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jacquin Antoine
2026-05-19 13:33:07 +02:00
parent 27ef0727e8
commit 1e0c1a5ea5
22 changed files with 1031 additions and 2 deletions

View File

@ -42,6 +42,8 @@ services:
- MODEL_PATH=/models/vega_best.pt
- ISOTOPE_INDEX_PATH=/models/vega_isotope_index.txt
- BACKGROUND_PATH=/data/background_24h.npy
- STATE_PATH=/data/monitor_state.json
- CPS_LOG_PATH=/data/cps_log.jsonl
- VEGA_ML_PATH=/models/vega_ml
- VEGA_DEVICE=cpu
- LOG_DIR=/logs
@ -52,4 +54,25 @@ services:
depends_on:
train:
condition: service_completed_successfully
restart: unless-stopped
web:
build:
context: ./web
dockerfile: Dockerfile
ports:
- "8080:8080"
volumes:
- ./data:/data:ro
- ./logs:/logs:ro
- ./models/vega_isotope_index.txt:/models/vega_isotope_index.txt:ro
environment:
- STATE_PATH=/data/monitor_state.json
- CPS_LOG_PATH=/data/cps_log.jsonl
- BACKGROUND_PATH=/data/background_24h.npy
- BACKGROUND_SNAPSHOT_PATH=/data/background_snapshot.json
- LOG_DIR=/logs
- ISOTOPE_INDEX_PATH=/models/vega_isotope_index.txt
- ENERGY_CALIBRATION_OFFSET=0.33
- ENERGY_CALIBRATION_SLOPE=2.97
restart: unless-stopped