From dfbe2ed44f34f8bdabc5ca598387d7543fb9591b Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 3 Sep 2024 10:09:08 +0200 Subject: dashboard/app: add total value on Bugs/Month graph --- dashboard/app/graphs.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'dashboard/app/graphs.go') diff --git a/dashboard/app/graphs.go b/dashboard/app/graphs.go index e4ded73d6..f3f62577e 100644 --- a/dashboard/app/graphs.go +++ b/dashboard/app/graphs.go @@ -73,8 +73,9 @@ type uiGraphHeader struct { } type uiGraphColumn struct { - Hint string - Vals []uiGraphValue + Hint string + Annotation float32 + Vals []uiGraphValue } type uiGraphValue struct { @@ -499,7 +500,9 @@ func createFoundBugs(c context.Context, bugs []*Bug) *uiGraph { col := uiGraphColumn{Hint: month.Format("Jan-06")} stats := months[month] for _, typ := range types { - col.Vals = append(col.Vals, uiGraphValue{Val: float32(stats[typ.name])}) + val := float32(stats[typ.name]) + col.Vals = append(col.Vals, uiGraphValue{Val: val}) + col.Annotation += val } columns = append(columns, col) } -- cgit mrf-deployment