From 1b70f4d9b27d13db53fd31d516a5a4bdcedf1210 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 12 Dec 2024 11:47:53 +0100 Subject: dashboard/app: fix total coverage visualization --- dashboard/app/graphs.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dashboard/app/graphs.go b/dashboard/app/graphs.go index 2b4ab15ca..5625b919e 100644 --- a/dashboard/app/graphs.go +++ b/dashboard/app/graphs.go @@ -333,9 +333,11 @@ func handleCoverageGraph(c context.Context, w http.ResponseWriter, r *http.Reque if _, ok := hist.covered[date]; !ok || hist.instrumented[date] == 0 { cols = append(cols, uiGraphColumn{Hint: date, Vals: []uiGraphValue{{IsNull: true}}}) } else { + val := float32(hist.covered[date]) / float32(hist.instrumented[date]) cols = append(cols, uiGraphColumn{ - Vals: []uiGraphValue{{Val: float32(hist.covered[date]) / float32(hist.instrumented[date])}}, - Hint: date, + Hint: date, + Annotation: val, + Vals: []uiGraphValue{{Val: val}}, }) } } -- cgit mrf-deployment