1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/7010204f7ccd/ changeset: 7010204f7ccd user: greg date: 2013-03-04 20:29:23 summary: Fix links in the tool shed's Galaxy utilities grids. affected #: 2 files diff -r 93f0c6867e3427d582f6fba6ca2877ecf472b6d5 -r 7010204f7ccda05f806cfe7f30a6a3bc03a5e2d7 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -82,10 +82,17 @@ def browse_datatypes( self, trans, **kwd ): if 'operation' in kwd: operation = kwd[ 'operation' ].lower() + # The received id is a RepositoryMetadata id. + repository_metadata_id = kwd[ 'id' ] + repository_metadata = suc.get_repository_metadata_by_id( trans, repository_metadata_id ) + repository_id = trans.security.encode_id( repository_metadata.repository_id ) + changeset_revision = repository_metadata.changeset_revision + new_kwd = dict( id=repository_id, + changeset_revision=changeset_revision ) if operation == "view_or_manage_repository": return trans.response.send_redirect( web.url_for( controller='repository', action='view_or_manage_repository', - **kwd ) ) + **new_kwd ) ) return self.datatypes_grid( trans, **kwd ) @web.expose @@ -256,34 +263,55 @@ def browse_repository_dependencies( self, trans, **kwd ): if 'operation' in kwd: operation = kwd[ 'operation' ].lower() + # The received id is a RepositoryMetadata id. + repository_metadata_id = kwd[ 'id' ] + repository_metadata = suc.get_repository_metadata_by_id( trans, repository_metadata_id ) + repository_id = trans.security.encode_id( repository_metadata.repository_id ) + changeset_revision = repository_metadata.changeset_revision + new_kwd = dict( id=repository_id, + changeset_revision=changeset_revision ) if operation == "browse_repository": return trans.response.send_redirect( web.url_for( controller='repository', action='browse_repository', - **kwd ) ) + **new_kwd ) ) if operation == "view_or_manage_repository": return trans.response.send_redirect( web.url_for( controller='repository', action='view_or_manage_repository', - **kwd ) ) + **new_kwd ) ) return self.repository_dependencies_grid( trans, **kwd ) @web.expose def browse_tools( self, trans, **kwd ): if 'operation' in kwd: operation = kwd[ 'operation' ].lower() + # The received id is a RepositoryMetadata id. + repository_metadata_id = kwd['id' ] + repository_metadata = suc.get_repository_metadata_by_id( trans, repository_metadata_id ) + repository_id = trans.security.encode_id( repository_metadata.repository_id ) + changeset_revision = repository_metadata.changeset_revision + new_kwd = dict( id=repository_id, + changeset_revision=changeset_revision ) if operation == "view_or_manage_repository": return trans.response.send_redirect( web.url_for( controller='repository', action='view_or_manage_repository', - **kwd ) ) + **new_kwd ) ) return self.tools_grid( trans, **kwd ) @web.expose def browse_tool_dependencies( self, trans, **kwd ): if 'operation' in kwd: operation = kwd[ 'operation' ].lower() + # The received id is a RepositoryMetadata id. + repository_metadata_id = kwd[ 'id' ] + repository_metadata = suc.get_repository_metadata_by_id( trans, repository_metadata_id ) + repository_id = trans.security.encode_id( repository_metadata.repository_id ) + changeset_revision = repository_metadata.changeset_revision + new_kwd = dict( id=repository_id, + changeset_revision=changeset_revision ) if operation == "view_or_manage_repository": return trans.response.send_redirect( web.url_for( controller='repository', action='view_or_manage_repository', - **kwd ) ) + **new_kwd ) ) return self.tool_dependencies_grid( trans, **kwd ) @web.expose diff -r 93f0c6867e3427d582f6fba6ca2877ecf472b6d5 -r 7010204f7ccda05f806cfe7f30a6a3bc03a5e2d7 lib/tool_shed/grids/repository_grids.py --- a/lib/tool_shed/grids/repository_grids.py +++ b/lib/tool_shed/grids/repository_grids.py @@ -787,7 +787,7 @@ columns = [ RepositoryMetadataGrid.RepositoryNameColumn( "Repository name", model_class=model.Repository, - link=( lambda item: dict( operation="view_or_manage_repository", id=item.repository.id, changeset_revision=item.changeset_revision ) ), + link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ), attach_popup=False, key="Repository.name" ), RepositoryMetadataGrid.RepositoryOwnerColumn( "Owner", @@ -858,7 +858,7 @@ columns = [ RepositoryMetadataGrid.RepositoryNameColumn( "Repository name", model_class=model.Repository, - link=( lambda item: dict( operation="view_or_manage_repository", id=item.repository.id, changeset_revision=item.changeset_revision ) ), + link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ), attach_popup=False, key="Repository.name" ), RepositoryMetadataGrid.RepositoryOwnerColumn( "Owner", @@ -920,7 +920,7 @@ columns = [ RepositoryMetadataGrid.RepositoryNameColumn( "Repository name", model_class=model.Repository, - link=( lambda item: dict( operation="view_or_manage_repository", id=item.repository.id, changeset_revision=item.changeset_revision ) ), + link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ), attach_popup=False, key="Repository.name" ), RepositoryMetadataGrid.RepositoryOwnerColumn( "Owner", @@ -985,7 +985,7 @@ columns = [ RepositoryMetadataGrid.RepositoryNameColumn( "Repository name", model_class=model.Repository, - link=( lambda item: dict( operation="view_or_manage_repository", id=item.repository.id, changeset_revision=item.changeset_revision ) ), + link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ), attach_popup=False, key="Repository.name" ), RepositoryMetadataGrid.RepositoryOwnerColumn( "Owner", 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.