1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

bitbake: toaster: Show correct builds count on project pages

The counter for completed builds on the project pages
includes builds in progress.

Instead use the completedbuilds queryset to count the
number of completed builds for display on project pages.

Modify how the completedbuilds queryset is constructed so
it only excludes builds with status "in progress".

(Bitbake rev: 455a0087e0dcd74998abd02a110942f25da127be)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Elliot Smith
2015-09-04 10:37:45 +01:00
committed by Richard Purdie
parent 5528f3a8fd
commit 047245fff4
2 changed files with 3 additions and 3 deletions
@@ -57,8 +57,8 @@ function basePageInit(ctx) {
if ($(".total-builds").length !== 0){
libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){
if (prjInfo.builds)
$(".total-builds").text(prjInfo.builds.length);
if (prjInfo.completedbuilds)
$(".total-builds").text(prjInfo.completedbuilds.length);
});
}
+1 -1
View File
@@ -2263,7 +2263,7 @@ if True:
context = {
"project" : prj,
"lvs_nos" : Layer_Version.objects.all().count(),
"completedbuilds": Build.objects.filter(project_id = pid).filter(outcome__lte = Build.IN_PROGRESS),
"completedbuilds": Build.objects.exclude(outcome = Build.IN_PROGRESS).filter(project_id = pid),
"prj" : {"name": prj.name, },
"buildrequests" : prj.build_set.filter(outcome=Build.IN_PROGRESS),
"builds" : _project_recent_build_list(prj),