summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2015-10-15 15:45:15 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-16 14:13:23 +0100
commiteb8b2b9ec89868b5f7191643276d226fcf4b5add (patch)
tree6f06134c01e2c97cfc80b2f14108ee35c4f31426 /bitbake/lib
parent65e8bde9f1e055e4d01dd13b72c9c88c6447dcdb (diff)
downloadpoky-eb8b2b9ec89868b5f7191643276d226fcf4b5add.tar.gz
bitbake: toaster: Guard against builds with no targets
Although this probably can't happen in practice (builds without targets), this constraint is not currently enforced in the data model. In the unlikely event that a build has no target (e.g. in test cases), this causes a template rendering error. Rather than rework the data model, add a guard to the template to prevent it from rendering the target name if there are no targets associated with the build. (Bitbake rev: 4f409d8c01bae898ea142bd1417db99e12067753) 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>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/builddashboard.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
index 75ca8bc2c0..c39fe3457a 100644
--- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html
+++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
@@ -3,7 +3,12 @@
3{% load projecttags %} 3{% load projecttags %}
4 4
5{% block parentbreadcrumb %} 5{% block parentbreadcrumb %}
6{{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}}) 6{% if build.get_sorted_target_list.count > 0 %}
7 {{build.get_sorted_target_list.0.target}}
8 &nbsp;
9{% endif %}
10
11{%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
7{% endblock %} 12{% endblock %}
8 13
9{% block buildinfomain %} 14{% block buildinfomain %}
@@ -62,7 +67,7 @@
62 <div class="accordion-inner"> 67 <div class="accordion-inner">
63 <div class="span10"> 68 <div class="span10">
64 {% for error in build.errors %} 69 {% for error in build.errors %}
65 <div class="alert alert-error"> 70 <div class="alert alert-error" data-error="{{ error.id }}">
66 <pre>{{error.message}}</pre> 71 <pre>{{error.message}}</pre>
67 </div> 72 </div>
68 {% endfor %} 73 {% endfor %}