aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-10-09 10:32:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-11 08:11:29 +0100
commit41a5f82b4ac0c689df4cfc673ce574c2d70f413c (patch)
treed19d3c92a33985eb2692ab4df2c1069f565ffd73 /bitbake
parent2bebcd4995aff8c691779688d3253b9e88dc9a3a (diff)
downloadopenembedded-core-contrib-41a5f82b4ac0c689df4cfc673ce574c2d70f413c.tar.gz
bitbake: toaster: tables Add the recipe filter back into the Recipe table
Add the "Is recipe currently available in the project" filter back to the Recipe table which was removed when we had intermediate AvailableRecipe tables. (Bitbake rev: b3682d1d851e616efa0715f9d43815a92e259432) 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')
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index a676ffa98b..4f24772206 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -335,10 +335,23 @@ class RecipesTable(ToasterTable, ProjectFiltersMixin):
return context
+ def setup_filters(self, *args, **kwargs):
+ self.add_filter(title="Filter by project recipes",
+ name="in_current_project",
+ filter_actions=[
+ self.make_filter_action("in_project", "Recipes provided by layers added to this project", self.filter_in_project),
+ self.make_filter_action("not_in_project", "Recipes provided by layers not added to this project", self.filter_not_in_project)
+ ])
def setup_queryset(self, *args, **kwargs):
prj = Project.objects.get(pk = kwargs['pid'])
+ # Project layers used by the filters
+ self.project_layers = prj.get_project_layer_versions(pk=True)
+
+ # Project layers used to switch the button states
+ self.static_context_extra['current_layers'] = self.project_layers
+
self.queryset = prj.get_all_compatible_recipes()
self.queryset = self.queryset.order_by(self.default_orderby)