commit/galaxy-central: carlfeberhard: Saved visualizations list: use vis-reg plugin display name for type column (if available)
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/b0919189ecfa/ Changeset: b0919189ecfa User: carlfeberhard Date: 2014-02-14 17:21:51 Summary: Saved visualizations list: use vis-reg plugin display name for type column (if available) Affected #: 1 file diff -r 044ead55435801561acdf72fe225209239202a5a -r b0919189ecfa6a779d776dfc5a52f541214ddcc5 lib/galaxy/webapps/galaxy/controllers/visualization.py --- a/lib/galaxy/webapps/galaxy/controllers/visualization.py +++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py @@ -202,6 +202,12 @@ url_kwargs[ 'action' ] = 'saved' return url_kwargs + def get_display_name( self, trans, item ): + if trans.app.visualizations_registry and item.type in trans.app.visualizations_registry.plugins: + plugin = trans.app.visualizations_registry.plugins[ item.type ] + return plugin.config.get( 'name', item.type ) + return item.type + # Grid definition title = "Saved Visualizations" model_class = model.Visualization @@ -209,8 +215,7 @@ default_filter = dict( title="All", deleted="False", tags="All", sharing="All" ) columns = [ grids.TextColumn( "Title", key="title", attach_popup=True, link=get_url_args ), - #TODO: should use display name when available - grids.TextColumn( "Type", key="type" ), + grids.TextColumn( "Type", method='get_display_name' ), grids.TextColumn( "Dbkey", key="dbkey" ), grids.IndividualTagsColumn( "Tags", key="tags", model_tag_association_class=model.VisualizationTagAssociation, filterable="advanced", grid_name="VisualizationListGrid" ), grids.SharingStatusColumn( "Sharing", key="sharing", filterable="advanced", sortable=False ), 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)
-
commits-noreply@bitbucket.org