summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py32
1 files changed, 31 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index e9f1fdccb1..7b335c8870 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -658,7 +658,37 @@ class SelectPackagesTable(ToasterTable):
658 help_text="Use the add and remove buttons to modify " 658 help_text="Use the add and remove buttons to modify "
659 "the package content of you custom image", 659 "the package content of you custom image",
660 static_data_name="add_rm_pkg_btn", 660 static_data_name="add_rm_pkg_btn",
661 static_data_template='{% include "pkg_add_rm_btn.html" %}') 661 static_data_template='{% include "pkg_add_rm_btn.html" %}',
662 static_data_template='{% include "pkg_add_rm_btn.html" %}'
663 )
664
665 def setup_filters(self, *args, **kwargs):
666 project = Project.objects.get(pk=kwargs['pid'])
667 self.project_layers = ProjectLayer.objects.filter(project=project)
668
669
670 self.add_filter(title="Filter by added packages",
671 name="in_current_image",
672 filter_actions=[
673 self.make_filter_action(
674 "in_image",
675 "Packages in %s" % self.cust_recipe.name,
676 self.filter_in_image),
677 self.make_filter_action(
678 "not_in_image",
679 "Packages not added to %s" %
680 self.cust_recipe.name,
681 self.filter_not_in_image)
682 ])
683
684 def filter_in_image(self, count_only=False):
685 return self.queryset.filter(
686 pk__in=self.static_context_extra['current_packages'])
687
688
689 def filter_not_in_image(self, count_only=False):
690 return self.queryset.exclude(
691 pk__in=self.static_context_extra['current_packages'])
662 692
663class ProjectsTable(ToasterTable): 693class ProjectsTable(ToasterTable):
664 """Table of projects in Toaster""" 694 """Table of projects in Toaster"""