towerops/lib/towerops_web/live/device_live
Graham McIntire 2bb040154a feat: add dynamic capacity tracking for backhaul devices (#113)
For devices with device_role="backhaul", traffic graphs now show capacity
reference lines that update over time based on which interfaces are active.

Features:
- Calculates total capacity per timestamp from active monitored interfaces
- Uses configured_capacity_bps if set, falls back to if_speed
- Capacity adjusts as interfaces go up/down throughout the time period
- Shows as dashed lines at +capacity (inbound) and -capacity (outbound)
- Matches the existing 0-axis graph style

Implementation:
- Small graph (device detail page): Updated build_traffic_json_datasets/2
  and add_capacity_datasets/3 in device_live/show.ex
- Full-page graph: Updated build_traffic_datasets/2 and
  add_capacity_to_full_graph/4 in graph_live/show.ex

The capacity lines provide visual reference for backhaul link saturation,
showing how close actual throughput is to maximum capacity at each point
in time.

Reviewed-on: graham/towerops-web#113
2026-03-22 13:54:37 -05:00
..
form.ex fix: remove device_role_source from form params (#110) 2026-03-22 12:27:41 -05:00
form.html.heex feat: simplify device type to manual-only with 6 options (#109) 2026-03-22 11:24:53 -05:00
index.ex feat: simplify device type to manual-only with 6 options (#109) 2026-03-22 11:24:53 -05:00
index.html.heex fix-sticky-header-overlap (#60) 2026-03-17 13:21:58 -05:00
show.ex feat: add dynamic capacity tracking for backhaul devices (#113) 2026-03-22 13:54:37 -05:00
show.html.heex improve agent status display and fix two pre-existing test failures (#83) 2026-03-19 11:43:42 -05:00