From d48b7ef607372488c1bf50762e4ca21773bf1e9a Mon Sep 17 00:00:00 2001 From: David Reyna Date: Tue, 29 Sep 2015 08:15:19 +0100 Subject: bitbake: toaster: display most recent builds for projects Display the most recent builds in the given project's build page. [YOCTO #8186] (Bitbake rev: ce9a7f1819a1897878ce154b3ee7e727a76165b0) Signed-off-by: David Reyna Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- .../lib/toaster/toastergui/templates/mrb_section.html | 16 +++++++++++----- .../lib/toaster/toastergui/templates/projectbuilds.html | 10 +++++++--- bitbake/lib/toaster/toastergui/views.py | 3 +++ 3 files changed, 21 insertions(+), 8 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index b2c49fe365..2fefe4b0f7 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html @@ -3,13 +3,19 @@ {% load humanize %} -{%if mru.count > 0%} +{%if mru and mru.count > 0%} - + {% endif %}
{% for build in mru %}
diff --git a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html index fc659a02bb..fde7e3b9da 100644 --- a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html +++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html @@ -21,13 +21,17 @@ }); + {% with mrb_type='project' %} + {% include "mrb_section.html" %} + {% endwith %} +

{% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %} - {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found + {{objects.paginator.count}} project build{{objects.paginator.count|pluralize}} found {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %} - No builds found + No project builds found {%else%} - Project builds + All project builds {%endif%}

diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index b7eddf411d..9f16e8f76f 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -2904,6 +2904,9 @@ if True: context['project'] = prj _set_parameters_values(pagesize, orderby, request) + # add the most recent builds for this project + context['mru'] = _get_latest_builds(prj) + return context -- cgit v1.2.3-54-g00ecf