diff --git a/modules/openstack_project/files/zuul/status.html b/modules/openstack_project/files/zuul/status.html index 20f6932e6c..1c2ffe685b 100644 --- a/modules/openstack_project/files/zuul/status.html +++ b/modules/openstack_project/files/zuul/status.html @@ -19,6 +19,9 @@ padding: 4px; } .change > .header > .changeid { + margin: 1em; +} +.change > .header > .time { float: right; } .job { diff --git a/modules/openstack_project/files/zuul/status.js b/modules/openstack_project/files/zuul/status.js index 3c9e94c239..3d69ee9c1b 100644 --- a/modules/openstack_project/files/zuul/status.js +++ b/modules/openstack_project/files/zuul/status.js @@ -14,6 +14,45 @@ window.zuul_enable_status_updates = true; +function format_time(ms, words) { + if (ms == null) { + return "unknown"; + } + var seconds = (+ms)/1000; + var minutes = Math.floor((seconds/60)%60); + var hours = Math.floor(minutes/60); + seconds = Math.floor(seconds % 60); + r = ''; + if (words) { + if (hours) { + r += hours; + r += ' hr '; + } + r += minutes + ' min' + } else { + if (hours < 10) r += '0'; + r += hours + ':'; + if (minutes < 10) r += '0'; + r += minutes + ':'; + if (seconds < 10) r += '0'; + r += seconds; + } + return r; +} + +function format_progress(elapsed, remaining) { + if (remaining != null) { + total = elapsed + remaining; + } else { + total = null; + } + r = ''; + return r; +} + function format_pipeline(data) { var html = '