mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 12:32:12 +02:00
bitbake: toaster: toastertable Pass up the kwargs for setup_filter
This allows us to setup_filter in tables using args such as the current project. (Bitbake rev: e0d59c32a7cff76d732a90cc6d507c7a9b68cb84) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
93c54c2f9d
commit
d21e1749c8
@@ -72,7 +72,7 @@ class ToasterTable(TemplateView):
|
||||
|
||||
cmd = request.GET.get('cmd', None)
|
||||
if cmd and 'filterinfo' in cmd:
|
||||
data = self.get_filter_info(request)
|
||||
data = self.get_filter_info(request, **kwargs)
|
||||
else:
|
||||
# If no cmd is specified we give you the table data
|
||||
data = self.get_data(request, **kwargs)
|
||||
@@ -81,10 +81,10 @@ class ToasterTable(TemplateView):
|
||||
|
||||
return super(ToasterTable, self).get(request, *args, **kwargs)
|
||||
|
||||
def get_filter_info(self, request):
|
||||
def get_filter_info(self, request, **kwargs):
|
||||
data = None
|
||||
|
||||
self.setup_filters()
|
||||
self.setup_filters(**kwargs)
|
||||
|
||||
search = request.GET.get("search", None)
|
||||
if search:
|
||||
@@ -194,8 +194,8 @@ class ToasterTable(TemplateView):
|
||||
|
||||
return template.render(context)
|
||||
|
||||
def apply_filter(self, filters):
|
||||
self.setup_filters()
|
||||
def apply_filter(self, filters, **kwargs):
|
||||
self.setup_filters(**kwargs)
|
||||
|
||||
try:
|
||||
filter_name, filter_action = filters.split(':')
|
||||
@@ -264,7 +264,7 @@ class ToasterTable(TemplateView):
|
||||
if search:
|
||||
self.apply_search(search)
|
||||
if filters:
|
||||
self.apply_filter(filters)
|
||||
self.apply_filter(filters, **kwargs)
|
||||
if orderby:
|
||||
self.apply_orderby(orderby)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user