]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: builds pages Fix the download cooker log link
authorBelen Barros Pena <belen.barros.pena@intel.com>
Tue, 10 Nov 2015 17:08:03 +0000 (17:08 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Nov 2015 11:51:24 +0000 (11:51 +0000)
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>
lib/toaster/toastergui/templates/builds.html
lib/toaster/toastergui/templates/projectbuilds.html

index a27a1219135b9d0e083f9377ea2f8837158dcd54..c3cc266daf809c38f45c8027d2801d222a96eeb9 100644 (file)
         {% 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 %}
index bb38284aab44fc22938f4653bb90f31fbeb3282b..3402fc4fe1dc33920c6dfd1b99be8143b30a77f2 100644 (file)
         {% 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">