diff --git a/modules/openstack_project/files/zuul/status.html b/modules/openstack_project/files/zuul/status.html index 60b76a40f8..ea942ec9e6 100644 --- a/modules/openstack_project/files/zuul/status.html +++ b/modules/openstack_project/files/zuul/status.html @@ -24,6 +24,12 @@ .change > .header > .time { float: right; } +.pipeline > .subhead > .count { + float: right; + margin-right: 1em; + color: #535353; + font-size: 11pt; +} .job { display: block; } diff --git a/modules/openstack_project/files/zuul/status.js b/modules/openstack_project/files/zuul/status.js index 519e115942..3d34151440 100644 --- a/modules/openstack_project/files/zuul/status.js +++ b/modules/openstack_project/files/zuul/status.js @@ -29,7 +29,7 @@ function format_time(ms, words) { r += hours; r += ' hr '; } - r += minutes + ' min' + r += minutes + ' min'; } else { if (hours < 10) r += '0'; r += hours + ':'; @@ -62,9 +62,24 @@ function is_hide_project(project) { return project.indexOf(filter) == -1; } +function count_changes(pipeline) { + var count = 0; + $.each(pipeline['change_queues'], function(change_queue_i, change_queue) { + $.each(change_queue['heads'], function(head_i, head) { + count += head.length; + }); + }); + return count; +} + function format_pipeline(data) { + var count = count_changes(data); var html = '

'+ - data['name']+'

'; + data['name']; + if (count > 0) { + html += ' (' + count + ')'; + } + html += ''; if (data['description'] != null) { html += '

'+data['description']+'

'; } @@ -88,11 +103,11 @@ function format_pipeline(data) { if (name.length > 32) { name = name.substr(0,32) + '...'; } - html += name + '
' + html += name + ''; } $.each(head, function(change_i, change) { if (change_i > 0) { - html += '
' + html += '
'; } html += format_change(change); }); @@ -218,7 +233,7 @@ function update() { function update_graphs() { $('.graph').each(function(i, img) { - var newimg = new Image() + var newimg = new Image(); var parts = img.src.split('#'); newimg.src = parts[0] + '#' + new Date().getTime(); $(newimg).load(function (x) {