toaster: fix download URL for task logs
PATCH 1/1 toaster: fix download URL for task logs
The task display template formatting had split the Django url template tag across two lines and broken it. This resulted in a gibberish URL for task logs.
Fix by placing the call to the tag on a single line.
[YOCTO #9837]
--- bitbake/lib/toaster/toastergui/templates/task.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/templates/task.html +4 -2
@@ -25,8 +25,10 @@ {%if task.task_executed %} {# executed tasks outcome #} {% if task.logfile %} - <a class="btn btn-default btn-lg" href="{% url 'build_artifact' build.id - "tasklogfile" task.pk %}">Download task log</a> + <a class="btn btn-default btn-lg" + href="{% url 'build_artifact' build.id 'tasklogfile' task.pk %}"> + Download task log + </a> {% endif %} {# show stack trace for failed task #} {% if task.outcome == task.OUTCOME_FAILED and log_head %}
Signature · 1 line
2.7.4
Quoted 7 lines · On 15/07/2016 16:00, "[email protected] on behalf of Elliot…
The task display template formatting had split the Django url template tag across two lines and broken it. This resulted in a gibberish URL for task logs.
Fix by placing the call to the tag on a single line.
[YOCTO #9837]
This seems to work for tasks with outcome "executed", but I still see the 404 error when I try to download the log for tasks with outcome "cached".
Thanks!
Belén
Quoted 34 lines
Signed-off-by Elliot Smith <[email protected]>---
bitbake/lib/toaster/toastergui/templates/task.html | 6 ++++--1 file changed, 4 insertions(+), 2 deletions(-)bitbake/lib/toaster/toastergui/templates/task.html +0
-1@@ -25,8 +25,10 @@ {%if task.task_executed %} {# executed tasks outcome #} {% if task.logfile %} - <a class="btn btn-default btn-lg" href="{% url'
build_artifact' build.idbitbake/lib/toaster/toastergui/templates/task.html +2
-1- "tasklogfile" task.pk %}">Download task log</a> + <a class="btn btn-default btn-lg" + href="{% url 'build_artifact' build.id 'tasklogfile'task.pk %}">
bitbake/lib/toaster/toastergui/templates/task.html +2
-0+ Download task log + </a> {% endif %} {# show stack trace for failed task #} {% if task.outcome == task.OUTCOME_FAILED and log_head %}Signature · 7 lines
2.7.4 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
PATCH v2 1/1 toaster: fix download URL for task logs
In reply to Elliot SmithThe task display template formatting had split the Django url template tag across two lines and broken it. This resulted in a gibberish URL for task logs.
Fix by placing the tag and its arguments on a single line.
[YOCTO #9837]
--- bitbake/lib/toaster/toastergui/templates/task.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
bitbake/lib/toaster/toastergui/templates/task.html +8 -4
@@ -25,8 +25,10 @@ {%if task.task_executed %} {# executed tasks outcome #} {% if task.logfile %} - <a class="btn btn-default btn-lg" href="{% url 'build_artifact' build.id - "tasklogfile" task.pk %}">Download task log</a> + <a class="btn btn-default btn-lg" + href="{% url 'build_artifact' build.id 'tasklogfile' task.pk %}"> + Download task log + </a> {% endif %} {# show stack trace for failed task #} {% if task.outcome == task.OUTCOME_FAILED and log_head %}
@@ -156,8 +158,10 @@ this prebuilt task is reusing"></span></a> {%elif task.outcome == task.OUTCOME_CACHED%} {% for t in task.get_related_setscene %} {% if forloop.last %} - <a class="btn btn-default btn-lg" href="{% url - 'build_artifact' build.id "tasklogfile" t.pk %}">Download task log</a> + <a class="btn btn-default btn-lg" + href="{% url 'build_artifact' build.id "tasklogfile" t.pk %}"> + Download task log + </a> {% endif %} {% endfor %}
Signature · 1 line
2.7.4
Quoted 7 lines · On 19/07/2016 13:07, "[email protected] on behalf of Elliot…
The task display template formatting had split the Django url template tag across two lines and broken it. This resulted in a gibberish URL for task logs.
Fix by placing the tag and its arguments on a single line.
[YOCTO #9837]
This seems to work well. Thanks!
Belén
Quoted 49 lines
Signed-off-by Elliot Smith <[email protected]>---
bitbake/lib/toaster/toastergui/templates/task.html | 12 ++++++++----1 file changed, 8 insertions(+), 4 deletions(-)bitbake/lib/toaster/toastergui/templates/task.html +0
-1@@ -25,8 +25,10 @@ {%if task.task_executed %} {# executed tasks outcome #} {% if task.logfile %} - <a class="btn btn-default btn-lg" href="{% url'
build_artifact' build.idbitbake/lib/toaster/toastergui/templates/task.html +2
-1- "tasklogfile" task.pk %}">Download task log</a> + <a class="btn btn-default btn-lg" + href="{% url 'build_artifact' build.id 'tasklogfile'task.pk %}">
bitbake/lib/toaster/toastergui/templates/task.html +2
-2+ Download task log + </a> {% endif %} {# show stack trace for failed task #} {% if task.outcome == task.OUTCOME_FAILED and log_head %}@@ -156,8 +158,10 @@ this prebuilt task is reusing"></span></a> {%elif task.outcome == task.OUTCOME_CACHED%} {% for t in task.get_related_setscene %} {% if forloop.last %} - <a class="btn btn-default btn-lg" href="{% url - 'build_artifact' build.id "tasklogfile" t.pk%}">Download task log</a>
bitbake/lib/toaster/toastergui/templates/task.html +2
-0+ <a class="btn btn-default btn-lg" + href="{% url 'build_artifact' build.id"tasklogfile" t.pk %}">
bitbake/lib/toaster/toastergui/templates/task.html +2
-0+ Download task log + </a> {% endif %} {% endfor %}Signature · 8 lines
-- 2.7.4 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster