Fix live console URL

Checking running job console did not work with plane zuul.opendev.org
prefix

Change-Id: Ia9f4ee3af1bb7871b6d1bb6768f7a1cd9d31d8a4
This commit is contained in:
Bernard Cafarelli 2019-09-20 17:25:37 +02:00
parent 86de60530d
commit 444c957386
No known key found for this signature in database
GPG Key ID: 9531F08245465A52
1 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@
const zuul_status_base = "https://zuul.opendev.org/";
// TODO: find a way to deal with multiple tenants
const zuul_status_url = zuul_status_base + "api/tenant/openstack/status/change/";
const zuul_console_url = zuul_status_base + "t/openstack/";
// /Config
@ -104,7 +105,7 @@ var main = function() {
item.name = job.name;
item.voting = job.voting;
item.pipeline = job.pipeline;
item.url = job.result ? job.report_url : (job.url ? zuul_status_base + job.url : "#");
item.url = job.result ? job.report_url : (job.url ? zuul_console_url + job.url : "#");
if (item.status === "running" && job.remaining_time !== null){
item.completeness = Math.round(100 * (job.elapsed_time / (job.elapsed_time + job.remaining_time))) + "%";