summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2015-10-07 13:20:15 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-11 08:09:48 +0100
commit89e6cd03aa11c886f28520557af6c7ad51827b0e (patch)
treecd3e32f9287694b7b9c42a007b10fcbcfb8be2ca
parente076888a2120a37c388930073694750735d86507 (diff)
downloadbitbake-89e6cd03aa11c886f28520557af6c7ad51827b0e.tar.gz
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 <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/toaster/toastergui/templates/builddashboard.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/toaster/toastergui/templates/builddashboard.html b/lib/toaster/toastergui/templates/builddashboard.html
index bab8e388f..aa991348b 100644
--- a/lib/toaster/toastergui/templates/builddashboard.html
+++ b/lib/toaster/toastergui/templates/builddashboard.html
@@ -37,7 +37,9 @@
<span > <i class="icon-warning-sign yellow"></i><strong><a href="#warnings" class="warning show-warnings"> {{build.warnings.count}} warning{{build.warnings.count|pluralize}}</a></strong></span>
{% endif %}
<span class="pull-right">Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }}</a>
- <a class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%else%}btn-danger{%endif%} pull-right log" href="{% url 'build_artifact' build.id "cookerlog" build.id %}">Download build log</a>
+ {% if build.cooker_log_path %}
+ <a class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%else%}btn-danger{%endif%} pull-right log" href="{% url 'build_artifact' build.id "cookerlog" build.id %}">Download build log</a>
+ {% endif %}
</span>
{%endif%}