Add the ability to view the current data tables registry.

This commit is contained in:
Greg Von Kuster
2012-11-06 16:11:13 -05:00
parent c05c16ef1f
commit 56a7e11705
4 changed files with 55 additions and 6 deletions
@@ -763,3 +763,9 @@ class AdminGalaxy( BaseUIController, Admin, AdminActions, UsesQuotaMixin, QuotaP
message = util.restore_text( kwd.get( 'message', '' ) )
status = util.restore_text( kwd.get( 'status', 'done' ) )
return trans.fill_template( 'admin/view_datatypes_registry.mako', message=message, status=status )
@web.expose
@web.require_admin
def view_tool_data_tables( self, trans, **kwd ):
message = util.restore_text( kwd.get( 'message', '' ) )
status = util.restore_text( kwd.get( 'status', 'done' ) )
return trans.fill_template( 'admin/view_data_tables_registry.mako', message=message, status=status )
@@ -0,0 +1,42 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
%if message:
${render_msg( message, status )}
%endif
<%
ctr = 0
data_tables = trans.app.tool_data_tables
sorted_data_table_elem_names = sorted( trans.app.tool_data_tables.data_table_elem_names )
%>
<div class="toolForm">
<div class="toolFormTitle">Current data table registry contains ${len( sorted_data_table_elem_names )} data tables</div>
<div class="toolFormBody">
<table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<th bgcolor="#D8D8D8">Name</th>
<th bgcolor="#D8D8D8">Tool data path</th>
<th bgcolor="#D8D8D8">Missing index file</th>
</tr>
%for data_table_elem_name in sorted_data_table_elem_names:
<% data_table = data_tables[ data_table_elem_name ] %>
%if ctr % 2 == 1:
<tr class="odd_row">
%else:
<tr class="tr">
%endif
<td>${data_table.name}</td>
<td>${data_table.tool_data_path}</td>
<td>
%if data_table.missing_index_file:
${data_table.missing_index_file}
%endif
</td>
</tr>
<% ctr += 1 %>
%endfor
</table>
</div>
</div>
+5 -5
View File
@@ -22,14 +22,14 @@
%>
<div class="toolForm">
<div class="toolFormTitle">Current datatypes registry contains ${len( sorted_datatypes )} datatypes</div>
<div class="toolFormTitle">Current data types registry contains ${len( sorted_datatypes )} data types</div>
<div class="toolFormBody">
<table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<th>Extension</th>
<th>Type</th>
<th>Mimetype</th>
<th>Display in upload</th>
<th bgcolor="#D8D8D8">Extension</th>
<th bgcolor="#D8D8D8">Type</th>
<th bgcolor="#D8D8D8">Mimetype</th>
<th bgcolor="#D8D8D8">Display in upload</th>
</tr>
%for datatype in sorted_datatypes:
%if ctr % 2 == 1:
+2 -1
View File
@@ -65,7 +65,8 @@
<div class="toolSectionTitle">Server</div>
<div class="toolSectionBody">
<div class="toolSectionBg">
<div class="toolTitle"><a href="${h.url_for( controller='admin', action='view_datatypes_registry' )}" target="galaxy_main">View datatypes registry</a></div>
<div class="toolTitle"><a href="${h.url_for( controller='admin', action='view_datatypes_registry' )}" target="galaxy_main">View data types registry</a></div>
<div class="toolTitle"><a href="${h.url_for( controller='admin', action='view_tool_data_tables' )}" target="galaxy_main">View data tables registry</a></div>
<div class="toolTitle"><a href="${h.url_for( controller='admin', action='tool_versions' )}" target="galaxy_main">View tool lineage</a></div>
<div class="toolTitle"><a href="${h.url_for( controller='admin', action='reload_tool' )}" target="galaxy_main">Reload a tool's configuration</a></div>
<div class="toolTitle"><a href="${h.url_for( controller='admin', action='memdump' )}" target="galaxy_main">Profile memory usage</a></div>