diff --git a/modules/openstack_project/files/zuul/status.js b/modules/openstack_project/files/zuul/status.js index ad88187e87..62a98584a1 100644 --- a/modules/openstack_project/files/zuul/status.js +++ b/modules/openstack_project/files/zuul/status.js @@ -151,19 +151,21 @@ function format_pipeline(data) { function format_change(change) { var html = '
'; - html += ''+change['project']+''; + html += '' + change['project'] + ''; var id = change['id']; var url = change['url']; - if (id.length == 40) { - id = id.substr(0,7); - } - html += ''; - if (url != null) { - html += ''; - } - html += id; - if (url != null) { - html += ''; + if (id !== "None") { + if (id.length == 40) { + id = id.substr(0,7); + } + html += ''; + if (url !== null) { + html += ''; + } + html += id; + if (url !== null) { + html += ''; + } } html += ''; @@ -173,8 +175,8 @@ function format_change(change) { $.each(change['jobs'], function(i, job) { result = job['result']; var result_class = "result"; - if (result == null) { - if (job['url'] != null) { + if (result === null) { + if (job['url'] !== null) { result = 'in progress'; } else { result = 'queued'; @@ -189,15 +191,15 @@ function format_change(change) { result_class += " result_unstable"; } html += ''; - if (job['url'] != null) { + if (job['url'] !== null) { html += ''; } html += job['name']; - if (job['url'] != null) { + if (job['url'] !== null) { html += ''; } html += ': '; - if (job['result'] == null && job['url'] != null) { + if (job['result'] === null && job['url'] !== null) { html += format_progress(job['elapsed_time'], job['remaining_time']); } else { html += ''+result+'';