aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/cache.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-04-24 19:52:41 +0200
committerAleksandr Nogikh <wp32pw@gmail.com>2023-04-27 11:42:09 +0200
commit703f643f91e8becd2495f1f102346a0b7fa63867 (patch)
treec304e8d97b58127b6c539096f7d283d8582d12c8 /dashboard/app/cache.go
parentcef7cc0993422a96dff2c22d1afc9f87502bb289 (diff)
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
Diffstat (limited to 'dashboard/app/cache.go')
-rw-r--r--dashboard/app/cache.go9
1 files changed, 5 insertions, 4 deletions
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)
}
}