[hg] galaxy 3469: lims:
details: http://www.bx.psu.edu/hg/galaxy/rev/8e9aa1709c6c changeset: 3469:8e9aa1709c6c user: rc date: Wed Mar 03 12:07:39 2010 -0500 description: lims: - Fixed a bug in saving the data folder for dataset transfer - UI tweaks - renamed request state 'Submitted' to 'In Progress' diffstat: lib/galaxy/model/__init__.py | 11 +++- lib/galaxy/web/controllers/requests.py | 2 +- lib/galaxy/web/controllers/requests_admin.py | 7 +- templates/admin/requests/get_data.mako | 28 ++++++----- templates/admin/requests/show_request.mako | 28 +++++------ templates/requests/show_request.mako | 67 +++++++++++++-------------- 6 files changed, 74 insertions(+), 69 deletions(-) diffs (283 lines): diff -r bb7c2b314e3e -r 8e9aa1709c6c lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py Tue Mar 02 16:40:40 2010 -0500 +++ b/lib/galaxy/model/__init__.py Wed Mar 03 12:07:39 2010 -0500 @@ -1348,9 +1348,9 @@ class Request( object ): states = Bunch( NEW = 'New', - SUBMITTED = 'Submitted', + SUBMITTED = 'In Progress', REJECTED = 'Rejected', - COMPLETE = 'Complete') + COMPLETE = 'Complete' ) def __init__(self, name=None, desc=None, request_type=None, user=None, form_values=None): self.name = name @@ -1385,6 +1385,7 @@ return self.state() == self.states.NEW def complete(self): return self.state() == self.states.COMPLETE + class RequestEvent( object ): def __init__(self, request=None, request_state=None, comment=''): @@ -1432,6 +1433,12 @@ if status == self.transfer_status.IN_PROGRESS: count = count + 1 return count + def transferred_dataset_files(self): + count = 0 + for df, status in self.dataset_files: + if status == self.transfer_status.COMPLETE: + count = count + 1 + return count class SampleState( object ): def __init__(self, name=None, desc=None, request_type=None): diff -r bb7c2b314e3e -r 8e9aa1709c6c lib/galaxy/web/controllers/requests.py --- a/lib/galaxy/web/controllers/requests.py Tue Mar 02 16:40:40 2010 -0500 +++ b/lib/galaxy/web/controllers/requests.py Wed Mar 03 12:07:39 2010 -0500 @@ -947,7 +947,7 @@ msg=msg, id=trans.security.encode_id(request.id) )) # change the request state to 'Submitted' - comments = "Request moved to 'Submitted' state." + comments = "Sequencing request is in progress." event = trans.app.model.RequestEvent(request, request.states.SUBMITTED, comments) trans.sa_session.add( event ) trans.sa_session.flush() diff -r bb7c2b314e3e -r 8e9aa1709c6c lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py Tue Mar 02 16:40:40 2010 -0500 +++ b/lib/galaxy/web/controllers/requests_admin.py Wed Mar 03 12:07:39 2010 -0500 @@ -412,7 +412,7 @@ id=trans.security.encode_id(request.id) ) ) # change the request state to 'Submitted' if request.user.email is not trans.user: - comments = "Request moved to 'Submitted' state by admin (%s) on behalf of %s." % (trans.user.email, request.user.email) + comments = "Request submitted by admin (%s) on behalf of %s." % (trans.user.email, request.user.email) else: comments = "" event = trans.app.model.RequestEvent(request, request.states.SUBMITTED, comments) @@ -1295,8 +1295,6 @@ event = trans.app.model.RequestEvent(request, request.states.COMPLETE, comments) trans.sa_session.add( event ) trans.sa_session.flush() -# trans.sa_session.add( request ) -# trans.sa_session.flush() def change_state(self, trans, sample): possible_states = sample.request.type.states curr_state = sample.current_state() @@ -1775,7 +1773,8 @@ # data transfer info rt.datatx_info = dict(host=util.restore_text( params.get( 'host', '' ) ), username=util.restore_text( params.get( 'username', '' ) ), - password=params.get( 'password', '' )) + password=params.get( 'password', '' ), + data_dir=util.restore_text( params.get( 'data_dir', '' ) )) trans.sa_session.add( rt ) trans.sa_session.flush() # set sample states diff -r bb7c2b314e3e -r 8e9aa1709c6c templates/admin/requests/get_data.mako --- a/templates/admin/requests/get_data.mako Tue Mar 02 16:40:40 2010 -0500 +++ b/templates/admin/requests/get_data.mako Wed Mar 03 12:07:39 2010 -0500 @@ -30,12 +30,6 @@ <h3>Sample "${sample.name}" of Request "${sample.request.name}"</h3> <ul class="manage-table-actions"> -## %if sample.request.submitted() and sample.untransferred_dataset_files(): -## <li> -## <a class="action-button" href="${h.url_for( controller='requests_admin', action='start_datatx', id=trans.security.encode_id(sample.id) )}"> -## <span>Start data transfer</span></a> -## </li> -## %endif %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) )}"> @@ -47,7 +41,7 @@ <span>Sequencer information</span></a> </li> <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 ) )}"> + <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> @@ -57,17 +51,16 @@ </ul> <div class="toolForm"> - <form name="get_data" action="${h.url_for( controller='requests_admin', action='get_data', sample_id=sample.id)}" method="post" > - %if len(dataset_files): + %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>Datasets Transferred</h4> + <h4>Sample Dataset(s)</h4> <div class="form-row"> <table class="grid"> <thead> <tr> <th>Dataset File</th> <th>Transfer Status</th> - ##<th>Data Library</th> <th></th> </tr> <thead> @@ -79,8 +72,14 @@ </table> </div> </div> - %endif +## </form> +##</div> +<br/> +%endif +##<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"> + ##<div class="toolFormTitle">Select files for transfer</div> <h4>Select files for transfer</h4> <div style="width: 60%;"> <div class="form-row"> @@ -98,6 +97,11 @@ </select> </div> <div class="form-row"> + <div class="toolParamHelp" style="clear: both;"> + After clicking <b>Transfer</b> do <i>not</i> close this page or + navigate away from this page. Once the transfer is complete + the dataset(s) will show up on this page. + </div> <input type="submit" name="start_transfer_button" value="Transfer"/> </div> </div> diff -r bb7c2b314e3e -r 8e9aa1709c6c templates/admin/requests/show_request.mako --- a/templates/admin/requests/show_request.mako Tue Mar 02 16:40:40 2010 -0500 +++ b/templates/admin/requests/show_request.mako Wed Mar 03 12:07:39 2010 -0500 @@ -362,29 +362,27 @@ <table class="grid"> <tbody> <tr> - %if not request.complete(): <div class="form-row"> <td> - %if current_samples and not request.complete(): + %if current_samples: <input type="submit" name="edit_samples_button" value="Edit samples"/> %endif </td> %if request.unsubmitted(): - <td> - <label>Import from csv file</label> - <input type="file" name="file_data" /> - <input type="submit" name="import_samples_button" value="Import samples"/> - </td> - <td> - %if current_samples: - <label>Copy from sample</label> - ${sample_copy.get_html()} - %endif - <input type="submit" name="add_sample_button" value="Add New"/> - </td> + <td> + <label>Import from csv file</label> + <input type="file" name="file_data" /> + <input type="submit" name="import_samples_button" value="Import samples"/> + </td> + <td> + %if current_samples: + <label>Copy from sample</label> + ${sample_copy.get_html()} + %endif + <input type="submit" name="add_sample_button" value="Add New"/> + </td> %endif </div> - %endif </tr> </tbody> </table> diff -r bb7c2b314e3e -r 8e9aa1709c6c templates/requests/show_request.mako --- a/templates/requests/show_request.mako Tue Mar 02 16:40:40 2010 -0500 +++ b/templates/requests/show_request.mako Wed Mar 03 12:07:39 2010 -0500 @@ -237,40 +237,6 @@ %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"> @@ -325,7 +291,38 @@ </%def> <div class="toolForm"> - ##<div class="toolFormTitle">Samples (${len(request.samples)})</div> + <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:
participants (1)
-
Greg Von Kuster