Skip to content

Commit

Permalink
Change redirects to client side route for repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Oct 4, 2017
1 parent 0b2ae99 commit 1115547
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def activate_repository(self, trans, **kwd):
status=status))
message = 'The <b>%s</b> repository has been activated.' % escape(repository.name)
status = 'done'
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='browse_repositories',
return trans.response.send_redirect(web.url_for(controller='admin',
action='repositories',
message=message,
status=status))

Expand Down Expand Up @@ -132,8 +132,8 @@ def restore_repository (self, trans, **kwd):
message = "Unable to get latest revision for repository <b>%s</b> from " % escape(str(repository.name))
message += "the Tool Shed, so repository re-installation is not possible at this time."
status = "error"
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='browse_repositories',
return trans.response.send_redirect(web.url_for(controller='admin',
action='repositories',
message=message,
status=status))
else:
Expand Down Expand Up @@ -239,8 +239,8 @@ def deactivate_or_uninstall_repository(self, trans, **kwd):
status = max(status, statuses.index('error'))
status = statuses[status]
if kwd.get('deactivate_or_uninstall_repository_button', False):
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='browse_repositories',
return trans.response.send_redirect(web.url_for(controller='admin',
action='repositories',
message=message,
status=status))
remove_from_disk_check_box = CheckboxField('remove_from_disk', checked=remove_from_disk_checked)
Expand Down Expand Up @@ -488,8 +488,8 @@ def install_latest_repository_revision(self, trans, **kwd):
else:
message = 'The request parameters did not include the required encoded <b>id</b> of installed repository.'
status = 'error'
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='browse_repositories',
return trans.response.send_redirect(web.url_for(controller='admin',
action='repositories',
message=message,
status=status))

Expand Down Expand Up @@ -935,8 +935,8 @@ def prepare_for_install(self, trans, **kwd):
message += 'to update the repository resulted in the following error. Contact the Tool Shed '
message += 'administrator if necessary.<br/>%s' % str(e)
status = 'error'
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='browse_repositories',
return trans.response.send_redirect(web.url_for(controller='admin',
action='repositories',
message=message,
status=status))
changeset_revisions = updating_to_changeset_revision
Expand Down Expand Up @@ -1180,8 +1180,8 @@ def purge_repository(self, trans, **kwd):
else:
new_kwd['status'] = 'error'
new_kwd['message'] = 'Invalid repository id value "None" received for repository to be purged.'
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='browse_repositories',
return trans.response.send_redirect(web.url_for(controller='admin',
action='repositories',
**new_kwd))

@web.expose
Expand Down Expand Up @@ -1347,8 +1347,8 @@ def repair_repository(self, trans, **kwd):
if not repository_id:
message = 'Invalid installed tool shed repository id %s received.' % str(repository_id)
status = 'error'
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='browse_repositories',
return trans.response.send_redirect(web.url_for(controller='admin',
action='repositories',
message=message,
status=status))
tool_shed_repository = repository_util.get_installed_tool_shed_repository(trans.app, repository_id)
Expand Down Expand Up @@ -1657,8 +1657,8 @@ def reset_to_install(self, trans, **kwd):
new_kwd = {}
new_kwd['message'] = "You can now attempt to install the repository named <b>%s</b> again." % escape(str(repository.name))
new_kwd['status'] = "done"
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='browse_repositories',
return trans.response.send_redirect(web.url_for(controller='admin',
action='repositories',
**new_kwd))
return trans.response.send_redirect(web.url_for(controller='admin_toolshed',
action='manage_repository',
Expand Down

0 comments on commit 1115547

Please sign in to comment.