From 7794b5728d923933d27f57f0f6829404da242198 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Wed, 7 Oct 2015 13:20:15 +0300 Subject: bitbake: 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] (Bitbake rev: 89e6cd03aa11c886f28520557af6c7ad51827b0e) Signed-off-by: Elliot Smith Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/templates/builddashboard.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html index bab8e388f5..aa991348b8 100644 --- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html +++ b/bitbake/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%} -- cgit v1.2.3-54-g00ecf