summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2014-03-15 15:10:27 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-25 11:17:33 +0000
commitef1063610a82c52ab2bdd4466d3c6f2042b75262 (patch)
treecd93c6a62920625bf5573c54fe812e656900ab66 /bitbake/lib/toaster
parent4f02193f050666ff70821a6d8ef2ac2a744ef3fd (diff)
downloadpoky-ef1063610a82c52ab2bdd4466d3c6f2042b75262.tar.gz
bitbake: toaster: reset default filter for configvar page on new searches
The configvar page has a default filter by design. However, new search terms should override and clear that filter, for consistency across the interface. [YOCTO #5961] (Bitbake rev: b80c578d9330a45e9c2502701de2ebb6307b1caf) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/toastergui/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 97514cc0f6..eaa6cf8c5f 100644
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -1010,10 +1010,13 @@ def configvars(request, build_id):
1010 template = 'configvars.html' 1010 template = 'configvars.html'
1011 mandatory_parameters = { 'count': 100, 'page' : 1, 'orderby':'variable_name:+', 'filter':'description__regex:.+'}; 1011 mandatory_parameters = { 'count': 100, 'page' : 1, 'orderby':'variable_name:+', 'filter':'description__regex:.+'};
1012 retval = _verify_parameters( request.GET, mandatory_parameters ) 1012 retval = _verify_parameters( request.GET, mandatory_parameters )
1013 (filter_string, search_term, ordering_string) = _search_tuple(request, Variable)
1013 if retval: 1014 if retval:
1015 # if new search, clear the default filter
1016 if search_term and len(search_term):
1017 mandatory_parameters['filter']=''
1014 return _redirect_parameters( 'configvars', request.GET, mandatory_parameters, build_id = build_id) 1018 return _redirect_parameters( 'configvars', request.GET, mandatory_parameters, build_id = build_id)
1015 1019
1016 (filter_string, search_term, ordering_string) = _search_tuple(request, Variable)
1017 queryset = Variable.objects.filter(build=build_id).exclude(variable_name__istartswith='B_').exclude(variable_name__istartswith='do_') 1020 queryset = Variable.objects.filter(build=build_id).exclude(variable_name__istartswith='B_').exclude(variable_name__istartswith='do_')
1018 queryset_with_search = _get_queryset(Variable, queryset, None, search_term, ordering_string).distinct().exclude(variable_value='',vhistory__file_name__isnull=True) 1021 queryset_with_search = _get_queryset(Variable, queryset, None, search_term, ordering_string).distinct().exclude(variable_value='',vhistory__file_name__isnull=True)
1019 queryset = _get_queryset(Variable, queryset, filter_string, search_term, ordering_string) 1022 queryset = _get_queryset(Variable, queryset, filter_string, search_term, ordering_string)