diff --git a/modules/openstack_project/files/zuul/status.html b/modules/openstack_project/files/zuul/status.html index 96d4e5e205..30a27095b5 100644 --- a/modules/openstack_project/files/zuul/status.html +++ b/modules/openstack_project/files/zuul/status.html @@ -185,6 +185,8 @@ progress[aria-valuenow]:before {

Queue lengths: events, results. +      + Filter projects:

diff --git a/modules/openstack_project/files/zuul/status.js b/modules/openstack_project/files/zuul/status.js index 20d4680915..519e115942 100644 --- a/modules/openstack_project/files/zuul/status.js +++ b/modules/openstack_project/files/zuul/status.js @@ -13,6 +13,7 @@ // under the License. window.zuul_enable_status_updates = true; +window.zuul_filter = ""; function format_time(ms, words) { if (ms == null) { @@ -53,6 +54,14 @@ function format_progress(elapsed, remaining) { return r; } +function is_hide_project(project) { + var filter = window.zuul_filter; + if (filter.length == 0) { + return false; + } + return project.indexOf(filter) == -1; +} + function format_pipeline(data) { var html = '

'+ data['name']+'

'; @@ -62,6 +71,15 @@ function format_pipeline(data) { $.each(data['change_queues'], function(change_queue_i, change_queue) { $.each(change_queue['heads'], function(head_i, head) { + var projects = ""; + var hide_queue = true; + $.each(head, function(change_i, change) { + projects += change['project'] + "|"; + hide_queue &= is_hide_project(change['project']); + }); + html += '
'; + if (data['change_queues'].length > 1 && head_i == 0) { html += '
Change queue: '; @@ -78,6 +96,7 @@ function format_pipeline(data) { } html += format_change(change); }); + html += '
' }); }); @@ -223,4 +242,16 @@ $(function() { } }); + $('#projects_filter').live('keyup change', function () { + window.zuul_filter = $('#projects_filter').val().trim(); + $.each($('div[project]'), function (idx, val) { + val = $(val); + var project = val.attr('project'); + if (is_hide_project(project)) { + val.hide(100); + } else { + val.show(100); + } + }) + }); });