commit/galaxy-central: greg: When repairing a repository via the browser, display the ordered list of repositories that will be inspected and repaired.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/4227472b7640/ Changeset: 4227472b7640 User: greg Date: 2013-06-27 21:52:45 Summary: When repairing a repository via the browser, display the ordered list of repositories that will be inspected and repaired. Affected #: 2 files diff -r 43e609a791a13c37612e5e440d5890acc070a351 -r 4227472b7640e6689d13d428949be363b4bbc637 lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py --- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py @@ -1147,8 +1147,6 @@ Inspect the repository dependency hierarchy for a specified repository and attempt to make sure they are all properly installed as well as each repository's tool dependencies. """ - # TODO: figure out how to handle installing repositories and tool dependencies consecutively since each redirects to an ajaxian grid. This - # is not a problem in that Galaxy API. message = kwd.get( 'message', '' ) status = kwd.get( 'status', 'done' ) repository_id = kwd.get( 'id', None ) @@ -1160,15 +1158,27 @@ message=message, status=status ) ) tool_shed_repository = suc.get_installed_tool_shed_repository( trans, repository_id ) + if kwd.get( 'repair_repository_button', False ): + repair_dict = kwd.get( 'repair_dict', None ) + if not repair_dict: + repair_dict = repository_util.get_repair_dict( trans, tool_shed_repository ) + ordered_tsr_ids = repair_dict.get( 'ordered_tsr_ids', [] ) + ordered_repo_info_dicts = repair_dict.get( 'ordered_repo_info_dicts', [] ) + if ordered_tsr_ids and ordered_repo_info_dicts: + return trans.response.send_redirect( web.url_for( controller='admin_toolshed', + action='manage_repositories', + operation='repair', + ordered_tsr_ids=ordered_tsr_ids, + ordered_repo_info_dicts=ordered_repo_info_dicts ) ) + tool_shed_repository = suc.get_installed_tool_shed_repository( trans, repository_id ) repair_dict = repository_util.get_repair_dict( trans, tool_shed_repository ) ordered_tsr_ids = repair_dict.get( 'ordered_tsr_ids', [] ) ordered_repo_info_dicts = repair_dict.get( 'ordered_repo_info_dicts', [] ) - if ordered_tsr_ids and ordered_repo_info_dicts: - return trans.response.send_redirect( web.url_for( controller='admin_toolshed', - action='manage_repositories', - operation='repair', - ordered_tsr_ids=ordered_tsr_ids, - ordered_repo_info_dicts=ordered_repo_info_dicts ) ) + return trans.fill_template( 'admin/tool_shed_repository/repair_repository.mako', + repository=tool_shed_repository, + repair_dict=repair_dict, + message=message, + status=status ) @web.json def repository_installation_status_updates( self, trans, ids=None, status_list=None ): diff -r 43e609a791a13c37612e5e440d5890acc070a351 -r 4227472b7640e6689d13d428949be363b4bbc637 templates/admin/tool_shed_repository/repair_repository.mako --- /dev/null +++ b/templates/admin/tool_shed_repository/repair_repository.mako @@ -0,0 +1,51 @@ +<%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> +<%namespace file="/admin/tool_shed_repository/repository_actions_menu.mako" import="*" /> + +<%def name="stylesheets()"> + ${parent.stylesheets()} + ${h.css( "library" )} +</%def> + +<%def name="javascripts()"> + ${parent.javascripts()} +</%def> + +${render_galaxy_repository_actions( repository )} + +%if message: + ${render_msg( message, status )} +%endif + +<div class="warningmessage"> + The following repositories will be inspected and repaired in the order listed to ensure each repository and all of it's tool dependencies are correctly + installed. Click <b>Repair</b> to inspect and repair these repositories. +</div> + +<div class="toolForm"> + <div class="toolFormTitle">Repair tool shed repository '${repository.name}'</div> + <br/><br/> + <form name="repair_repository" id="repair_repository" action="${h.url_for( controller='admin_toolshed', action='repair_repository', id=trans.security.encode_id( repository.id ), repair_dict=repair_dict )}" method="post" > + <% ordered_repo_info_dicts = repair_dict.get( 'ordered_repo_info_dicts', [] ) %> + <table class="grid"> + <tr><th bgcolor="#D8D8D8">Name</th><th bgcolor="#D8D8D8">Owner</th><th bgcolor="#D8D8D8">Changeset revision</th></tr> + %for repo_info_dict in ordered_repo_info_dicts: + <% + for name, repo_info_tuple in repo_info_dict.items(): + description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, repository_dependencies, tool_dependencies = repo_info_tuple + break + %> + <tr> + <td>${name | h}</td> + <td>${repository_owner | h}</td> + <td>${changeset_revision | h}</td> + </tr> + %endfor + </table> + <div style="clear: both"></div> + <div class="form-row"> + <input type="submit" name="repair_repository_button" value="Repair"/> + </div> + </form> + </div> +</div> 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