diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-01-20 16:37:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-23 11:33:53 +0000 |
commit | c546815eeea92ebda4fe4120a7634218db763892 (patch) | |
tree | 23064d3c5540652e1f87f05d5bc7859f1fff212a /bitbake/lib/toaster/toastergui/views.py | |
parent | 4571c827a4491132a8e85a721c816a2a2fff3ce7 (diff) | |
download | poky-c546815eeea92ebda4fe4120a7634218db763892.tar.gz |
bitbake: 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]
(Bitbake rev: 4957ec63a11d51dfac2252263e4d26c705eb31e9)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 6b4b5d9936..616b57ca2f 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2494,9 +2494,12 @@ if toastermain.settings.MANAGED: | |||
2494 | 2494 | ||
2495 | queryset_all = _get_queryset(Layer_Version, queryset_all, filter_string, search_term, ordering_string, '-layer__name') | 2495 | queryset_all = _get_queryset(Layer_Version, queryset_all, filter_string, search_term, ordering_string, '-layer__name') |
2496 | 2496 | ||
2497 | object_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset_all]) | ||
2498 | object_list = list(object_list) | ||
2499 | |||
2497 | 2500 | ||
2498 | # retrieve the objects that will be displayed in the table; layers a paginator and gets a page range to display | 2501 | # retrieve the objects that will be displayed in the table; layers a paginator and gets a page range to display |
2499 | layer_info = _build_page_range(Paginator(queryset_all, request.GET.get('count', 10)),request.GET.get('page', 1)) | 2502 | layer_info = _build_page_range(Paginator(object_list, request.GET.get('count', 10)),request.GET.get('page', 1)) |
2500 | 2503 | ||
2501 | 2504 | ||
2502 | context = { | 2505 | context = { |
@@ -2504,7 +2507,7 @@ if toastermain.settings.MANAGED: | |||
2504 | 'objects' : layer_info, | 2507 | 'objects' : layer_info, |
2505 | 'objectname' : "layers", | 2508 | 'objectname' : "layers", |
2506 | 'default_orderby' : 'layer__name:+', | 2509 | 'default_orderby' : 'layer__name:+', |
2507 | 'total_count': queryset_all.count(), | 2510 | 'total_count': len(object_list), |
2508 | 2511 | ||
2509 | 'tablecols' : [ | 2512 | 'tablecols' : [ |
2510 | { 'name': 'Layer', | 2513 | { 'name': 'Layer', |