]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: display most recent builds for projects
authorDavid Reyna <David.Reyna@windriver.com>
Tue, 29 Sep 2015 07:15:19 +0000 (08:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Sep 2015 13:11:00 +0000 (14:11 +0100)
Display the most recent builds in the given project's build page.

[YOCTO #8186]

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>
lib/toaster/toastergui/templates/mrb_section.html
lib/toaster/toastergui/templates/projectbuilds.html
lib/toaster/toastergui/views.py

index b2c49fe365225e380fcd72be3c40af254bda2edf..2fefe4b0f75edf21ee05ce86c48cba0a82cd3bb4 100644 (file)
@@ -3,13 +3,19 @@
 {% load humanize %}
 
 
-{%if mru.count > 0%}
+{%if mru and mru.count > 0%}
 
-  <div class="page-header">
+  {%if mrb_type == 'project' %}
+      <h2>
+      Latest project builds
+      </h2>
+  {% else %}
+    <div class="page-header">
       <h1>
-          Latest builds
-       </h1>
-  </div>
+      Latest builds
+      </h1>
+    </div>
+  {% endif %}
   <div id="latest-builds">
   {% for build in mru %}
     <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} project-name ">
index fc659a02bb2336ee2bbdd3994eae750664d46a6c..fde7e3b9dae60544a5f28c06052085d8c45c5205 100644 (file)
     });
 </script>
 
+ {% with mrb_type='project' %}
+     {% include "mrb_section.html" %}
+ {% endwith %}
+
       <h2>
         {% 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%}
         <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
       </h2>
index b7eddf411d19ae5b4f4cbe289bab7fb73be72042..9f16e8f76fcc10f0aeb59b05a11c34e5903eaa38 100755 (executable)
@@ -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