diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-11-26 16:44:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-07 17:01:20 +0000 |
commit | bdf62414f2e0a53a39abcb97152a8d60d8f28cee (patch) | |
tree | e8ee514730017465542fc9ded368182669be372e /bitbake/lib/toaster/toastergui/tables.py | |
parent | b90a8dca99656c5f4dead0e092c7e1c0e27fe640 (diff) | |
download | poky-bdf62414f2e0a53a39abcb97152a8d60d8f28cee.tar.gz |
bitbake: toaster: machines table Fix missing layers information needed for filter
The current layers information wasn't being passed to the template for
the Select/Add button for the Compatible machines filter.
(Bitbake rev: 559102984d3f62a7675899e058166bdf4d552c46)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/tables.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/tables.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index 9c9cda4e95..be8916c468 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py | |||
@@ -217,12 +217,10 @@ class MachinesTable(ToasterTable, ProjectFiltersMixin): | |||
217 | def get_context_data(self, **kwargs): | 217 | def get_context_data(self, **kwargs): |
218 | context = super(MachinesTable, self).get_context_data(**kwargs) | 218 | context = super(MachinesTable, self).get_context_data(**kwargs) |
219 | context['project'] = Project.objects.get(pk=kwargs['pid']) | 219 | context['project'] = Project.objects.get(pk=kwargs['pid']) |
220 | context['projectlayers'] = map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=context['project'])) | ||
221 | return context | 220 | return context |
222 | 221 | ||
223 | def setup_filters(self, *args, **kwargs): | 222 | def setup_filters(self, *args, **kwargs): |
224 | project = Project.objects.get(pk=kwargs['pid']) | 223 | project = Project.objects.get(pk=kwargs['pid']) |
225 | self.project_layers = project.get_project_layer_versions() | ||
226 | 224 | ||
227 | self.add_filter(title="Filter by project machines", | 225 | self.add_filter(title="Filter by project machines", |
228 | name="in_current_project", | 226 | name="in_current_project", |
@@ -236,6 +234,10 @@ class MachinesTable(ToasterTable, ProjectFiltersMixin): | |||
236 | self.queryset = prj.get_all_compatible_machines() | 234 | self.queryset = prj.get_all_compatible_machines() |
237 | self.queryset = self.queryset.order_by(self.default_orderby) | 235 | self.queryset = self.queryset.order_by(self.default_orderby) |
238 | 236 | ||
237 | self.static_context_extra['current_layers'] = \ | ||
238 | self.project_layers = \ | ||
239 | prj.get_project_layer_versions(pk=True) | ||
240 | |||
239 | def setup_columns(self, *args, **kwargs): | 241 | def setup_columns(self, *args, **kwargs): |
240 | 242 | ||
241 | self.add_column(title="Machine", | 243 | self.add_column(title="Machine", |