Skip to content

Commit

Permalink
toaster: builds pages Fix the download cooker log link
Browse files Browse the repository at this point in the history
The 'all builds' page was missing the download icon next to the outcome
icon, which allows you to download a build log from the 'all builds' page.

This patch brings it back. It also adds a check in the project builds page
to make sure the download icon only appears if the build generates a cooker
log, since builds that fail at the build request stage do not generate a
cooker log.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
Belen Barros Pena authored and rpurdie committed Nov 16, 2015
1 parent 10e1fbe commit 50d7ffa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 7 additions & 1 deletion lib/toaster/toastergui/templates/builds.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ <h1>
{% for build in objects %}
<tr class="data" data-table-build-result="{{ build.id }}">
<td class="outcome">
<a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a> &nbsp;
<a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a>
{% if build.cooker_log_path %}
&nbsp;
<a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
<i class="icon-download-alt" title="Download build log"></i>
</a>
{% endif %}
</td>
<td class="target">
{% for t in build.target_set.all %}
Expand Down
11 changes: 6 additions & 5 deletions lib/toaster/toastergui/templates/projectbuilds.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ <h2>
{% for build in objects %} {# if we have a build, just display it #}
<tr class="data">
<td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a>
{% if build.project %}
&nbsp; <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
<i class="icon-download-alt" title="" data-original-title="Download build log"></i>
</a>
{% endif %}
{% if build.cooker_log_path %}
&nbsp;
<a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
<i class="icon-download-alt" title="Download build log"></i>
</a>
{% endif %}
</td>

<td class="target">
Expand Down

0 comments on commit 50d7ffa

Please sign in to comment.