commit/galaxy-central: dan: More Data Manager UI fixes. Fix for viewing data manager job info when dataset has been deleted.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/d0ab4f31e0e0/ Changeset: d0ab4f31e0e0 User: dan Date: 2014-05-13 21:47:54 Summary: More Data Manager UI fixes. Fix for viewing data manager job info when dataset has been deleted. Affected #: 5 files diff -r dc74a95853b6ebe05f811b78b9a6cfbe43211fc8 -r d0ab4f31e0e0178f58bd2bafb0b38d7a0fee9913 lib/galaxy/webapps/galaxy/controllers/data_manager.py --- a/lib/galaxy/webapps/galaxy/controllers/data_manager.py +++ b/lib/galaxy/webapps/galaxy/controllers/data_manager.py @@ -55,13 +55,18 @@ data_manager = trans.app.data_managers.get_manager( data_manager_id ) hdas = [ assoc.dataset for assoc in job.get_output_datasets() ] data_manager_output = [] + error_messages = [] for hda in hdas: - data_manager_json = from_json_string( open( hda.get_file_name() ).read() ) + try: + data_manager_json = from_json_string( open( hda.get_file_name() ).read() ) + except Exception, e: + data_manager_json = {} + error_messages.append( "Unable to obtain data_table info for hda (%s): %s" % ( hda.id, e ) ) values = [] for key, value in data_manager_json.get( 'data_tables', {} ).iteritems(): values.append( ( key, value ) ) data_manager_output.append( values ) - return trans.fill_template( "data_manager/view_job.mako", data_manager=data_manager, job=job, view_only=not_is_admin, hdas=hdas, data_manager_output=data_manager_output, message=message, status=status ) + return trans.fill_template( "data_manager/view_job.mako", data_manager=data_manager, job=job, view_only=not_is_admin, hdas=hdas, data_manager_output=data_manager_output, message=message, status=status, error_messages=error_messages ) @web.expose def manage_data_table( self, trans, **kwd ): diff -r dc74a95853b6ebe05f811b78b9a6cfbe43211fc8 -r d0ab4f31e0e0178f58bd2bafb0b38d7a0fee9913 templates/webapps/galaxy/data_manager/index.mako --- a/templates/webapps/galaxy/data_manager/index.mako +++ b/templates/webapps/galaxy/data_manager/index.mako @@ -51,11 +51,10 @@ <li><a href="${h.url_for( controller='data_manager', action='manage_data_table', table_name=table_name)}" target="galaxy_main"> %if table_name in managed_table_names: - <strong>${ table_name | h }</strong> + </span><strong>${ table_name | h }</strong></a><span class="fa fa-exchange"> %else: - ${ table_name | h } + ${ table_name | h }</a> %endif - </a></li><p/> %endfor diff -r dc74a95853b6ebe05f811b78b9a6cfbe43211fc8 -r d0ab4f31e0e0178f58bd2bafb0b38d7a0fee9913 templates/webapps/galaxy/data_manager/manage_data_manager.mako --- a/templates/webapps/galaxy/data_manager/manage_data_manager.mako +++ b/templates/webapps/galaxy/data_manager/manage_data_manager.mako @@ -28,7 +28,11 @@ <td>PID/Cluster ID</td></tr> %for job in jobs: - <td><a class="icon-btn" href="${ h.url_for( controller="data_manager", action="view_job", id=trans.security.encode_id( job.id ) ) }" title="View info"><span class="fa fa-info"></span></a></td> + <td> + <div class="icon-btn-group"> + <a class="icon-btn" href="${ h.url_for( controller="data_manager", action="view_job", id=trans.security.encode_id( job.id ) ) }" title="View info"><span class="fa fa-info-circle"></span></a><a class="icon-btn" href="${ h.url_for( controller="tool_runner", action="rerun", job_id=trans.security.encode_id( job.id ) ) }" title="Rerun"><span class="fa fa-refresh"></span></a> + </div> + </td><td>${ job.id | h }</td> %if job.history and job.history.user: <td>${job.history.user.email | h}</td> diff -r dc74a95853b6ebe05f811b78b9a6cfbe43211fc8 -r d0ab4f31e0e0178f58bd2bafb0b38d7a0fee9913 templates/webapps/galaxy/data_manager/manage_data_table.mako --- a/templates/webapps/galaxy/data_manager/manage_data_table.mako +++ b/templates/webapps/galaxy/data_manager/manage_data_table.mako @@ -1,7 +1,7 @@ <%inherit file="/base.mako"/><%namespace file="/message.mako" import="render_msg" /> -<%def name="title()">Data Table Manager: ${ data_table.name | h }</%def> +<%def name="title()">Tool Data Table: ${ data_table.name | h }</%def> %if message: ${render_msg( message, status )} diff -r dc74a95853b6ebe05f811b78b9a6cfbe43211fc8 -r d0ab4f31e0e0178f58bd2bafb0b38d7a0fee9913 templates/webapps/galaxy/data_manager/view_job.mako --- a/templates/webapps/galaxy/data_manager/view_job.mako +++ b/templates/webapps/galaxy/data_manager/view_job.mako @@ -8,6 +8,12 @@ ${render_msg( message, status )} %endif +%if error_messages: + %for error_message in error_messages: + ${ render_msg( error_message, 'error' ) } + %endfor +%endif + %if view_only: <p>Not implemented</p> %else: @@ -15,7 +21,7 @@ <table class="tabletip"><thead><tr><th colspan="2" style="font-size: 120%;"> - Data Manager: ${ data_manager.name | h } - ${ data_manager.description | h } + Data Manager: <a href="${ h.url_for( controller='tool_runner', action='index', tool_id=data_manager.tool.id ) }">${ data_manager.name | h }</a> - ${ data_manager.description | h } <a class="icon-btn" href="${ h.url_for( controller="tool_runner", action="rerun", job_id=trans.security.encode_id( job.id ) ) }" title="Rerun" data-placement="bottom"><span class="fa fa-refresh"></span></a></th></tr></thead><tbody> 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