From ab07b3fc0b9b7f42efa6ba8594f35c19fffb99c4 Mon Sep 17 00:00:00 2001
From: "James E. Blair" <jeblair@hp.com>
Date: Wed, 11 Feb 2015 17:54:01 -0800
Subject: [PATCH] Zuul status: only count live changes

Currently the check queue count includes non-live changes.  Update
it to only count live changes, as that is more reflective of
what is going on and what people expect.

Change-Id: I65c40e4c9eed2db2e020253defe230b65b76000b
---
 modules/openstack_project/files/zuul/status.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/openstack_project/files/zuul/status.js b/modules/openstack_project/files/zuul/status.js
index 8838c5bb8e..4b73aa8539 100644
--- a/modules/openstack_project/files/zuul/status.js
+++ b/modules/openstack_project/files/zuul/status.js
@@ -108,7 +108,9 @@ function create_tree(pipeline) {
         });
         $.each(change_queue['heads'], function(head_i, head) {
             $.each(head, function(change_i, change) {
-                count += 1;
+                if (change.live === true) {
+                    count += 1;
+                }
                 var idx = tree.indexOf(change['id']);
                 if (idx > -1) {
                     change['_tree_index'] = idx;