diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-02-09 13:54:14 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-10 23:07:51 +0000 |
commit | c8a8288f49ef7a4f3b59289034570bba440c81bd (patch) | |
tree | 0ad8b21ccaadd9f81fcd62b582502f865b84b290 /bitbake/lib/toaster | |
parent | ea7d2461b4a70252cb14cda07677e6d561a94d4b (diff) | |
download | poky-c8a8288f49ef7a4f3b59289034570bba440c81bd.tar.gz |
bitbake: toaster: All machines Fix filter counts
Filter counts needed to take into account the filters that had
previously been applied.
(Bitbake rev: 97ef99ea5107543799ec2386b3840b435347edfb)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 255b6a370d..a7f58ad5e1 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2814,11 +2814,6 @@ if toastermain.settings.MANAGED: | |||
2814 | queryset_all = queryset_all.exclude(layer_version__in=project_layers) | 2814 | queryset_all = queryset_all.exclude(layer_version__in=project_layers) |
2815 | by_pass_filter_string = True | 2815 | by_pass_filter_string = True |
2816 | 2816 | ||
2817 | selected_filter_count = { | ||
2818 | 'inprj' : queryset_all.filter(layer_version__in=project_layers).count(), | ||
2819 | 'notinprj' : queryset_all.exclude(layer_version__in=project_layers).count() | ||
2820 | } | ||
2821 | |||
2822 | # END FILTERS | 2817 | # END FILTERS |
2823 | 2818 | ||
2824 | if by_pass_filter_string: | 2819 | if by_pass_filter_string: |
@@ -2834,13 +2829,16 @@ if toastermain.settings.MANAGED: | |||
2834 | queryset = queryset.exclude(layer_version__in=to_rm) | 2829 | queryset = queryset.exclude(layer_version__in=to_rm) |
2835 | 2830 | ||
2836 | machine_info = _build_page_range(Paginator(queryset, request.GET.get('count', 10)),request.GET.get('page', 1)) | 2831 | machine_info = _build_page_range(Paginator(queryset, request.GET.get('count', 10)),request.GET.get('page', 1)) |
2832 | selected_filter_count = {} | ||
2833 | selected_filter_count['inprj'] = queryset.filter(layer_version__in=project_layers).count() | ||
2834 | selected_filter_count['notinprj'] = queryset.count() - selected_filter_count['inprj'] | ||
2837 | 2835 | ||
2838 | context = { | 2836 | context = { |
2839 | 'objects' : machine_info, | 2837 | 'objects' : machine_info, |
2840 | 'project_layers' : project_layers, | 2838 | 'project_layers' : project_layers, |
2841 | 'objectname' : "machines", | 2839 | 'objectname' : "machines", |
2842 | 'default_orderby' : 'name:+', | 2840 | 'default_orderby' : 'name:+', |
2843 | 'total_count': machine_info.paginator.count, | 2841 | 'total_count': queryset.count(), |
2844 | 2842 | ||
2845 | 'tablecols' : [ | 2843 | 'tablecols' : [ |
2846 | { 'name': 'Machine', | 2844 | { 'name': 'Machine', |