From f08730ab4de72999236ed5fc5df2286febd542e7 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Fri, 15 Jan 2016 13:01:00 +0200 Subject: bitbake: toastergui: set default visible and hideable columns Incorrect columns were shown by default in the "all builds", "project builds" and "all projects" pages. Set the "hidden" property on columns in these tables to hide the correct columns. Add a set_column_hidden() method to ToasterTable so that the "hidden" property can be overridden for the machines column in the project builds page (it shares a superclass with all builds). Make the time column on all builds page hideable. [YOCTO #8738] (Bitbake rev: be3982c71703eaa51e7f3352e0cb5b3af11c9ead) Signed-off-by: Elliot Smith Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/widgets.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'bitbake/lib/toaster/toastergui/widgets.py') diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index d9328d4cdc..d2ef5d3dba 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/lib/toaster/toastergui/widgets.py @@ -168,6 +168,24 @@ class ToasterTable(TemplateView): 'computation': computation, }) + def set_column_hidden(self, title, hidden): + """ + Set the hidden state of the column to the value of hidden + """ + for col in self.columns: + if col['title'] == title: + col['hidden'] = hidden + break + + def set_column_hideable(self, title, hideable): + """ + Set the hideable state of the column to the value of hideable + """ + for col in self.columns: + if col['title'] == title: + col['hideable'] = hideable + break + def render_static_data(self, template, row): """Utility function to render the static data template""" -- cgit v1.2.3-54-g00ecf