# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Dannon Baker <dannon.baker@emory.edu> # Date 1278796427 14400 # Node ID e65936a1fa4923925a7a5c3848c9ced7c1ad883f # Parent 19e07ef6eb25ea4bd1531ba42c2187f3f5d384d6 # Parent 2d046444998edb1c4a5126897990bddd25de69f5 Merge --- a/templates/admin/requests/show_request.mako +++ /dev/null @@ -1,528 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> -<%namespace file="/requests/sample_state.mako" import="render_sample_state" /> -<%namespace file="/requests/sample_datasets.mako" import="render_sample_datasets" /> - -%if message: - ${render_msg( message, status )} -%endif - -<script type="text/javascript"> -$( function() { - $( "select[refresh_on_change='true']").change( function() { - var refresh = false; - var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' ) - if ( refresh_on_change_values ) { - refresh_on_change_values = refresh_on_change_values.value.split( ',' ); - var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' ); - for( i= 0; i < refresh_on_change_values.length; i++ ) { - if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){ - refresh = true; - break; - } - } - } - else { - refresh = true; - } - if ( refresh ){ - $( "#show_request" ).submit(); - } - }); -}); -</script> - - -<script type="text/javascript"> -$(document).ready(function(){ - //hide the all of the element with class msg_body - $(".msg_body").hide(); - //toggle the componenet with class msg_body - $(".msg_head").click(function(){ - $(this).next(".msg_body").slideToggle(450); - }); -}); -</script> - -<script type="text/javascript"> - // Looks for changes in sample states using an async request. Keeps - // calling itself (via setTimeout) until all samples are in a terminal - // state. - var updater = function ( sample_states ) { - // Check if there are any items left to track - var empty = true; - for ( i in sample_states ) { - empty = false; - break; - } - if ( ! empty ) { - setTimeout( function() { updater_callback( sample_states ) }, 1000 ); - } - }; - var updater_callback = function ( sample_states ) { - // Build request data - var ids = [] - var states = [] - $.each( sample_states, function ( id, state ) { - ids.push( id ); - states.push( state ); - }); - // Make ajax call - $.ajax( { - type: "POST", - url: "${h.url_for( controller='requests_admin', action='sample_state_updates' )}", - dataType: "json", - data: { ids: ids.join( "," ), states: states.join( "," ) }, - success : function ( data ) { - $.each( data, function( id, val ) { - // Replace HTML - var cell1 = $("#sampleState-" + id); - cell1.html( val.html_state ); - var cell2 = $("#sampleDatasets-" + id); - cell2.html( val.html_datasets ); - sample_states[ parseInt(id) ] = val.state; - }); - updater( sample_states ); - }, - error: function() { - // Just retry, like the old method, should try to be smarter - updater( sample_states ); - } - }); - }; -</script> - -<style type="text/css"> -.msg_head { - padding: 0px 0px; - cursor: pointer; -} -</style> - -<script type="text/javascript"> - function stopRKey(evt) { - var evt = (evt) ? evt : ((event) ? event : null); - var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); - if ((evt.keyCode == 13) && (node.type=="text")) {return false;} - } - document.onkeypress = stopRKey -</script> - -%if request.submitted(): - <% samples_not_ready = request.sequence_run_ready() %> - %if samples_not_ready: - ${render_msg( "Select a target library and folder for all the samples before starting the sequence run", "warning" )} - %endif -%endif - -%if request.rejected(): - ${render_msg( "Reason for rejection: "+request.last_comment(), "warning" )} -%endif - -<div class="grid-header"> - <h2>Sequencing Request "${request.name}"</h2> -</div> - -<ul class="manage-table-actions"> - - %if request.unsubmitted() and request.samples: - <li> - <a class="action-button" confirm="More samples cannot be added to this request once it is submitted. Click OK to submit." href="${h.url_for( controller='requests_admin', action='list', operation='Submit', id=trans.security.encode_id(request.id) )}"> - <span>Submit request</span></a> - </li> - %endif - %if request.submitted(): - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='Reject', id=trans.security.encode_id(request.id))}"> - <span>Reject request</span></a> - </li> - %endif - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='events', id=trans.security.encode_id(request.id) )}"> - <span>History</span></a> - </li> - - -</ul> - -<%def name="show_basic_info_form( sample_index, sample, info )"> - <td> - <input type="text" name=sample_${sample_index}_name value="${info['name']}" size="10"/> - <div class="toolParamHelp" style="clear: both;"> - <i>${' (required)' }</i> - </div> - </td> - %if sample: - %if sample.request.unsubmitted(): - <td></td> - %else: - <td><input type="text" name=sample_${sample_index}_barcode value="${info['barcode']}" size="10"/></td> - %endif - %else: - <td></td> - %endif - %if sample: - %if sample.request.unsubmitted(): - <td>Unsubmitted</td> - %else: - <td><a href="${h.url_for( controller='requests_admin', action='show_events', sample_id=sample.id)}">${sample.current_state().name}</a></td> - %endif - %else: - <td></td> - %endif - <td>${info['lib_widget'].get_html()}</td> - <td>${info['folder_widget'].get_html()}</td> - %if request.submitted() or request.complete(): - %if sample: - <td><a href="${h.url_for( controller='requests_admin', action='show_datatx_page', sample_id=trans.security.encode_id(sample.id) )}">${len(sample.dataset_files)}</a></td> - %else: - <td><a href="${h.url_for( controller='requests_admin', action='show_datatx_page', sample_id=trans.security.encode_id(sample.id) )}">Add</a></td> - %endif - %endif -</%def> - -## This function displays the "Basic Information" grid -<%def name="render_basic_info_grid()"> - <h4>Sample Information</h4> - <table class="grid"> - <thead> - <tr> - <th>Name</th> - <th>Barcode</th> - <th>State</th> - <th>Data Library</th> - <th>Folder</th> - %if request.submitted() or request.complete(): - <th>Dataset(s) Transferred</th> - %endif - <th></th> - </tr> - <thead> - <tbody> - <% - trans.sa_session.refresh( request ) - %> - %for sample_index, info in enumerate(current_samples): - <% - if sample_index in range(len(request.samples)): - sample = request.samples[sample_index] - else: - sample = None - %> - %if edit_mode == 'True': - <tr> - ${show_basic_info_form( sample_index, sample, info )} - </tr> - %else: - <tr> - %if sample_index in range(len(request.samples)): - <td>${info['name']}</td> - <td>${info['barcode']}</td> - %if sample.request.unsubmitted(): - <td>Unsubmitted</td> - %else: - <td id="sampleState-${sample.id}">${render_sample_state( sample )}</td> - %endif - -## <td> -## %if sample: -## %if sample.request.unsubmitted(): -## Unsubmitted -## %else: -## <a href="${h.url_for( controller='requests_admin', action='show_events', sample_id=sample.id)}">${sample.current_state().name}</a> -## %endif -## %endif -## </td> - %if info['library']: - <td><a href="${h.url_for( controller='library_common', action='browse_library', cntrller='library', id=trans.security.encode_id( info['library'].id ) )}">${info['library'].name}</a></td> - %else: - <td></td> - %endif - %if info['folder']: - <td>${info['folder'].name}</td> - %else: - <td></td> - %endif - %if request.submitted() or request.complete(): - <td id="sampleDatasets-${sample.id}"> - ${render_sample_datasets( sample )} -## <a href="${h.url_for( controller='requests_admin', action='show_datatx_page', sample_id=trans.security.encode_id(sample.id) )}">${len(sample.dataset_files)}</a> - </td> - %endif - - - %else: - ${show_basic_info_form( sample_index, sample, info )} - %endif - %if request.unsubmitted() or request.rejected(): - <td> - %if sample: - %if sample.request.unsubmitted(): - <a class="action-button" href="${h.url_for( controller='requests_admin', action='delete_sample', request_id=request.id, sample_id=sample_index )}"> - <img src="${h.url_for('/static/images/delete_icon.png')}" /> - <span></span></a> - %endif - %endif - </td> - %endif - </tr> - %endif - %endfor - </tbody> - </table> -</%def> - -<%def name="render_sample_form( index, sample_name, sample_values, fields_dict )"> - <td> - ${sample_name} - </td> - %for field_index, field in fields_dict.items(): - <td> - %if field['type'] == 'TextField': - <input type="text" name="sample_${index}_field_${field_index}" value="${sample_values[field_index]}" size="7"/> - %elif field['type'] == 'SelectField': - <select name="sample_${index}_field_${field_index}" last_selected_value="2"> - %for option_index, option in enumerate(field['selectlist']): - %if option == sample_values[field_index]: - <option value="${option}" selected>${option}</option> - %else: - <option value="${option}">${option}</option> - %endif - %endfor - </select> - %elif field['type'] == 'WorkflowField': - <select name="sample_${index}_field_${field_index}"> - %if str(sample_values[field_index]) == 'none': - <option value="none" selected>Select one</option> - %else: - <option value="none">Select one</option> - %endif - %for option_index, option in enumerate(request.user.stored_workflows): - %if not option.deleted: - %if str(option.id) == str(sample_values[field_index]): - <option value="${option.id}" selected>${option.name}</option> - %else: - <option value="${option.id}">${option.name}</option> - %endif - %endif - %endfor - </select> - %elif field['type'] == 'CheckboxField': - <input type="checkbox" name="sample_${index}_field_${field_index}" value="Yes"/> - %endif - <div class="toolParamHelp" style="clear: both;"> - <i>${'('+field['required']+')' }</i> - </div> - </td> - %endfor -</%def> - -<%def name="render_sample( index, sample_name, sample_values, fields_dict )"> - <td> - ${sample_name} - </td> - %for field_index, field in fields_dict.items(): - <td> - %if sample_values[field_index]: - %if field['type'] == 'WorkflowField': - %if str(sample_values[field_index]) != 'none': - <% workflow = trans.sa_session.query( trans.app.model.StoredWorkflow ).get( int(sample_values[field_index]) ) %> - <a href="${h.url_for( controller='workflow', action='run', id=trans.security.encode_id(workflow.id) )}">${workflow.name}</a> - %endif - %else: - ${sample_values[field_index]} - %endif - %else: - <i>None</i> - %endif - </td> - %endfor -</%def> - -<div class="toolForm"> - <div class="form-row"> - <div class="msg_list"> - <h4 class="msg_head"><u>Request Information</u></h4> - <div class="msg_body"> - %for index, rd in enumerate(request_details): - <div class="form-row"> - <label>${rd['label']}</label> - %if not rd['value']: - <i>None</i> - %else: - %if rd['label'] == 'State': - <a href="${h.url_for( controller='requests_admin', action='list', operation='events', id=trans.security.encode_id(request.id) )}">${rd['value']}</a> - %else: - ${rd['value']} - %endif - %endif - </div> - <div style="clear: both"></div> - %endfor - <div class="form-row"> - <ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='Edit', id=trans.security.encode_id(request.id))}"> - <span>Edit request details</span></a> - </li> - </ul> - </div> - </div> - </div> - </div> -</div> - -<br/> - - -<%def name="render_grid( grid_index, grid_name, fields_dict )"> - <br/> - <div class="msg_list"> - %if grid_name: - <h4 class="msg_head"><u>${grid_name}</u></h4> - %else: - <h4>Grid ${grid_index}</h4> - %endif - %if edit_mode == 'False' or len(current_samples) <= len(request.samples): - <div class="msg_body"> - %else: - <div class="msg_body2"> - %endif - <table class="grid"> - <thead> - <tr> - <th>Name</th> - %for index, field in fields_dict.items(): - <th> - ${field['label']} - <div class="toolParamHelp" style="clear: both;"> - <i>${field['helptext']}</i> - </div> - </th> - %endfor - <th></th> - </tr> - <thead> - <tbody> - <% - trans.sa_session.refresh( request ) - %> - %for sample_index, sample in enumerate(current_samples): - %if edit_mode == 'True': - <tr> - ${render_sample_form( sample_index, sample['name'], sample['field_values'], fields_dict)} - </tr> - %else: - <tr> - %if sample_index in range(len(request.samples)): - ${render_sample( sample_index, sample['name'], sample['field_values'], fields_dict )} - %else: - ${render_sample_form( sample_index, sample['name'], sample['field_values'], fields_dict)} - %endif - </tr> - %endif - %endfor - </tbody> - </table> - </div> - </div> -</%def> - -<div class="toolForm"> - ##<div class="toolFormTitle">Samples (${len(request.samples)})</div> - <form id="show_request" name="show_request" action="${h.url_for( controller='requests_admin', action='show_request', edit_mode=edit_mode )}" enctype="multipart/form-data" method="post" > - <div class="form-row"> - %if current_samples: - ## first render the basic info grid - ${render_basic_info_grid()} - ## then render the other grid(s) - <% trans.sa_session.refresh( request.type.sample_form ) %> - %for grid_index, grid_name in enumerate(request.type.sample_form.layout): - ${render_grid( grid_index, grid_name, request.type.sample_form.fields_of_grid( grid_index ) )} - <br/> - %endfor - %else: - <label>There are no samples.</label> - %endif - </div> - %if request.samples and request.submitted(): - <script type="text/javascript"> - // Updater - updater({${ ",".join( [ '"%s" : "%s"' % ( s.id, s.current_state().name ) for s in request.samples ] ) }}); - </script> - %endif - - %if edit_mode == 'False': - <table class="grid"> - <tbody> - <tr> - <div class="form-row"> - - %if request.unsubmitted(): - <td> - %if current_samples: - <label>Copy </label> - <input type="integer" name="num_sample_to_copy" value="1" size="3"/> - <label>sample(s) from sample</label> - ${sample_copy.get_html()} - %endif - <input type="submit" name="add_sample_button" value="Add New"/> - </td> - %endif - <td> - %if len(current_samples) and len(current_samples) <= len(request.samples): - <input type="submit" name="edit_samples_button" value="Edit samples"/> - %endif - </td> - </div> - </tr> - </tbody> - </table> - %endif - %if request.samples or current_samples: - <div class="form-row"> - <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="hidden" name="refresh" value="true" size="40"/> - </div> - <div style="clear: both"></div> - </div> - %if edit_mode == 'True': - <div class="form-row"> - <input type="submit" name="save_samples_button" value="Save"/> - <input type="submit" name="cancel_changes_button" value="Cancel"/> - </div> - %elif request.unsubmitted(): - <div class="form-row"> - <input type="submit" name="save_samples_button" value="Save"/> - </div> - %endif - - %endif - <input type="hidden" name="request_id" value="${request.id}" /> - </form> -</div> - -<br/> - -%if request.unsubmitted(): -<div class="toolForm"> - <form id="show_request" name="show_request" action="${h.url_for( controller='requests_admin', action='show_request', edit_mode=edit_mode )}" enctype="multipart/form-data" method="post" > - <div class="form-row"> - <div class="msg_list"> - <h4 class="msg_head"><u>Import samples from csv file</u></h4> - <div class="msg_body"> - <input type="file" name="file_data" /> - <input type="submit" name="import_samples_button" value="Import samples"/> - <br/> - <div class="toolParamHelp" style="clear: both;"> - The csv file must be in the following format:<br/> - SampleName,DataLibrary,DataLibraryFolder,FieldValue1,FieldValue2... - </div> - </div> - </div> - </div> - <input type="hidden" name="request_id" value="${request.id}" /> - </form> -</div> -%endif - --- a/templates/admin/samples/events.mako +++ /dev/null @@ -1,63 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -<%def name="title()">Events for Sample ${sample.name}</%def> - -<h2>Events for Sample "${sample.name}"</h2> -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='show_request', id=trans.security.encode_id(sample.request.id) )}"> - <span>Browse this request</span></a> - </li> -</ul> -<h3>User: ${sample.request.user.email}</h3> - -%if message: - ${render_msg( message, status )} -%endif - -<div class="toolForm"> - <table class="grid"> - <thead> - <tr> - <th>State</th> - <th>Description</th> - <th>Last Update</th> - <th>Comments</th> - </tr> - </thead> - <tbody> - %for state, desc, updated, comments in events_list: - <tr class="libraryRow libraryOrFolderRow" id="libraryRow"> - <td><b><a>${state}</a></b></td> - <td><a>${desc}</a></td> - <td><a>${updated}</a></td> - <td><a>${comments}</a></td> - </tr> - %endfor - </tbody> - </table> -</div> -<div class="toolForm"> - <div class="toolFormTitle">Change current state</div> - <div class="toolFormBody"> - <form name="event" action="${h.url_for( controller='requests_admin', action='save_state', new=True, sample_id=sample.id)}" method="post" > - %for w in widgets: - <div class="form-row"> - <label> - ${w[0]} - </label> - ${w[1].get_html()} - %if w[0] == 'Comments': - <div class="toolParamHelp" style="clear: both;"> - Optional - </div> - %endif - </div> - %endfor - <div class="form-row"> - <input type="submit" name="add_event_button" value="Save"/> - </div> - </form> - </div> -</div> --- a/tool-data/shared/bx/bx_build_sites.txt +++ /dev/null @@ -1,1 +0,0 @@ -main http://main.genome-browser.bx.psu.edu/cgi-bin/hgTracks? hg18,hg19,mm8,mm9 bx-main --- a/static/trackster.css +++ /dev/null @@ -1,132 +0,0 @@ -#content { - width: 100%; -} - -#center { - overflow: auto; -} - -#nav-container { - position: fixed; - left: 0; - bottom: 0; -} - -/*canvas{ - border-left: 1px solid green; - border-right: 1px solid red; } /* debugging */ -#nav { - padding: 0 0; - color:#333;font-weight:bold; -} - -#nav-controls { - text-align: center; - background:#cccccc; - background-image:url(style/panel_header_bg.png); - background-position:top center; - background-repeat:repeat-x; - padding-bottom: 5px; -} - -#nav-controls a { - padding: 5px 0.4em; -} - -#overview { - width: 100%; - margin: 0px; - color: white; - margin-top: -6px; - margin-bottom: -4px; -} - -#overview-viewport { - position: relative; - height: 14px; -/* border-top: solid #666 1px;*/ -/* border-bottom: solid #aaa 1px;*/ - background: white; - border-top: solid gray 1px; - border-bottom: solid gray 1px; - margin: 5px 0; -} -#overview-box { - position: absolute; - margin-top: 0px; - height: 14px; - background: #ddd url(images/visualization/draggable_horizontal.png) center center no-repeat; - /*border-style: outset;*/ -} - -#viewport { -/* overflow-x: hidden;*/ - background-color: #fff; -/* overflow: scroll;*/ -/* border-bottom: 2px solid black;*/ -} - -#viewport-canvas { - width: 100%; - height: 100px; -} - -.yaxislabel { - color: #777; -} -/* Line track needs borders to show range */ -.line-track .track-content { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -.track { - /* border-top: solid #DDDDDD 1px; */ - /* border-bottom: solid #DDDDDD 1px; */ - background: white; -} - -.track-header { - text-align: center; - padding: 4px; - color: #666; -} - -.track-content { - overflow: hidden; - text-align: center; -} - -.track.error { - background-color: #ECB4AF; -} -.track.nodata { - background-color: #ddd; -} - -.loading { - min-height: 100px; -} - -.label-track { - /* font-weight: bold; */ - /* font-size: 10px; */ -} -.label-track .label { - border-left: solid #999 1px; - padding: 1px; - display: inline-block; -} -.right-float { - float: right; - margin-left: 5px; -} - -#top-labeltrack { - border-bottom: solid #999 1px; -} - -#nav-labeltrack { - border-top: solid #999 1px; - border-bottom: solid #999 1px; -} --- a/templates/requests/sample_state.mako +++ /dev/null @@ -1,5 +0,0 @@ -<%def name="render_sample_state( sample )"> - <a href="${h.url_for( controller='requests_admin', action='show_events', sample_id=sample.id)}">${sample.current_state().name}</a> -</%def> - -${render_sample_state( sample )} --- a/templates/admin/samples/bar_codes.mako +++ /dev/null @@ -1,46 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - - -%if message: - ${render_msg( message, status )} -%endif - - -<h2>Bar codes for Samples of Request "${request.name}"</h2> -<h3>User: ${user.email}</h3> - -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='show_request', id=trans.security.encode_id(request.id) )}"> - <span>Browse this request</span></a> - </li> -</ul> - -<div class="toolForm"> - <form name="bar_codes" action="${h.url_for( controller='requests_admin', action='save_bar_codes', request_id=request.id)}" method="post" > - <table class="grid"> - <thead> - <tr> - <th>Name</th> - <th>Description</th> - <th>Bar code</th> - </tr> - </thead> - <tbody> - %for index, sample in enumerate(samples_list): - <tr class="libraryRow libraryOrFolderRow" id="libraryRow"> - <td><b><a>${sample.name}</a></b></td> - <td><a>${sample.desc}</a></td> - <td> - ${widgets[index].get_html()} - </td> - </tr> - %endfor - </tbody> - </table> - <div class="form-row"> - <input type="submit" name="save_bar_codes" value="Save"/> - </div> - </form> -</div> --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -1251,7 +1251,9 @@ class Admin( object ): # sort filter instead of this class's. kwargs[ 'user_id' ] = kwargs[ 'id' ] kwargs[ 'sort' ] = 'name' - return self.browse_tools( trans, **kwargs ) + return trans.response.send_redirect( web.url_for( controller='admin', + action='browse_tools', + **kwargs ) ) # Render the list view return self.user_list_grid( trans, **kwargs ) @web.expose --- a/templates/requests/edit_request.mako +++ /dev/null @@ -1,84 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -%if message: - ${render_msg( message, status )} -%endif - -<script type="text/javascript"> -$( function() { - $( "select[refresh_on_change='true']").change( function() { - var refresh = false; - var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' ) - if ( refresh_on_change_values ) { - refresh_on_change_values = refresh_on_change_values.value.split( ',' ); - var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' ); - for( i= 0; i < refresh_on_change_values.length; i++ ) { - if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){ - refresh = true; - break; - } - } - } - else { - refresh = true; - } - if ( refresh ){ - $( "#edit_request" ).submit(); - } - }); -}); -</script> - -<br/> -<br/> -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='list')}"> - <span>Browse requests</span></a> - </li> -</ul> - -<div class="toolForm"> - <div class="toolFormTitle">Edit request "${request.name}"</div> - %if len(select_request_type.options) == 1: - There are no request types created for a new request. - %else: - <div class="toolFormBody"> - <form name="edit_request" id="edit_request" action="${h.url_for( controller='requests', action='edit', request_id=request.id)}" method="post" > - <div class="form-row"> - <label> - Select Request Type: - </label> - ${select_request_type.get_html()} - </div> - - %if select_request_type.get_selected() != ('Select one', 'none'): - %for i, field in enumerate(widgets): - <div class="form-row"> - <label>${field['label']}</label> - ${field['widget'].get_html()} - %if field['label'] == 'Data library' and new_library: - ${new_library.get_html()} - %endif - <div class="toolParamHelp" style="clear: both;"> - ${field['helptext']} - </div> - <div style="clear: both"></div> - </div> - %endfor - <div class="form-row"> - <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="hidden" name="refresh" value="true" size="40"/> - </div> - <div style="clear: both"></div> - </div> - <div class="form-row"> - <input type="submit" name="save_changes_request_button" value="Save changes"/> - ##<input type="submit" name="edit_samples_button" value="Edit samples"/> - </div> - %endif - </form> - </div> -</div> -%endif --- a/templates/root/index.mako +++ b/templates/root/index.mako @@ -43,9 +43,9 @@ "Show structure": function() { galaxy_main.location = "${h.url_for( controller='history', action='display_structured' )}"; }, - "Export to File": function() { - galaxy_main.location = "${h.url_for( controller='history', action='export_archive' )}"; - }, + ##"Export to File": function() { + ## galaxy_main.location = "${h.url_for( controller='history', action='export_archive' )}"; + ##}, "Delete": function() { if ( confirm( "Really delete the current history?" ) ) @@ -53,10 +53,10 @@ galaxy_main.location = "${h.url_for( controller='history', action='delete_current' )}"; } }, - "Other Actions": null, - "Import from File": function() { - galaxy_main.location = "${h.url_for( controller='history', action='import_archive' )}"; - } + ##"Other Actions": null, + ##"Import from File": function() { + ## galaxy_main.location = "${h.url_for( controller='history', action='import_archive' )}"; + ##} }); // Init tool options. --- a/templates/requests/new_request.mako +++ /dev/null @@ -1,94 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -%if message: - ${render_msg( message, status )} -%endif - -<script type="text/javascript"> -$( function() { - $( "select[refresh_on_change='true']").change( function() { - var refresh = false; - var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' ) - if ( refresh_on_change_values ) { - refresh_on_change_values = refresh_on_change_values.value.split( ',' ); - var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' ); - for( i= 0; i < refresh_on_change_values.length; i++ ) { - if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){ - refresh = true; - break; - } - } - } - else { - refresh = true; - } - if ( refresh ){ - $( "#new_request" ).submit(); - } - }); -}); -</script> - -<%def name="javascripts()"> - ${parent.javascripts()} - ${h.js("jquery.autocomplete", "autocomplete_tagging" )} -</%def> - -<%def name="stylesheets()"> - ${parent.stylesheets()} - ${h.css( "autocomplete_tagging" )} -</%def> - -<br/> -<br/> -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='list')}"> - <span>Browse requests</span></a> - </li> -</ul> - -<div class="toolForm"> - <div class="toolFormTitle">Add a new request</div> - %if len(select_request_type.options) == 1: - There are no request types created for a new request. - %else: - <div class="toolFormBody"> - <form name="new_request" id="new_request" action="${h.url_for( controller='requests', action='new', create=True )}" method="post" > - <div class="form-row"> - <label> - Select Request Type: - </label> - ${select_request_type.get_html()} - </div> - - %if select_request_type.get_selected() != ('Select one', 'none'): - %for i, field in enumerate(widgets): - <div class="form-row"> - <label>${field['label']}</label> - ${field['widget'].get_html()} - ##%if field['label'] == 'Data library' and new_library: - ## ${new_library.get_html()} - ##%endif - <div class="toolParamHelp" style="clear: both;"> - ${field['helptext']} - </div> - <div style="clear: both"></div> - </div> - %endfor - <div class="form-row"> - <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="hidden" name="refresh" value="true" size="40"/> - </div> - <div style="clear: both"></div> - </div> - <div class="form-row"> - <input type="submit" name="create_request_button" value="Save"/> - <input type="submit" name="create_request_samples_button" value="Add samples"/> - </div> - %endif - </form> - </div> -</div> -%endif --- a/lib/galaxy/util/memory_usage.py +++ /dev/null @@ -1,44 +0,0 @@ -import os, platform, logging -from galaxy.datatypes.data import nice_size - -log = logging.getLogger( __name__ ) - -_proc_status = '/proc/%d/status' % os.getpid() - -_scale = { 'kB': 1024.0, 'mB': 1024.0*1024.0, 'KB': 1024.0, 'MB': 1024.0*1024.0 } - -def _VmB( VmKey ): - '''Private. - ''' - global _proc_status, _scale - # get pseudo file /proc/<pid>/status - try: - t = open( _proc_status ) - v = t.read() - t.close() - except: - log.debug("memory_usage is currently supported only on Linux, your platform is %s %s" % ( platform.system(), platform.release() ) ) - return 0.0 # non-Linux? - # get VmKey line e.g. 'VmRSS: 9999 kB\n ...' - i = v.index( VmKey ) - v = v[ i: ].split( None, 3 ) # whitespace - if len( v ) < 3: - return 0.0 # invalid format? - # convert Vm value to bytes - return float( v[ 1 ] ) * _scale[ v[ 2 ] ] -def memory( since=0.0, pretty=False ): - '''Return memory usage in bytes. - ''' - size = _VmB( 'VmSize:' ) - since - if pretty: - return nice_size( size ) - else: - return size -def resident( since=0.0 ): - '''Return resident memory usage in bytes. - ''' - return _VmB( 'VmRSS:' ) - since -def stacksize( since=0.0 ): - '''Return stack size in bytes. - ''' - return _VmB( 'VmStk:' ) - since --- a/templates/sample/index.mako +++ /dev/null @@ -1,16 +0,0 @@ -<%inherit file="/webapps/galaxy/base_panels.mako"/> - -<%def name="init()"> -<% - self.has_left_panel=False - self.has_right_panel=False - self.active_view="requests" - -%> -</%def> - -<%def name="center_panel()"> - - <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${h.url_for( controller="sample", action="list", request_id=request_id )}"></iframe> - -</%def> --- a/templates/requests/show_request.mako +++ /dev/null @@ -1,430 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - - -%if message: - ${render_msg( message, status )} -%endif - -<script type="text/javascript"> -$( function() { - $( "select[refresh_on_change='true']").change( function() { - var refresh = false; - var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' ) - if ( refresh_on_change_values ) { - refresh_on_change_values = refresh_on_change_values.value.split( ',' ); - var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' ); - for( i= 0; i < refresh_on_change_values.length; i++ ) { - if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){ - refresh = true; - break; - } - } - } - else { - refresh = true; - } - if ( refresh ){ - $( "#show_request" ).submit(); - } - }); -}); -</script> - - -<script type="text/javascript"> -$(document).ready(function(){ - //hide the all of the element with class msg_body - $(".msg_body").hide(); - //toggle the componenet with class msg_body - $(".msg_head").click(function(){ - $(this).next(".msg_body").slideToggle(450); - }); -}); -</script> -<style type="text/css"> -.msg_head { - padding: 0px 0px; - cursor: pointer; -} - -} -</style> - -%if request.rejected(): - ${render_msg( "Reason for rejection: "+request.last_comment(), "warning" )} -%endif - -<div class="grid-header"> - <h2>Sequencing Request "${request.name}"</h2> -</div> - -<ul class="manage-table-actions"> - %if request.unsubmitted() and request.samples: - <li> - <a class="action-button" confirm="More samples cannot be added to this request once it is submitted. Click OK to submit." href="${h.url_for( controller='requests', action='list', operation='Submit', id=trans.security.encode_id(request.id) )}"> - <span>Submit request</span></a> - </li> - %endif - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='list', operation='events', id=trans.security.encode_id(request.id) )}"> - <span>History</span></a> - </li> - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='list')}"> - <span>Browse requests</span></a> - </li> -</ul> - -<%def name="show_basic_info_form( sample_index, sample, info )"> - <td> - <input type="text" name=sample_${sample_index}_name value="${info['name']}" size="10"/> - <div class="toolParamHelp" style="clear: both;"> - <i>${' (required)' }</i> - </div> - </td> - %if sample: - %if sample.request.unsubmitted(): - <td></td> - %else: - <td><input type="text" name=sample_${sample_index}_barcode value="${info['barcode']}" size="10"/></td> - %endif - %else: - <td></td> - %endif - %if sample: - %if not sample.current_state(): - <td>Unsubmitted</td> - %else: - <td><a href="${h.url_for( controller='requests_admin', action='show_events', sample_id=sample.id)}">${sample.current_state().name}</a></td> - %endif - %else: - <td></td> - %endif - <td>${info['lib_widget'].get_html()}</td> - <td>${info['folder_widget'].get_html()}</td> - %if request.submitted() or request.complete(): - %if sample: - <td><a href="${h.url_for( controller='requests_admin', action='show_datatx_page', sample_id=trans.security.encode_id(sample.id) )}">${len(sample.dataset_files)}</a></td> - %else: - <td><a href="${h.url_for( controller='requests_admin', action='show_datatx_page', sample_id=trans.security.encode_id(sample.id) )}">Add</a></td> - %endif - %endif -</%def> - -## This function displays the "Basic Information" grid -<%def name="render_basic_info_grid()"> - <h4>Sample Information</h4> - <table class="grid"> - <thead> - <tr> - <th>Name</th> - <th>Barcode</th> - <th>State</th> - <th>Data Library</th> - <th>Folder</th> - %if request.submitted() or request.complete(): - <th>Dataset(s) Transferred</th> - %endif - <th></th> - </tr> - <thead> - <tbody> - <% - trans.sa_session.refresh( request ) - %> - %for sample_index, info in enumerate(current_samples): - <% - if sample_index in range(len(request.samples)): - sample = request.samples[sample_index] - else: - sample = None - %> - %if edit_mode == 'True': - <tr> - ${show_basic_info_form( sample_index, sample, info )} - </tr> - %else: - <tr> - %if sample_index in range(len(request.samples)): - <td>${info['name']}</td> - <td>${info['barcode']}</td> - <td> - %if sample.current_state(): - <a href="${h.url_for( controller='requests', action='show_events', sample_id=sample.id)}">${sample.current_state().name}</a> - %else: - Unsubmitted - %endif - </td> - %if info['library']: - <td><a href="${h.url_for( controller='library_common', action='browse_library', cntrller='library', id=trans.security.encode_id( info['library'].id ) )}">${info['library'].name}</a></td> - %else: - <td></td> - %endif - %if info['folder']: - <td>${info['folder'].name}</td> - %else: - <td></td> - %endif - %if request.submitted() or request.complete(): - <td> - <a href="${h.url_for( controller='requests', action='show_datatx_page', sample_id=trans.security.encode_id(sample.id) )}">${len(sample.dataset_files)}</a> - </td> - %endif - - - %else: - ${show_basic_info_form( sample_index, sample, info )} - %endif - %if request.unsubmitted() or request.rejected(): - <td> - %if sample: - %if sample.request.unsubmitted(): - <a class="action-button" href="${h.url_for( controller='requests_admin', action='delete_sample', request_id=request.id, sample_id=sample_index )}"> - <img src="${h.url_for('/static/images/delete_icon.png')}" /> - <span></span></a> - %endif - %endif - </td> - %endif - </tr> - %endif - %endfor - </tbody> - </table> -</%def> - -<%def name="render_sample_form( index, sample_name, sample_values, fields_dict )"> - <td> - ${sample_name} - </td> - %for field_index, field in fields_dict.items(): - <td> - %if field['type'] == 'TextField': - <input type="text" name="sample_${index}_field_${field_index}" value="${sample_values[field_index]}" size="7"/> - %elif field['type'] == 'SelectField': - <select name="sample_${index}_field_${field_index}" last_selected_value="2"> - %for option_index, option in enumerate(field['selectlist']): - %if option == sample_values[field_index]: - <option value="${option}" selected>${option}</option> - %else: - <option value="${option}">${option}</option> - %endif - %endfor - </select> - %elif field['type'] == 'WorkflowField': - <select name="sample_${index}_field_${field_index}"> - %if str(sample_values[field_index]) == 'none': - <option value="none" selected>Select one</option> - %else: - <option value="none">Select one</option> - %endif - %for option_index, option in enumerate(request.user.stored_workflows): - %if not option.deleted: - %if str(option.id) == str(sample_values[field_index]): - <option value="${option.id}" selected>${option.name}</option> - %else: - <option value="${option.id}">${option.name}</option> - %endif - %endif - %endfor - </select> - %elif field['type'] == 'CheckboxField': - <input type="checkbox" name="sample_${index}_field_${field_index}" value="Yes"/> - %endif - <div class="toolParamHelp" style="clear: both;"> - <i>${'('+field['required']+')' }</i> - </div> - </td> - %endfor -</%def> - -<%def name="render_sample( index, sample_name, sample_values, fields_dict )"> - <td> - ${sample_name} - </td> - %for field_index, field in fields_dict.items(): - <td> - %if sample_values[field_index]: - %if field['type'] == 'WorkflowField': - %if str(sample_values[field_index]) != 'none': - <% workflow = trans.sa_session.query( trans.app.model.StoredWorkflow ).get( int(sample_values[field_index]) ) %> - <a href="${h.url_for( controller='workflow', action='run', id=trans.security.encode_id(workflow.id) )}">${workflow.name}</a> - %endif - %else: - ${sample_values[field_index]} - %endif - %else: - <i>None</i> - %endif - - </td> - %endfor -</%def> - -<%def name="render_grid( grid_index, grid_name, fields_dict )"> - <br/> - <div class="msg_list"> - %if grid_name: - <h4 class="msg_head"><u>${grid_name}</u></h4> - %else: - <h4>Grid ${grid_index}</h4> - %endif - %if edit_mode == 'False' or len(current_samples) <= len(request.samples): - <div class="msg_body"> - %else: - <div class="msg_body2"> - %endif - <table class="grid"> - <thead> - <tr> - <th>Name</th> - %for index, field in fields_dict.items(): - <th> - ${field['label']} - <div class="toolParamHelp" style="clear: both;"> - <i>${field['helptext']}</i> - </div> - </th> - %endfor - <th></th> - </tr> - <thead> - <tbody> - <% - trans.sa_session.refresh( request ) - %> - %for sample_index, sample in enumerate(current_samples): - %if edit_mode == 'True': - <tr> - ${render_sample_form( sample_index, sample['name'], sample['field_values'], fields_dict)} - </tr> - %else: - <tr> - %if sample_index in range(len(request.samples)): - ${render_sample( sample_index, sample['name'], sample['field_values'], fields_dict )} - %else: - ${render_sample_form( sample_index, sample['name'], sample['field_values'], fields_dict)} - %endif - </tr> - %endif - %endfor - </tbody> - </table> - </div> - </div> -</%def> - -<div class="toolForm"> - <form id="request_details" name="request_details" > - <div class="form-row"> - <div class="msg_list"> - <h4 class="msg_head"><u>Request Information</u></h4> - <div class="msg_body"> - %for index, rd in enumerate(request_details): - <div class="form-row"> - <label>${rd['label']}</label> - %if not rd['value']: - <i>None</i> - %else: - %if rd['label'] == 'State': - <a href="${h.url_for( controller='requests_admin', action='list', operation='events', id=trans.security.encode_id(request.id) )}">${rd['value']}</a> - %else: - ${rd['value']} - %endif - %endif - </div> - <div style="clear: both"></div> - %endfor - <div class="form-row"> - <ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='Edit', id=trans.security.encode_id(request.id))}"> - <span>Edit request details</span></a> - </li> - </ul> - </div> - </div> - </div> - </div> - </form> - <form id="show_request" name="show_request" action="${h.url_for( controller='requests', action='show_request', edit_mode=edit_mode )}" enctype="multipart/form-data" method="post" > - <div class="form-row"> - %if current_samples: - ## first render the basic info grid - ${render_basic_info_grid()} - ## then render the other grid(s) - <% trans.sa_session.refresh( request.type.sample_form ) %> - %for grid_index, grid_name in enumerate(request.type.sample_form.layout): - ${render_grid( grid_index, grid_name, request.type.sample_form.fields_of_grid( grid_index ) )} - <br/> - %endfor - %else: - <label>There are no samples.</label> - %endif - </div> - %if request.unsubmitted() and edit_mode == 'False': - <table class="grid"> - <tbody> - <tr> - <div class="form-row"> - <td> - %if current_samples: - <label>Copy </label> - <input type="integer" name="num_sample_to_copy" value="1" size="3"/> - <label>sample(s) from sample</label> - ${sample_copy.get_html()} - %endif - <input type="submit" name="add_sample_button" value="Add New"/> - </td> - <td> - %if len(current_samples) and len(current_samples) <= len(request.samples): - <input type="submit" name="edit_samples_button" value="Edit samples"/> - %endif - </td> - </div> - </tr> - </tbody> - </table> - %endif - %if request.unsubmitted() and (request.samples or current_samples): - <div class="form-row"> - <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="hidden" name="refresh" value="true" size="40"/> - </div> - <div style="clear: both"></div> - </div> - <div class="form-row"> - <input type="submit" name="save_samples_button" value="Save"/> - %if edit_mode == 'True': - <input type="submit" name="cancel_changes_button" value="Cancel"/> - %endif - </div> - %endif - <input type="hidden" name="request_id" value="${request.id}" /> - </form> -</div> - - -<br/> -%if request.unsubmitted(): -<div class="toolForm"> - <form id="show_request" name="show_request" action="${h.url_for( controller='requests', action='show_request', edit_mode=edit_mode )}" enctype="multipart/form-data" method="post" > - <div class="form-row"> - <div class="msg_list"> - <h4 class="msg_head"><u>Import samples from csv file</u></h4> - <div class="msg_body"> - <input type="file" name="file_data" /> - <input type="submit" name="import_samples_button" value="Import samples"/> - <br/> - <div class="toolParamHelp" style="clear: both;"> - The csv file must be in the following format:<br/> - SampleName,DataLibrary,DataLibraryFolder,FieldValue1,FieldValue2... - </div> - </div> - </div> - </div> - <input type="hidden" name="request_id" value="${request.id}" /> - </form> -</div> -%endif --- a/templates/admin/requests/get_data.mako +++ /dev/null @@ -1,227 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - - -%if message: - ${render_msg( message, status )} -%endif - -<script type="text/javascript"> -$(document).ready(function(){ - //hide the all of the element with class msg_body - $(".msg_body").hide(); - //toggle the componenet with class msg_body - $(".msg_head").click(function(){ - $(this).next(".msg_body").slideToggle(450); - }); -}); - - - - -</script> - -<script type="text/javascript"> - function display_file_details(sample_id, folder_path) - { - var w = document.get_data.files_list.selectedIndex; - var selected_value = document.get_data.files_list.options[w].value; - var cell = $("#file_details"); - if(selected_value.charAt(selected_value.length-1) != '/') - { - // Make ajax call - $.ajax( { - type: "POST", - url: "${h.url_for( controller='requests_admin', action='get_file_details' )}", - dataType: "json", - data: { id: sample_id, folder_path: document.get_data.folder_path.value+selected_value }, - success : function ( data ) { - cell.html( '<label>'+data+'</label>' ) - } - }); - } - else - { - cell.html( '' ) - } - - - } -</script> - -<script type="text/javascript"> - function open_folder1(sample_id, folder_path) - { - var w = document.get_data.files_list.selectedIndex; - var selected_value = document.get_data.files_list.options[w].value; - var cell = $("#file_details"); - if(selected_value.charAt(selected_value.length-1) == '/') - { - document.get_data.folder_path.value = document.get_data.folder_path.value+selected_value - // Make ajax call - $.ajax( { - type: "POST", - url: "${h.url_for( controller='requests_admin', action='open_folder' )}", - dataType: "json", - data: { id: sample_id, folder_path: document.get_data.folder_path.value }, - success : function ( data ) { - document.get_data.files_list.options.length = 0 - for(i=0; i<data.length; i++) - { - var newOpt = new Option(data[i], data[i]); - document.get_data.files_list.options[i] = newOpt; - } - //cell.html( '<label>'+data+'</label>' ) - - } - }); - } - else - { - cell.html( '' ) - } - } -</script> - - -<style type="text/css"> -.msg_head { - padding: 0px 0px; - cursor: pointer; -} - -} -</style> - - -<h2>Data transfer from Sequencer</h2> -<h3>Sample "${sample.name}" of Request "${sample.request.name}"</h3> -<br/> -<br/> - -<ul class="manage-table-actions"> - %if sample.request.submitted() and sample.inprogress_dataset_files(): - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='show_datatx_page', sample_id=trans.security.encode_id(sample.id) )}"> - <span>Refresh this page</span></a> - </li> - %endif - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='manage_request_types', operation='view', id=trans.security.encode_id(sample.request.type.id) )}"> - <span>Sequencer information</span></a> - </li> - <li> - <a class="action-button" href="${h.url_for( controller='library_common', action='browse_library', cntrller='library_admin', id=trans.security.encode_id( sample.library.id ) )}"> - <span>${sample.library.name} Data Library</span></a> - </li> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='show_request', id=trans.security.encode_id(sample.request.id) )}"> - <span>Browse this request</span></a> - </li> -</ul> - -<div class="toolForm"> - %if len(dataset_files): -## <form name="get_data" action="${h.url_for( controller='requests_admin', action='get_data', sample_id=sample.id)}" method="post" > - <div class="form-row"> - <h4>Sample Dataset(s)</h4> - %if sample.untransferred_dataset_files(): - <div class="form-row"> - <ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='get_data', start_transfer_button=True, sample_id=sample.id )}"> - <span>Start transfer</span></a> - </li> - </ul> - </div> - %endif - <div class="form-row"> - <table class="grid"> - <thead> - <tr> - <th>Dataset File</th> - <th>Transfer Status</th> - <th></th> - </tr> - <thead> - <tbody> - %for dataset_index, dataset_file in enumerate(dataset_files): - ${sample_dataset_files( dataset_index, dataset_file['name'], dataset_file['status'] )} - %endfor - </tbody> - </table> - </div> - </div> - -## </form> -##</div> - - -<br/> -<br/> -%endif - -##<div class="toolForm"> - <form name="get_data" id="get_data" action="${h.url_for( controller='requests_admin', action='get_data', sample_id=sample.id)}" method="post" > - <div class="form-row"> - ##<div class="toolFormTitle">Select files for transfer</div> - <h4>Select files for transfer</h4> - <div style="width: 60%;"> - <div class="form-row"> - <label>Folder path on the sequencer:</label> - <input type="text" name="folder_path" value="${folder_path}" size="100"/> - <input type="submit" name="browse_button" value="List contents"/> - ##<input type="submit" name="open_folder" value="Open folder"/> - <input type="submit" name="folder_up" value="Up"/> - </div> - <div class="form-row"> - <select name="files_list" id="files_list" style="max-width: 98%; width: 98%; height: 150px; font-size: 100%;" ondblclick="open_folder1(${sample.id}, '${folder_path}')" onChange="display_file_details(${sample.id}, '${folder_path}')" multiple> - %for index, f in enumerate(files): - <option value="${f}">${f}</option> - %endfor - </select> - <br/> - <div id="file_details" class="toolParamHelp" style="clear: both;"> - - </div> - </div> - <div class="form-row"> - <div class="toolParamHelp" style="clear: both;"> - After selecting dataset(s), be sure to click on the <b>Start transfer</b> button. - Once the transfer is complete the dataset(s) will show up on this page. - </div> - <input type="submit" name="select_files_button" value="Select"/> - </div> - </div> - </div> - </form> -</div> - -<%def name="sample_dataset_files( dataset_index, dataset_name, status )"> - <tr> - <td> - <label class="msg_head"><a href="${h.url_for( controller='requests_admin', action='dataset_details', sample_id=trans.security.encode_id(sample.id), dataset_index=dataset_index )}">${dataset_name}</a></label> -## <div class="msg_head"><u>${dataset_file.split('/')[-1]}</u></div> -## <div class="msg_body"> -## ${dataset_file} -## </div> - </td> - <td> - %if status not in [sample.transfer_status.NOT_STARTED, sample.transfer_status.COMPLETE]: - <i>${status}</i> - %else: - ${status} - %endif - </td> - ##<td></td> - %if status == sample.transfer_status.NOT_STARTED: - <td> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='get_data', sample_id=sample.id, remove_dataset_button=True, dataset_index=dataset_index )}"> - <img src="${h.url_for('/static/images/delete_icon.png')}" /> - <span></span></a> - </td> - %else: - <td></td> - %endif - </tr> -</%def> --- a/templates/admin/requests/add_states.mako +++ /dev/null @@ -1,26 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -%if message: - ${render_msg( message, status )} -%endif - -<div class="toolForm"> - <div class="toolFormTitle">Create ${num_states} states for the '${request_type_name}' request type</div> - <form name="new_form_fields" action="${h.url_for( controller='requests_admin', action='request_type', name=request_type_name, description=desc, num_states=num_states, request_form_id=request_form_id, sample_form_id=sample_form_id)}" method="post" > - <div class="toolFormBody"> - %for element_count in range( num_states ): - <div class="form-row"> - <label>${1+element_count}) State name:</label> - <input type="text" name="state_name_${element_count}" value="" size="40"/> - <label>State help text (optional):</label> - <input type="text" name="state_desc_${element_count}" value="" size="40"/> - </div> - <div style="clear: both"></div> - %endfor - </div> - <div class="form-row"> - <input type="submit" name="save_request_type" value="Save"/> - </div> - </form> -</div> --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -115,6 +115,7 @@ class Job( object ): self.job_runner_name = None self.job_runner_external_id = None self.post_job_actions = None + self.imported = False def add_parameter( self, name, value ): self.parameters.append( JobParameter( name, value ) ) @@ -964,16 +965,16 @@ class LibraryFolder( object ): intermed.sort() return map( operator.getitem, intermed, ( -1, ) * len( intermed ) ) # This needs to be a list - active_library_datasets = [ ld for ld in self.datasets if not ld.library_dataset_dataset_association.deleted ] + active_library_datasets = [ ld for ld in self.datasets if ld.library_dataset_dataset_association and not ld.library_dataset_dataset_association.deleted ] return sort_by_attr( [ ld for ld in active_library_datasets ], 'name' ) @property def activatable_library_datasets( self ): # This needs to be a list - return [ ld for ld in self.datasets if not ld.library_dataset_dataset_association.dataset.deleted ] + return [ ld for ld in self.datasets if ld.library_dataset_dataset_association and not ld.library_dataset_dataset_association.dataset.deleted ] @property def active_datasets( self ): # This needs to be a list - return [ ld.library_dataset_dataset_association.dataset for ld in self.datasets if not ld.library_dataset_dataset_association.deleted ] + return [ ld.library_dataset_dataset_association.dataset for ld in self.datasets if ld.library_dataset_dataset_association and not ld.library_dataset_dataset_association.deleted ] def get_display_name( self ): # Library folder name can be either a string or a unicode object. If string, # convert to unicode object assuming 'utf-8' format. @@ -1558,6 +1559,7 @@ class RequestEvent( object ): class RequestType( object ): rename_dataset_options = Bunch( NO = 'Do not rename', SAMPLE_NAME = 'Preprend sample name', + EXPERIMENT_NAME = 'Prepend experiment name', EXPERIMENT_AND_SAMPLE_NAME = 'Prepend experiment and sample name') permitted_actions = get_permitted_actions( filter='REQUEST_TYPE' ) def __init__(self, name=None, desc=None, request_form=None, sample_form=None, --- a/templates/admin/requests/edit_request.mako +++ /dev/null @@ -1,88 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -%if message: - ${render_msg( message, status )} -%endif - -<script type="text/javascript"> -$( function() { - $( "select[refresh_on_change='true']").change( function() { - var refresh = false; - var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' ) - if ( refresh_on_change_values ) { - refresh_on_change_values = refresh_on_change_values.value.split( ',' ); - var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' ); - for( i= 0; i < refresh_on_change_values.length; i++ ) { - if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){ - refresh = true; - break; - } - } - } - else { - refresh = true; - } - if ( refresh ){ - $( "#edit_request" ).submit(); - } - }); -}); -</script> - -<br/> -<br/> -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='show_request', id=trans.security.encode_id(request.id) )}"> - <span>Browse this request</span></a> - </li> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list')}"> - <span>Browse requests</span></a> - </li> -</ul> - -<div class="toolForm"> - <div class="toolFormTitle">Edit request "${request.name}" from ${request.user.email}</div> - %if len(select_request_type.options) == 1: - There are no request types created for a new request. - %else: - <div class="toolFormBody"> - <form name="edit_request" id="edit_request" action="${h.url_for( controller='requests_admin', action='edit', request_id=request.id)}" method="post" > - <div class="form-row"> - <label> - Select Request Type: - </label> - ${select_request_type.get_html()} - </div> - - %if select_request_type.get_selected() != ('Select one', 'none'): - %for i, field in enumerate(widgets): - <div class="form-row"> - <label>${field['label']}</label> - ${field['widget'].get_html()} - %if field['label'] == 'Library' and new_library: - ${new_library.get_html()} - %endif - <div class="toolParamHelp" style="clear: both;"> - ${field['helptext']} - </div> - <div style="clear: both"></div> - </div> - %endfor - <div class="form-row"> - <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="hidden" name="refresh" value="true" size="40"/> - </div> - <div style="clear: both"></div> - </div> - <div class="form-row"> - <input type="submit" name="save_changes_request_button" value="Save changes"/> - ##<input type="submit" name="edit_samples_button" value="Edit samples"/> - </div> - %endif - </form> - </div> -</div> -%endif --- a/static/about.html +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" /> -<title>ABOUT GALAXY</title> -<link rel="stylesheet" href="/static/style/base.css" type="text/css" /> -<link rel="stylesheet" href="/static/style/help.css" type="text/css" /> -</head> -<body> -<div class="document" id="about-galaxy"> -<h1 class="title">ABOUT GALAXY</h1> -<div class="section" id="people"> -<h2><a name="people">People:</a></h2> -<ul class="simple"> -<li>Istvan Albert - <em>Co-PI</em></li> -<li>Daniel Blankenberg - <em>Graduate student</em></li> -<li>Richard Burhans - <em>Sysadmin</em></li> -<li>Laura Elnitski - <em>Co-PI</em></li> -<li>Belinda Giardine - <em>Programmer</em></li> -<li>Ross Hardison - <em>Co-PI</em></li> -<li>Jim Kent - <em>Co-PI</em></li> -<li>David King - <em>Graduate student</em></li> -<li>Webb Miller - <em>Co-PI</em></li> -<li>Anton Nekrutenko - <em>PI</em></li> -<li>Cathy Riemer - <em>Programmer</em></li> -<li>Prachi Shah - <em>Programmer</em></li> -<li>Ian Schenck - <em>Undergraduate student</em></li> -<li>James Taylor - <em>Graduate student</em></li> -<li>Yi Zhang - <em>Programmer</em></li> -</ul> -</div> -<hr class="docutils" /> -<div class="section" id="development"> -<h2><a name="development">Development:</a></h2> -<p><strong>Galaxy core</strong> - <em>Istvan Albert</em> and <em>James Taylor</em></p> -<p><strong>Interface</strong> - <em>James Taylor</em>, <em>Istvan Albert</em>, <em>Anton Nekrutenko</em></p> -<p><strong>Tools</strong> -</p> -<ul class="simple"> -<li>Data sources - <em>Istvan Albert</em></li> -<li>EMBOSS, Phylip, mafs - <em>Daniel Blankenberg</em></li> -<li>Text Tools, Sequence Extractors - <em>Richard Burhans</em>, <em>Anton Nekrutenko</em>, <em>Ian Schenck</em></li> -<li>Operations - <em>James Taylor</em>, <em>Yi Zhang</em></li> -<li>Statistics, Graphs - <em>Istvan Albert</em>, <em>David King</em></li> -</ul> -<p><strong>Project management</strong> - <em>Anton Nekrutenko</em></p> -<p>Current version of Galaxy uses many ideas developed by <em>Laura Elnitski</em>, <em>Belinda Giardine</em>, and <em>Cathy Riemer</em> in Galaxy1 and GALA.</p> -</div> -<hr class="docutils" /> -<div class="section" id="special-thanks-to"> -<h2><a name="special-thanks-to">Special thanks to:</a></h2> -<ul class="simple"> -<li>David Haussler</li> -<li>Ewan Birney</li> -<li>Hiram Clawson</li> -<li>Angie Hinrichs</li> -<li>Darin London</li> -<li>Members of Hardison, Makova, Miller, and Nekrutenko Labs</li> -</ul> -</div> -<hr class="docutils" /> -<div class="section" id="technology"> -<h2><a name="technology">Technology:</a></h2> -<p>Galaxy core is written entirely in Python. It uses the following open source technologies:</p> -<ul class="simple"> -<li>web-server <a class="reference" href="http://www.cherrypy.org/">CherryPy</a></li> -<li>database <a class="reference" href="http://www.sleepycat.com/products/db.shtml">BerkelyDB</a></li> -<li>XML library <a class="reference" href="http://effbot.org/zone/element-index.htm">ElementTree</a></li> -<li>HTML templating library <a class="reference" href="http://www.cheetahtemplate.org/">Cheetah</a></li> -</ul> -<p>Galaxy API generated from source code can be found <a class="reference" href="http://www.bx.psu.edu/trac/local/docs/index.html">here</a></p> -<hr class="docutils" /> -<p><a class="reference" href="http://www.bx.psu.edu">The Center for Comparative Genomics and Bioinformatics</a> at <a class="reference" href="http://www.psu.edu">Penn State</a> | 2005</p> -</div> -</div> -</body> -</html> --- a/templates/requests/sample_datasets.mako +++ /dev/null @@ -1,7 +0,0 @@ -<%def name="render_sample_datasets( sample )"> - <a href="${h.url_for(controller='requests_admin', action='show_datatx_page', sample_id=trans.security.encode_id(sample.id))}">${sample.transferred_dataset_files()}/${len(sample.dataset_files)}</a> -</%def> - - - -${render_sample_datasets( sample )} --- a/static/about.rst +++ /dev/null @@ -1,82 +0,0 @@ -ABOUT GALAXY -============ - -People: -------- - -* Istvan Albert - *Co-PI* -* Daniel Blankenberg - *Graduate student* -* Richard Burhans - *Sysadmin* -* Laura Elnitski - *Co-PI* -* Belinda Giardine - *Programmer* -* Ross Hardison - *Co-PI* -* Jim Kent - *Co-PI* -* David King - *Graduate student* -* Webb Miller - *Co-PI* -* Anton Nekrutenko - *PI* -* Cathy Riemer - *Programmer* -* Prachi Shah - *Programmer* -* Ian Schenck - *Undergraduate student* -* James Taylor - *Graduate student* -* Yi Zhang - *Programmer* - ------ - -Development: ------------- - -**Galaxy core** - *Istvan Albert* and *James Taylor* - -**Interface** - *James Taylor*, *Istvan Albert*, *Anton Nekrutenko* - -**Tools** - - -* Data sources - *Istvan Albert* -* EMBOSS, Phylip, mafs - *Daniel Blankenberg* -* Text Tools, Sequence Extractors - *Richard Burhans*, *Anton Nekrutenko*, *Ian Schenck* -* Operations - *James Taylor*, *Yi Zhang* -* Statistics, Graphs - *Istvan Albert*, *David King* - -**Project management** - *Anton Nekrutenko* - -Current version of Galaxy uses many ideas developed by *Laura Elnitski*, *Belinda Giardine*, and *Cathy Riemer* in Galaxy1 and GALA. - ------ - -Special thanks to: ------------------- - -* David Haussler -* Ewan Birney -* Hiram Clawson -* Angie Hinrichs -* Darin London -* Members of Hardison, Makova, Miller, and Nekrutenko Labs - ------ - -Technology: ------------ - -Galaxy core is written entirely in Python. It uses the following open source technologies: - -* web-server `CherryPy`__ -* database `BerkelyDB`__ -* XML library `ElementTree`__ -* HTML templating library `Cheetah`__ - -Galaxy API generated from source code can be found `here`__ - -.. __: http://www.cherrypy.org/ -.. __: http://www.sleepycat.com/products/db.shtml -.. __: http://effbot.org/zone/element-index.htm -.. __: http://www.cheetahtemplate.org/ -.. __: http://www.bx.psu.edu/trac/local/docs/index.html - ------ - -`The Center for Comparative Genomics and Bioinformatics`__ at `Penn State`__ | 2005 - -.. __: http://www.bx.psu.edu -.. __: http://www.psu.edu - --- a/templates/admin/requests/new_request.mako +++ /dev/null @@ -1,94 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -%if message: - ${render_msg( message, status )} -%endif - -<script type="text/javascript"> -$( function() { - $( "select[refresh_on_change='true']").change( function() { - var refresh = false; - var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' ) - if ( refresh_on_change_values ) { - refresh_on_change_values = refresh_on_change_values.value.split( ',' ); - var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' ); - for( i= 0; i < refresh_on_change_values.length; i++ ) { - if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){ - refresh = true; - break; - } - } - } - else { - refresh = true; - } - if ( refresh ){ - $( "#new_request" ).submit(); - } - }); -}); -</script> - -<%def name="javascripts()"> - ${parent.javascripts()} - ${h.js("jquery.autocomplete", "autocomplete_tagging" )} -</%def> - -<%def name="stylesheets()"> - ${parent.stylesheets()} - ${h.css( "autocomplete_tagging" )} -</%def> - -<br/> -<br/> -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list')}"> - <span>Browse requests</span></a> - </li> -</ul> - -<div class="toolForm"> - <div class="toolFormTitle">Add a new request</div> - %if len(select_request_type.options) == 1: - There are no request types created for a new request. - %else: - <div class="toolFormBody"> - <form name="new_request" id="new_request" action="${h.url_for( controller='requests_admin', action='new', create=True )}" method="post" > - <div class="form-row"> - <label> - Select Request Type - </label> - ${select_request_type.get_html()} - </div> - - %if select_request_type.get_selected() != ('Select one', 'none'): - %for i, field in enumerate(widgets): - <div class="form-row"> - <label>${field['label']}</label> - ${field['widget'].get_html()} - %if field['label'] == 'Library' and new_library: - ${new_library.get_html()} - %endif - <div class="toolParamHelp" style="clear: both;"> - ${field['helptext']} - </div> - <div style="clear: both"></div> - </div> - %endfor - <div class="form-row"> - <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="hidden" name="refresh" value="true" size="40"/> - </div> - <div style="clear: both"></div> - </div> - <div class="form-row"> - <input type="submit" name="create_request_button" value="Save"/> - <input type="submit" name="create_request_samples_button" value="Add samples"/> - </div> - %endif - </form> - </div> -</div> -%endif --- a/templates/sample/sample_events.mako +++ /dev/null @@ -1,45 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -<%def name="title()">Events for Sample ${sample_name}</%def> - - -<h2>Events for Sample "${sample_name}"</h2> - -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='list', operation='show_request', id=trans.security.encode_id(request.id) )}"> - <span>Browse this request</span></a> - </li> - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='list')}"> - <span>Browse requests</span></a> - </li> -</ul> - -%if message: - ${render_msg( message, status )} -%endif - -<div class="toolForm"> - <table class="grid"> - <thead> - <tr> - <th>State</th> - <th>Description</th> - <th>Updated</th> - <th>Comments</th> - </tr> - </thead> - <tbody> - %for state, desc, updated, comments in events_list: - <tr class="libraryRow libraryOrFolderRow" id="libraryRow"> - <td><b><a>${state}</a></b></td> - <td><a>${desc}</a></td> - <td><a>${updated}</a></td> - <td><a>${comments}</a></td> - </tr> - %endfor - </tbody> - </table> -</div> Binary file test-data/1.scf.zip has changed --- a/templates/requests/show_data.mako +++ /dev/null @@ -1,86 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - - -%if message: - ${render_msg( message, status )} -%endif - -<script type="text/javascript"> -$(document).ready(function(){ - //hide the all of the element with class msg_body - $(".msg_body").hide(); - //toggle the componenet with class msg_body - $(".msg_head").click(function(){ - $(this).next(".msg_body").slideToggle(450); - }); -}); -</script> -<style type="text/css"> -.msg_head { - padding: 0px 0px; - cursor: pointer; -} - -} -</style> - - -<h2>Data transfer from Sequencer</h2> -<h3>Sample "${sample.name}" of Request "${sample.request.name}"</h3> - -<ul class="manage-table-actions"> - %if sample.request.submitted() and sample.inprogress_dataset_files(): - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='show_datatx_page', sample_id=trans.security.encode_id(sample.id) )}"> - <span>Refresh this page</span></a> - </li> - %endif - %if sample.library: - <li> - <a class="action-button" href="${h.url_for( controller='library_common', action='browse_library', cntrller='library', id=trans.security.encode_id( sample.library.id ) )}"> - <span>${sample.library.name} Data Library</span></a> - </li> - %endif - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='list', operation='show_request', id=trans.security.encode_id(sample.request.id) )}"> - <span>Browse this request</span></a> - </li> -</ul> - -<div class="toolForm"> - <form name="get_data" action="${h.url_for( controller='requests_admin', action='get_data', sample_id=sample.id)}" method="post" > - <div class="form-row"> - %if len(dataset_files): - <table class="grid"> - <thead> - <tr> - <th>Dataset File</th> - <th>Transfer Status</th> - </tr> - <thead> - <tbody> - %for dataset_index, dataset_file in enumerate(dataset_files): - ${sample_dataset_files( dataset_index, dataset_file[0], dataset_file[1] )} - %endfor - </tbody> - </table> - %else: - There are no dataset files. - %endif - </div> - </form> -</div> - -<%def name="sample_dataset_files( dataset_index, dataset_file, status )"> - <tr> - <td>${dataset_file.split('/')[-1]}</td> - <td> - %if status == sample.transfer_status.IN_PROGRESS: - <i>${status}</i> - %else: - ${status} - %endif - </td> - </tr> -</%def> --- a/templates/requests/events.mako +++ /dev/null @@ -1,39 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -<h2>History of Sequencing Request "${request.name}"</h2> -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='list', operation='show_request', id=trans.security.encode_id(request.id) )}"> - <span>Browse this request</span></a> - </li> - <li> - <a class="action-button" href="${h.url_for( controller='requests', action='list')}"> - <span>Browse all requests</span></a> - </li> -</ul> - -%if message: - ${render_msg( message, status )} -%endif - -<div class="toolForm"> - <table class="grid"> - <thead> - <tr> - <th>State</th> - <th>Last Update</th> - <th>Comments</th> - </tr> - </thead> - <tbody> - %for state, updated, comments in events_list: - <tr class="libraryRow libraryOrFolderRow" id="libraryRow"> - <td><b><a>${state}</a></b></td> - <td><a>${updated}</a></td> - <td><a>${comments}</a></td> - </tr> - %endfor - </tbody> - </table> -</div> --- a/templates/admin/requests/events.mako +++ /dev/null @@ -1,36 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -<h2>History of Sequencing Request "${request.name}"</h2> -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='show_request', id=trans.security.encode_id(request.id) )}"> - <span>Browse this request</span></a> - </li> -</ul> -<h3>User: ${request.user.email}</h3> - -%if message: - ${render_msg( message, status )} -%endif - -<div class="toolForm"> - <table class="grid"> - <thead> - <tr> - <th>State</th> - <th>Last Update</th> - <th>Comments</th> - </tr> - </thead> - <tbody> - %for state, updated, comments in events_list: - <tr class="libraryRow libraryOrFolderRow" id="libraryRow"> - <td><b><a>${state}</a></b></td> - <td><a>${updated}</a></td> - <td><a>${comments}</a></td> - </tr> - %endfor - </tbody> - </table> -</div>