summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2015-09-29 08:15:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 14:11:38 +0100
commitd48b7ef607372488c1bf50762e4ca21773bf1e9a (patch)
tree6a78925e8d9accc14654e36a78e65ca3f3a9cf43 /bitbake
parentf902dc646dbfdf31fded69a425fb88944a7d8fe3 (diff)
downloadpoky-d48b7ef607372488c1bf50762e4ca21773bf1e9a.tar.gz
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 <David.Reyna@windriver.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/mrb_section.html16
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectbuilds.html10
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py3
3 files changed, 21 insertions, 8 deletions
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 @@
3{% load humanize %} 3{% load humanize %}
4 4
5 5
6{%if mru.count > 0%} 6{%if mru and mru.count > 0%}
7 7
8 <div class="page-header"> 8 {%if mrb_type == 'project' %}
9 <h2>
10 Latest project builds
11 </h2>
12 {% else %}
13 <div class="page-header">
9 <h1> 14 <h1>
10 Latest builds 15 Latest builds
11 </h1> 16 </h1>
12 </div> 17 </div>
18 {% endif %}
13 <div id="latest-builds"> 19 <div id="latest-builds">
14 {% for build in mru %} 20 {% for build in mru %}
15 <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} project-name "> 21 <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} project-name ">
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 @@
21 }); 21 });
22</script> 22</script>
23 23
24 {% with mrb_type='project' %}
25 {% include "mrb_section.html" %}
26 {% endwith %}
27
24 <h2> 28 <h2>
25 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %} 29 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
26 {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found 30 {{objects.paginator.count}} project build{{objects.paginator.count|pluralize}} found
27 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %} 31 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
28 No builds found 32 No project builds found
29 {%else%} 33 {%else%}
30 Project builds 34 All project builds
31 {%endif%} 35 {%endif%}
32 <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i> 36 <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
33 </h2> 37 </h2>
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:
2904 context['project'] = prj 2904 context['project'] = prj
2905 _set_parameters_values(pagesize, orderby, request) 2905 _set_parameters_values(pagesize, orderby, request)
2906 2906
2907 # add the most recent builds for this project
2908 context['mru'] = _get_latest_builds(prj)
2909
2907 return context 2910 return context
2908 2911
2909 2912