From ecfaab9f857457588d35721b166aad5a18773dbe Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Fri, 24 Jul 2026 19:51:25 +0100 Subject: [PATCH] feat(telemetry): map Sync State 0-4 to named states with threshold colors Add value mappings (0 Disconnected, 1 Connected, 2 Syncing, 3 Tracking, 4 Full) and matching red->green thresholds to the Sync State panel, so the line, tooltip, and legend render state names and colors instead of bare 0-4. Keeps the minimal custom-key convention; only the Sync State panel changes. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../grafana/dashboards/ledger-data-sync.json | 64 ++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/docker/telemetry/grafana/dashboards/ledger-data-sync.json b/docker/telemetry/grafana/dashboards/ledger-data-sync.json index 29dc9ec9ca..7aa6f402d8 100644 --- a/docker/telemetry/grafana/dashboards/ledger-data-sync.json +++ b/docker/telemetry/grafana/dashboards/ledger-data-sync.json @@ -834,7 +834,69 @@ "insertNulls": false, "showPoints": "auto", "pointSize": 3 - } + }, + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "Disconnected", + "color": "red", + "index": 0 + }, + "1": { + "text": "Connected", + "color": "orange", + "index": 1 + }, + "2": { + "text": "Syncing", + "color": "yellow", + "index": 2 + }, + "3": { + "text": "Tracking", + "color": "blue", + "index": 3 + }, + "4": { + "text": "Full", + "color": "green", + "index": 4 + } + } + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 1 + }, + { + "color": "yellow", + "value": 2 + }, + { + "color": "blue", + "value": 3 + }, + { + "color": "green", + "value": 4 + } + ] + }, + "color": { + "mode": "thresholds" + }, + "min": 0, + "max": 4 }, "overrides": [] },