2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/76a1a432fc20/ Changeset: 76a1a432fc20 Branch: next-stable User: carlfeberhard Date: 2013-03-28 16:21:23 Summary: UsesHDA: fix new-style display apps; documentation Affected #: 1 file diff -r d64d821891f5d7678205c2261c66e13b348049f9 -r 76a1a432fc202cd7f44bf97e0e5d361d3159d2aa lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -332,6 +332,8 @@ return None def get_hda_dict( self, trans, hda ): + """Return full details of this HDA in dictionary form. + """ hda_dict = hda.get_api_value( view='element' ) history = hda.history hda_dict[ 'api_type' ] = "file" @@ -341,9 +343,10 @@ can_access_hda = ( trans.user_is_admin() or can_access_hda ) hda_dict[ 'accessible' ] = can_access_hda - # return here if deleted and purged or can't access + # ---- return here if deleted AND purged OR can't access purged = ( hda.purged or hda.dataset.purged ) if ( hda.deleted and purged ) or not can_access_hda: + #TODO: get_api_value should really go AFTER this - only summary data return trans.security.encode_dict_ids( hda_dict ) if trans.user_is_admin() or trans.app.config.expose_dataset_path: @@ -353,6 +356,7 @@ history_id = trans.security.encode_id( history.id ), history_content_id = trans.security.encode_id( hda.id ) ) + # indeces, assoc. metadata files, etc. meta_files = [] for meta_type in hda.metadata.spec.keys(): if isinstance( hda.metadata.spec[ meta_type ].param, FileParameter ): @@ -361,13 +365,15 @@ hda_dict[ 'meta_files' ] = meta_files hda_dict[ 'display_types' ] = self.get_old_display_applications( trans, hda ) - #hda_dict[ 'display_apps' ] = self.get_display_apps( trans, hda ) + hda_dict[ 'display_apps' ] = self.get_display_apps( trans, hda ) hda_dict[ 'visualizations' ] = hda.get_visualizations() - # return here if deleted + # ---- return here if deleted if hda.deleted and not purged: return trans.security.encode_dict_ids( hda_dict ) + # if a tool declares 'force_history_refresh' in its xml, when the hda -> ready, reload the history panel + # expensive if( ( hda.state in [ 'running', 'queued' ] ) and ( hda.creating_job and hda.creating_job.tool_id ) ): tool_used = trans.app.toolbox.get_tool( hda.creating_job.tool_id ) @@ -383,7 +389,6 @@ def get_display_app_url( display_app_link, hda, trans ): web_url_for = routes.URLGenerator( trans.webapp.mapper, trans.environ ) dataset_hash, user_hash = da_util.encode_dataset_user( trans, hda, None ) - return '' return web_url_for( controller='dataset', action="display_application", dataset_id=dataset_hash, https://bitbucket.org/galaxy/galaxy-central/commits/2f0f9ce88568/ Changeset: 2f0f9ce88568 User: carlfeberhard Date: 2013-03-28 16:21:56 Summary: merge next-stable Affected #: 1 file diff -r 2a1a820d0357b6d4bc7632dc88e6853acd5622ae -r 2f0f9ce885682df7cee1b486634b401872fdff9e lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -332,6 +332,8 @@ return None def get_hda_dict( self, trans, hda ): + """Return full details of this HDA in dictionary form. + """ hda_dict = hda.get_api_value( view='element' ) history = hda.history hda_dict[ 'api_type' ] = "file" @@ -341,9 +343,10 @@ can_access_hda = ( trans.user_is_admin() or can_access_hda ) hda_dict[ 'accessible' ] = can_access_hda - # return here if deleted and purged or can't access + # ---- return here if deleted AND purged OR can't access purged = ( hda.purged or hda.dataset.purged ) if ( hda.deleted and purged ) or not can_access_hda: + #TODO: get_api_value should really go AFTER this - only summary data return trans.security.encode_dict_ids( hda_dict ) if trans.user_is_admin() or trans.app.config.expose_dataset_path: @@ -353,6 +356,7 @@ history_id = trans.security.encode_id( history.id ), history_content_id = trans.security.encode_id( hda.id ) ) + # indeces, assoc. metadata files, etc. meta_files = [] for meta_type in hda.metadata.spec.keys(): if isinstance( hda.metadata.spec[ meta_type ].param, FileParameter ): @@ -361,13 +365,15 @@ hda_dict[ 'meta_files' ] = meta_files hda_dict[ 'display_types' ] = self.get_old_display_applications( trans, hda ) - #hda_dict[ 'display_apps' ] = self.get_display_apps( trans, hda ) + hda_dict[ 'display_apps' ] = self.get_display_apps( trans, hda ) hda_dict[ 'visualizations' ] = hda.get_visualizations() - # return here if deleted + # ---- return here if deleted if hda.deleted and not purged: return trans.security.encode_dict_ids( hda_dict ) + # if a tool declares 'force_history_refresh' in its xml, when the hda -> ready, reload the history panel + # expensive if( ( hda.state in [ 'running', 'queued' ] ) and ( hda.creating_job and hda.creating_job.tool_id ) ): tool_used = trans.app.toolbox.get_tool( hda.creating_job.tool_id ) @@ -383,7 +389,6 @@ def get_display_app_url( display_app_link, hda, trans ): web_url_for = routes.URLGenerator( trans.webapp.mapper, trans.environ ) dataset_hash, user_hash = da_util.encode_dataset_user( trans, hda, None ) - return '' return web_url_for( controller='dataset', action="display_application", dataset_id=dataset_hash, 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.