Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a simple UI to manage tool dependencies
This page simply lists all loaded tools and their dependency status. On the left are checkboxes to select multiple tools, and at the bottom is a button to install the selected tool dependencies.
- Loading branch information
Showing
4 changed files
with
109 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<%inherit file="/base.mako"/> | ||
<%namespace file="/webapps/tool_shed/repository/common.mako" import="render_dependency_status"/> | ||
<%namespace file="/message.mako" import="render_msg" /> | ||
|
||
<%def name="render_tool_dependencies( requirements_status, ctr=False )"> | ||
%for i, dependency in enumerate(requirements_status): | ||
%if i != 0: | ||
</tr> | ||
%if ctr % 2 == 1: | ||
<tr class="odd_row"> | ||
%else: | ||
<tr class="tr"> | ||
%endif | ||
<td></td> | ||
<td></td> | ||
<td></td> | ||
%endif | ||
${render_dependency_status(dependency)} | ||
%endfor | ||
</%def> | ||
|
||
%if message: | ||
${render_msg( message, status )} | ||
%endif | ||
|
||
<form name="manage_tool_dependencies" action="${h.url_for( controller='admin', action='manage_tool_dependencies' )}"> | ||
<div class="toolForm"> | ||
<div class="toolFormTitle">Manage dependencies for loaded tools</div> | ||
<div class="toolFormBody"> | ||
<table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%"> | ||
<tr> | ||
<th bgcolor="#D8D8D8">Install</th> | ||
<th bgcolor="#D8D8D8">Name</th> | ||
<th bgcolor="#D8D8D8">ID</th> | ||
<th bgcolor="#D8D8D8">Requirement</th> | ||
<th bgcolor="#D8D8D8">Version</th> | ||
<th bgcolor="#D8D8D8">Resolver</th> | ||
<th bgcolor="#D8D8D8">Exact</th> | ||
<th bgcolor="#D8D8D8"></th> | ||
</tr> | ||
<% ctr = 0 %> | ||
%for tool in tools.values(): | ||
%if tool.tool_requirements: | ||
%if ctr % 2 == 1: | ||
<tr class="odd_row"> | ||
%else: | ||
<tr class="tr"> | ||
%endif | ||
<td> | ||
<input type="checkbox" name="install_for_tools" value="${tool.id}"/> | ||
</td> | ||
<td>${ tool.name | h }</td> | ||
<td>${ tool.id | h }</td> | ||
${render_tool_dependencies( tool._view.get_requirements_status({tool.id: tool.tool_requirements}, tool.installed_tool_dependencies), ctr=ctr) } | ||
</tr> | ||
<% ctr += 1 %> | ||
%endif | ||
%endfor | ||
</table> | ||
</div> | ||
</div> | ||
<input type="submit" name="install_dependencies" value="Install checked dependencies using Conda"/> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters