From 4e740c00a474b578896830c7d27d90d9474364bb Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 22 Oct 2020 18:59:10 +0200 Subject: dashboard/app: show more detailed info about bisections 1. Split cause/fix bisections in the bug table. 2. Show if bisection is inconclusive/unreliable in the bug table. 3. Show if bisection is unreliable on the bug page. Update #2098 --- dashboard/app/admin.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dashboard/app/admin.go') diff --git a/dashboard/app/admin.go b/dashboard/app/admin.go index 104807a56..8062d1881 100644 --- a/dashboard/app/admin.go +++ b/dashboard/app/admin.go @@ -142,7 +142,7 @@ func updateBugReporting(c context.Context, w http.ResponseWriter, r *http.Reques } log.Warningf(c, "fetched %v bugs for namespce %v", len(bugs), ns) cfg := config.Namespaces[ns] - transform := func(bug *Bug) { + transform := func(bug *Bug, index int) { createBugReporting(bug, cfg) } var batchKeys []*db.Key @@ -167,14 +167,14 @@ func updateBugReporting(c context.Context, w http.ResponseWriter, r *http.Reques return nil } -func updateBugBatch(c context.Context, keys []*db.Key, transform func(bug *Bug)) error { +func updateBugBatch(c context.Context, keys []*db.Key, transform func(bug *Bug, index int)) error { tx := func(c context.Context) error { bugs := make([]*Bug, len(keys)) if err := db.GetMulti(c, keys, bugs); err != nil { return err } - for _, bug := range bugs { - transform(bug) + for i, bug := range bugs { + transform(bug, i) } _, err := db.PutMulti(c, keys, bugs) return err -- cgit mrf-deployment