From 97781ed81cef4c1628a88bf75684a9eebe867fd7 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 1 Apr 2014 12:15:00 +0800 Subject: [PATCH] [Kevin Hu] Add total counts for blockers For blockers, I added total counts for each release. Then, we can know how many open blockers for each release now, and it's convenient for us to query all blockers that are owned by no-body for specific release. --- js/dashboard.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/dashboard.js b/js/dashboard.js index eb043de..8951faa 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -54,7 +54,8 @@ config.blocking_value = suffix(config.releases, "+"); var data = { nominations: [], untriaged: [], - blocking: [] + blocking: [], + blockers: [] }; // Initially hide the body and fade it in when we get some data to show. @@ -205,7 +206,7 @@ function refresh() { } $("li#blockers").empty().append("
Blockers: " + formatCounts(null, config.blocking_value, null, data.blocking) + - "
").append(formatComponents(data.blocking)); + "").append(formatStatus(data.blockers)).append(formatComponents(data.blocking)); } function update() { @@ -219,6 +220,9 @@ function update() { group(all().blocking(config.nomination_value).open(), [config.flag, "assigned_to", "last_change_time"]).then(function (counts) { data.nominations = counts; }), + group(all().blocking(config.blocking_value).open(), [config.flag, "assigned_to", "last_change_time"]).then(function (counts) { + data.blockers = counts; + }), group(all().blocking(config.blocking_value).open(), ["component", config.flag, "assigned_to", "last_change_time"]).then(function (counts) { data.untriaged = ("General" in counts) ? counts.General : null; data.blocking = without(counts, "General");