From 7204ca363b9602ed4cb2d55b1b07cbcfb4ae92d0 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 11 Feb 2015 18:21:04 -0800 Subject: [PATCH] Zuul status: only display time on live changes Time has no meaning for non-live changes. Really only the time for the live change at the end of the list has any relevance. The enqueue time is just repeated, and the ETA of 0 is just weird. Don't display them for non-live changes. Change-Id: Ibfcd4c997c1f2447d56ad12f7f7c0203c62d5bce --- modules/openstack_project/files/zuul/status.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/openstack_project/files/zuul/status.js b/modules/openstack_project/files/zuul/status.js index 4b73aa8539..c48836f868 100644 --- a/modules/openstack_project/files/zuul/status.js +++ b/modules/openstack_project/files/zuul/status.js @@ -272,9 +272,12 @@ function format_change(change, change_queue) { // Row #1 of the header (project and remaining time) html += '' + change['project'] + ''; - html += ''; - html += format_time(change['remaining_time'], true); - html += '
'; + if (change.live === true) { + html += ''; + html += format_time(change['remaining_time'], true); + html += ''; + } + html += '
'; // Row #2 of the header (change id and enqueue time) html += ' '; @@ -297,9 +300,10 @@ function format_change(change, change_queue) { html += ' '; } html += ''; - html += ''; - html += format_enqueue_time(change['enqueue_time']) + ''; - + if (change.live === true) { + html += ''; + html += format_enqueue_time(change['enqueue_time']) + ''; + } html += ''; // Job listing from here down