aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-01-20 16:37:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-23 11:33:46 +0000
commit4957ec63a11d51dfac2252263e4d26c705eb31e9 (patch)
treebf47f397b4ffafe5063e7958a652baba6e91f9ec
parentf1cccafb4c7aa2c338e29ec5d2ea190dfeceb132 (diff)
downloadbitbake-4957ec63a11d51dfac2252263e4d26c705eb31e9.tar.gz
toastergui: fix all targets page search
This fixes the display of layers in all-targets page search/filtering usage pattern by displaying layer-equivalence class. The significant impact is the correct display of the list size for search/filtering actions [YOCTO #7051] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
-rwxr-xr-xlib/toaster/toastergui/views.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 6b4b5d993..616b57ca2 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -2494,9 +2494,12 @@ if toastermain.settings.MANAGED:
queryset_all = _get_queryset(Layer_Version, queryset_all, filter_string, search_term, ordering_string, '-layer__name')
+ object_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset_all])
+ object_list = list(object_list)
+
# retrieve the objects that will be displayed in the table; layers a paginator and gets a page range to display
- layer_info = _build_page_range(Paginator(queryset_all, request.GET.get('count', 10)),request.GET.get('page', 1))
+ layer_info = _build_page_range(Paginator(object_list, request.GET.get('count', 10)),request.GET.get('page', 1))
context = {
@@ -2504,7 +2507,7 @@ if toastermain.settings.MANAGED:
'objects' : layer_info,
'objectname' : "layers",
'default_orderby' : 'layer__name:+',
- 'total_count': queryset_all.count(),
+ 'total_count': len(object_list),
'tablecols' : [
{ 'name': 'Layer',