diff options
author | Elliot Smith <elliot.smith@intel.com> | 2015-09-04 10:37:45 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-18 09:05:35 +0100 |
commit | 047245fff43909965ff3df6b23602b5716ed7a21 (patch) | |
tree | 41ee477829488da7869effdede09be06d3fa4348 | |
parent | 5528f3a8fd3c4839b8b1b3976d4dc1b26ffa7458 (diff) | |
download | poky-047245fff43909965ff3df6b23602b5716ed7a21.tar.gz |
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>
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/base.js | 4 | ||||
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js index e0df463979..895e61b2aa 100644 --- a/bitbake/lib/toaster/toastergui/static/js/base.js +++ b/bitbake/lib/toaster/toastergui/static/js/base.js | |||
@@ -57,8 +57,8 @@ function basePageInit(ctx) { | |||
57 | 57 | ||
58 | if ($(".total-builds").length !== 0){ | 58 | if ($(".total-builds").length !== 0){ |
59 | libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){ | 59 | libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){ |
60 | if (prjInfo.builds) | 60 | if (prjInfo.completedbuilds) |
61 | $(".total-builds").text(prjInfo.builds.length); | 61 | $(".total-builds").text(prjInfo.completedbuilds.length); |
62 | }); | 62 | }); |
63 | } | 63 | } |
64 | 64 | ||
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 45a5611724..67c84b2934 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2263,7 +2263,7 @@ if True: | |||
2263 | context = { | 2263 | context = { |
2264 | "project" : prj, | 2264 | "project" : prj, |
2265 | "lvs_nos" : Layer_Version.objects.all().count(), | 2265 | "lvs_nos" : Layer_Version.objects.all().count(), |
2266 | "completedbuilds": Build.objects.filter(project_id = pid).filter(outcome__lte = Build.IN_PROGRESS), | 2266 | "completedbuilds": Build.objects.exclude(outcome = Build.IN_PROGRESS).filter(project_id = pid), |
2267 | "prj" : {"name": prj.name, }, | 2267 | "prj" : {"name": prj.name, }, |
2268 | "buildrequests" : prj.build_set.filter(outcome=Build.IN_PROGRESS), | 2268 | "buildrequests" : prj.build_set.filter(outcome=Build.IN_PROGRESS), |
2269 | "builds" : _project_recent_build_list(prj), | 2269 | "builds" : _project_recent_build_list(prj), |