diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-06-18 14:14:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-26 09:27:33 +0100 |
commit | d21e1749c867b72ab7a9e40262a201f8efbc7668 (patch) | |
tree | 5cd86204fdf7df2fb01e0fea0a85e6e02786a2b5 /bitbake/lib/toaster | |
parent | 93c54c2f9d708727116451a346b13e7e5a74577e (diff) | |
download | poky-d21e1749c867b72ab7a9e40262a201f8efbc7668.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r-- | bitbake/lib/toaster/toastergui/widgets.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index e257c702eb..5f6b47b663 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/lib/toaster/toastergui/widgets.py | |||
@@ -72,7 +72,7 @@ class ToasterTable(TemplateView): | |||
72 | 72 | ||
73 | cmd = request.GET.get('cmd', None) | 73 | cmd = request.GET.get('cmd', None) |
74 | if cmd and 'filterinfo' in cmd: | 74 | if cmd and 'filterinfo' in cmd: |
75 | data = self.get_filter_info(request) | 75 | data = self.get_filter_info(request, **kwargs) |
76 | else: | 76 | else: |
77 | # If no cmd is specified we give you the table data | 77 | # If no cmd is specified we give you the table data |
78 | data = self.get_data(request, **kwargs) | 78 | data = self.get_data(request, **kwargs) |
@@ -81,10 +81,10 @@ class ToasterTable(TemplateView): | |||
81 | 81 | ||
82 | return super(ToasterTable, self).get(request, *args, **kwargs) | 82 | return super(ToasterTable, self).get(request, *args, **kwargs) |
83 | 83 | ||
84 | def get_filter_info(self, request): | 84 | def get_filter_info(self, request, **kwargs): |
85 | data = None | 85 | data = None |
86 | 86 | ||
87 | self.setup_filters() | 87 | self.setup_filters(**kwargs) |
88 | 88 | ||
89 | search = request.GET.get("search", None) | 89 | search = request.GET.get("search", None) |
90 | if search: | 90 | if search: |
@@ -194,8 +194,8 @@ class ToasterTable(TemplateView): | |||
194 | 194 | ||
195 | return template.render(context) | 195 | return template.render(context) |
196 | 196 | ||
197 | def apply_filter(self, filters): | 197 | def apply_filter(self, filters, **kwargs): |
198 | self.setup_filters() | 198 | self.setup_filters(**kwargs) |
199 | 199 | ||
200 | try: | 200 | try: |
201 | filter_name, filter_action = filters.split(':') | 201 | filter_name, filter_action = filters.split(':') |
@@ -264,7 +264,7 @@ class ToasterTable(TemplateView): | |||
264 | if search: | 264 | if search: |
265 | self.apply_search(search) | 265 | self.apply_search(search) |
266 | if filters: | 266 | if filters: |
267 | self.apply_filter(filters) | 267 | self.apply_filter(filters, **kwargs) |
268 | if orderby: | 268 | if orderby: |
269 | self.apply_orderby(orderby) | 269 | self.apply_orderby(orderby) |
270 | 270 | ||