From 703f643f91e8becd2495f1f102346a0b7fa63867 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 24 Apr 2023 19:52:41 +0200 Subject: dashboard: support bug labels Let bug labels come in three flavours: 1) Bug labels with multiple values (e.g. `subsystems`). 2) Bug labels with only one value (e.g. `prio`). 3) Flags. Let users configure bug labels via email by issuing the following commands: #syz set subsystems: abc, def #syz set no-reminders #syz unset no-reminders Also let users set tags for invididual bugs in reported bug lists: #syz set <1> some-tag --- dashboard/app/cache.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'dashboard/app/cache.go') diff --git a/dashboard/app/cache.go b/dashboard/app/cache.go index 2c8ca6376..dee2fb989 100644 --- a/dashboard/app/cache.go +++ b/dashboard/app/cache.go @@ -72,12 +72,13 @@ func buildAndStoreCached(c context.Context, bugs []*Bug, ns string, accessLevel continue } v.Total.Record(bug) - for _, subsystem := range bug.Tags.Subsystems { - stats := v.Subsystems[subsystem.Name] + subsystems := bug.LabelValues(SubsystemLabel) + for _, label := range subsystems { + stats := v.Subsystems[label.Value] stats.Record(bug) - v.Subsystems[subsystem.Name] = stats + v.Subsystems[label.Value] = stats } - if len(bug.Tags.Subsystems) == 0 { + if len(subsystems) == 0 { v.NoSubsystem.Record(bug) } } -- cgit mrf-deployment