commit/galaxy-central: jgoecks: Add hidden attribute to tool outputs so that an output can be hidden by default.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/303741fda0ec/ changeset: 303741fda0ec user: jgoecks date: 2011-12-19 19:40:18 summary: Add hidden attribute to tool outputs so that an output can be hidden by default. affected #: 2 files diff -r 10e0d2765f24c32f840be414d88bf813321e41b5 -r 303741fda0ec4ce0fc7b42a0334a6c84f44c7a1f lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -316,7 +316,7 @@ """ def __init__( self, name, format=None, format_source=None, metadata_source=None, - parent=None, label=None, filters = None, actions = None ): + parent=None, label=None, filters = None, actions = None, hidden=False ): self.name = name self.format = format self.format_source = format_source @@ -325,6 +325,7 @@ self.label = label self.filters = filters or [] self.actions = actions + self.hidden = hidden # Tuple emulation @@ -677,6 +678,7 @@ output.count = int( data_elem.get("count", 1) ) output.filters = data_elem.findall( 'filter' ) output.from_work_dir = data_elem.get("from_work_dir", None) + output.hidden = data_elem.get("hidden", None) in [ 'true', 'True' ] output.tool = self output.actions = ToolOutputActionGroup( output, data_elem.find( 'actions' ) ) self.outputs[ output.name ] = output diff -r 10e0d2765f24c32f840be414d88bf813321e41b5 -r 303741fda0ec4ce0fc7b42a0334a6c84f44c7a1f lib/galaxy/tools/actions/__init__.py --- a/lib/galaxy/tools/actions/__init__.py +++ b/lib/galaxy/tools/actions/__init__.py @@ -286,6 +286,8 @@ if str( getattr( check, when_elem.get( 'attribute' ) ) ) == when_elem.get( 'value', None ): ext = when_elem.get( 'format', ext ) data = trans.app.model.HistoryDatasetAssociation( extension=ext, create_dataset=True, sa_session=trans.sa_session ) + if output.hidden: + data.visible = False # Commit the dataset immediately so it gets database assigned unique id trans.sa_session.add( data ) trans.sa_session.flush() Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket