From 89e6cd03aa11c886f28520557af6c7ad51827b0e Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Wed, 7 Oct 2015 13:20:15 +0300 Subject: [PATCH] toaster: Hide "Download build log" button if log doesn't exist Our builds pages show all builds, but also include build requests which may have resulted in a build failure, before the build started (e.g. at the recipe parsing stage). In such cases, the BuildStarted event is not captured by Toaster, so we have no idea where the log file for the failed build is. The result is that a build is shown by the Toaster UI /builds/ pages, but it is really a pretend build which never went beyond being a build request, and which has no associated log file. In turn, this breaks the "Download build log" button on the build dashboard, as there's no log file associated with the build. Fix this by hiding the "Download build log" button for builds which don't have a cooker_log_path. [YOCTO #8373] Signed-off-by: Elliot Smith Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- lib/toaster/toastergui/templates/builddashboard.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/toaster/toastergui/templates/builddashboard.html b/lib/toaster/toastergui/templates/builddashboard.html index bab8e388f55..aa991348b8d 100644 --- a/lib/toaster/toastergui/templates/builddashboard.html +++ b/lib/toaster/toastergui/templates/builddashboard.html @@ -37,7 +37,9 @@ {{build.warnings.count}} warning{{build.warnings.count|pluralize}} {% endif %} Build time: {{ build.timespent_seconds|sectohms }} - Download build log + {% if build.cooker_log_path %} + Download build log + {% endif %} {%endif%} -- 2.47.3