Zuul v3: show live console log while the build is still active
Change-Id: I53503e55ead7e5568c9c6401cd3f8b28124ee093
diff --git a/src/main/resources/static/zuul-status-view.js b/src/main/resources/static/zuul-status-view.js
index b10dec7..34475fa 100644
--- a/src/main/resources/static/zuul-status-view.js
+++ b/src/main/resources/static/zuul-status-view.js
@@ -267,9 +267,19 @@
* @return {String} True when we are done requesting results.
*/
_computeReportURL(response) {
- if (!response || !response.report_url) { return ''; }
- return response.report_url;
+ if (this.zuulTenant) {
+ // Zuul v3 live streaming URL has to be checked early because `report_url` always contains at least a placeholder
+ if (response && response.result == null && response.url && response.url.startsWith('stream/')) {
+ return `${this.zuulUrl}/t/${this.zuulTenant}/${response.url}`;
+ }
+ }
+
+ if (response && response.report_url) {
+ return response.report_url;
+ }
+
+ return '';
},
_progressPercent(jobs) {