summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastermain/settings.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-15 13:01:03 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 16:30:01 +0000
commit059a274aa96ced872156806936f887969980dda6 (patch)
tree8494b689ce4ad1226fbf79b67b2e9189bf8640d5 /bitbake/lib/toaster/toastermain/settings.py
parent4103e0cb748888d83a5a892b5a022d633846bce8 (diff)
downloadpoky-059a274aa96ced872156806936f887969980dda6.tar.gz
bitbake: toastergui: fix error and warning counts for builds
The error and warning counts displayed for builds were counts of the errors and warnings objects associated with a build. Because these values were being derived on the fly, it was not possible to sort by them. Previously, the 3rd party django-aggregate-if library was used to add aggregate fields to Build objects and should then have been used to populate the "all builds" and "project builds" tables. However, at some point the templates had changed so that the error and warning counts were coming from the properties on the Build model and not from these aggregates. This meant that it was not possible to sort by these fields. Django 1.8 supports conditional aggregates in annotation fields on querysets. This means we can remove django-aggregate-if, use the new Django 1.8 feature to derive errors_no and warnings_no fields as annotations, then use those annotation fields in the templates. This makes the "builds" tables sortable again. [YOCTO #8738] (Bitbake rev: 9be7c5c18b325f6ed40bc431ac408db242007eb1) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastermain/settings.py')
-rw-r--r--bitbake/lib/toaster/toastermain/settings.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index 74103f3063..c4f3d6bfff 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -399,12 +399,3 @@ class InvalidString(str):
399 "Undefined variable or unknown value for: \"%s\"" % other) 399 "Undefined variable or unknown value for: \"%s\"" % other)
400 400
401TEMPLATE_STRING_IF_INVALID = InvalidString("%s") 401TEMPLATE_STRING_IF_INVALID = InvalidString("%s")
402
403import sys
404sys.path.append(
405 os.path.join(
406 os.path.join(
407 os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
408 "contrib"),
409 "django-aggregate-if-master")
410 )