]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: cached outcome download button
authorDave Lerner <dave.lerner@windriver.com>
Thu, 5 Mar 2015 23:01:55 +0000 (17:01 -0600)
committerAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 9 Mar 2015 13:15:21 +0000 (13:15 +0000)
When a task is executed successfully without using saved-state cache,
then a button appears allowing the user to download the log file for
that task.  This commit allows the user to download the log file for a
task that is completed by unpacking data from the saved-state cache, a
task with outcome 'Cached'.  The same button 'Download task log' is
shown, which when pressed downloads the '_setscene' log file for that
task.

[YOCTO #7379]

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
lib/toaster/toastergui/templates/task.html

index 09fd25b259e93eb2f2c6b0253559fccc23b8afd6..907c621834fee8a903ab0035eed15d1f657b33ab 100644 (file)
             </dd>
         </dl>
     {%elif task.outcome == task.OUTCOME_CACHED%}
+        {% if MANAGED and build.project %}
+            {% for t in task.get_related_setscene %}
+                {% if forloop.last %}
+                    <a class="btn btn-large" href="{% url 'build_artifact' build.id "tasklogfile" t.pk %}" style="margin:15px;">Download task log</a>
+                {% endif %}
+            {% endfor %}
+        {% else %}
         <dl class="dl-horizontal">
             <dt>
                 <i class="icon-question-sign get-help" title="Path the task log file"></i> Log file
                 <code>{% for t in task.get_related_setscene %} {{t.logfile}} {% endfor %}</code>
             </dd>
         </dl>
+        {% endif %}
     {%elif task.outcome == task.OUTCOME_EMPTY%}
         <div class="alert alert-info details">
             This task is empty because it has the <code>noexec</code> flag set to <code>1</code>, or the task function is empty