fix(dashboard): populate active link count in calibration_complete event (bf-5ba)
Some checks are pending
CI Benchmark - Fusion Loop Timing / Fusion Loop Timing Benchmark (push) Waiting to run
Some checks are pending
CI Benchmark - Fusion Loop Timing / Fusion Loop Timing Benchmark (push) Waiting to run
The calibration_complete WebSocket event sent to the guided-troubleshooting dashboard hardcoded links: 0. Read the actual count of active links from the ingestion server via GetAllLinksInfo() (the same source the dashboard snapshot uses for its links list) so the post-calibration display reflects reality. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
47caab4568
commit
86b317b5c6
1 changed files with 8 additions and 2 deletions
|
|
@ -1509,13 +1509,19 @@ func main() {
|
|||
}
|
||||
})
|
||||
guidedMgr.SetOnCalibrationComplete(func(zoneID int, qualityBefore, qualityAfter float64) {
|
||||
// Send WebSocket event to dashboard
|
||||
// Send WebSocket event to dashboard. Populate the active link count
|
||||
// from the ingestion server so the guided-troubleshooting dashboard
|
||||
// reflects how many links participated in the re-baseline.
|
||||
linkCount := 0
|
||||
if ingestSrv != nil {
|
||||
linkCount = len(ingestSrv.GetAllLinksInfo())
|
||||
}
|
||||
msg := map[string]interface{}{
|
||||
"type": "calibration_complete",
|
||||
"zone_id": zoneID,
|
||||
"quality_before": qualityBefore,
|
||||
"quality_after": qualityAfter,
|
||||
"links": 0, // TODO: get actual link count
|
||||
"links": linkCount,
|
||||
}
|
||||
data, _ := json.Marshal(msg)
|
||||
if dashboardHub != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue