mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-07-26 19:42:47 +02:00
8cf5dadc38
Change the new-route defaults so the create modal, REST API, YAML import, and preview helper pre-fill packet_count_threshold=5 instead of 3, and bump the effective-clear auto-multiplier from 2x to 3x so the default comfort bar tracks to 15 for a default threshold of 5. Schema/model/cli/preview: - schemas/routes.py: RouteCreate + RoutePreviewRequest packet_count_threshold default 3 -> 5 (clear_threshold stays None) - models/route.py: Route INSERT default 3 -> 5 (clear_threshold stays nullable, no default) - collector/cli.py: YAML import fallbacks 3 -> 5 - collector/routes.py: preview helper fallback 3 -> 5; module constant CLEAR_DEFAULT_MULTIPLIER 2 -> 3 (drives effective_clear_threshold) - api/metrics.py: route_clear gauge help text 2x -> 3x UI: - web/spa/pages/routes.js: new-route modal pre-fills packet_count_threshold=5; placeholder shows 3x threshold; parseInt fallback 3 -> 5. clear_threshold field unchanged (clearing still sends null for the auto-tracking behaviour). Docs: - docs/routes.md defaults table: window_hours 24->48, threshold 3->5, clear (2x)->(3x), max_hop_span (unlimited)->8. Previous four entries now match the shipped defaults (some were stale from #316). - docs/seeding.md YAML example: window_hours 24->48, threshold 3->5, commented clear_threshold example 10->15 with 3x note. No migration: packet_count_threshold uses Python-side default= (no server_default), so existing rows keep their stored values. Existing routes with clear_threshold=NULL continue to track via the new 3x multiplier at evaluation time.