mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
b90a8dca99
commit
bdf62414f2
@@ -217,12 +217,10 @@ class MachinesTable(ToasterTable, ProjectFiltersMixin):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(MachinesTable, self).get_context_data(**kwargs)
|
||||
context['project'] = Project.objects.get(pk=kwargs['pid'])
|
||||
context['projectlayers'] = map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=context['project']))
|
||||
return context
|
||||
|
||||
def setup_filters(self, *args, **kwargs):
|
||||
project = Project.objects.get(pk=kwargs['pid'])
|
||||
self.project_layers = project.get_project_layer_versions()
|
||||
|
||||
self.add_filter(title="Filter by project machines",
|
||||
name="in_current_project",
|
||||
@@ -236,6 +234,10 @@ class MachinesTable(ToasterTable, ProjectFiltersMixin):
|
||||
self.queryset = prj.get_all_compatible_machines()
|
||||
self.queryset = self.queryset.order_by(self.default_orderby)
|
||||
|
||||
self.static_context_extra['current_layers'] = \
|
||||
self.project_layers = \
|
||||
prj.get_project_layer_versions(pk=True)
|
||||
|
||||
def setup_columns(self, *args, **kwargs):
|
||||
|
||||
self.add_column(title="Machine",
|
||||
|
||||
Reference in New Issue
Block a user