galaxy-dist commit 1b397ec7f199: sample tracking bug fixes:
# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User rc # Date 1286889424 14400 # Node ID 1b397ec7f199b8a0581e52af694a12985deb0a64 # Parent 3c74359b7bb72c0d9cfc53e3f0b7a9e3ea426b87 sample tracking bug fixes: - dataset select page now fixed - find samples page now fixed for regular user --- a/templates/requests/common/manage_request.mako +++ b/templates/requests/common/manage_request.mako @@ -157,7 +157,7 @@ %if is_admin: %if request.is_submitted: <a class="action-button" href="${h.url_for( controller='requests_admin', action='reject', cntrller=cntrller, id=trans.security.encode_id( request.id ) )}">Reject</a> - <a class="action-button" href="${h.url_for( controller='requests_admin', action='get_data', show_page=True, request_id=request.id )}">Select datasets to transfer</a> + <a class="action-button" href="${h.url_for( controller='requests_admin', action='get_data', show_page=True, request_id=trans.security.encode_id( request.id ) )}">Select datasets to transfer</a> %endif %endif </div> --- a/templates/requests/find_samples_index.mako +++ b/templates/requests/find_samples_index.mako @@ -10,5 +10,5 @@ </%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='requests_common', action='find_samples' )}"></iframe> + <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${h.url_for( controller='requests_common', action='find_samples', cntrller='requests')}"></iframe></%def> --- a/lib/galaxy/web/controllers/requests_admin.py +++ b/lib/galaxy/web/controllers/requests_admin.py @@ -382,7 +382,7 @@ class RequestsAdmin( BaseController, Use if a_path and not a_path.endswith( os.sep ): a_path += os.sep return a_path - def __build_sample_id_select_field( self, request, selected_value ): + def __build_sample_id_select_field( self, trans, request, selected_value ): return build_select_field( trans, request.samples, 'name', 'sample_id', selected_value=selected_value, refresh_on_change=False ) @web.expose @web.require_admin @@ -392,15 +392,15 @@ class RequestsAdmin( BaseController, Use status = params.get( 'status', 'done' ) request_id = kwd.get( 'request_id', None ) try: - request = trans.sa_session.query( trans.model.Request ).get( request_id ) + request = trans.sa_session.query( trans.model.Request ).get( trans.security.decode_id( request_id ) ) except: return invalid_id_redirect( trans, 'requests_admin', request_id ) files_list = util.listify( params.get( 'files_list', '' ) ) folder_path = util.restore_text( params.get( 'folder_path', request.type.datatx_info[ 'data_dir' ] ) ) selected_value = kwd.get( 'sample_id', 'none' ) - sample_id_select_field = self.__build_sample_id_select_field( request, selected_value ) + sample_id_select_field = self.__build_sample_id_select_field( trans, request, selected_value ) if not folder_path: - return trans.fill_template( '/admin/requests/dataset_transfer.mako', + return trans.fill_template( '/admin/requests/get_data.mako', cntrller='requests_admin', request=request, sample_id_select_field=sample_id_select_field, @@ -413,7 +413,7 @@ class RequestsAdmin( BaseController, Use sample = trans.sa_session.query( trans.model.Sample ).get( trans.security.decode_id( sample_id ) ) if sample.datasets: folder_path = os.path.dirname( sample.datasets[-1].file_path ) - return trans.fill_template( '/admin/requests/dataset_transfer.mako', + return trans.fill_template( '/admin/requests/get_data.mako', cntrller='requests_admin', request=request, sample_id_select_field=sample_id_select_field, @@ -424,7 +424,7 @@ class RequestsAdmin( BaseController, Use elif params.get( 'browse_button', False ): # get the filenames from the remote host files = self.__get_files( trans, request.type, folder_path ) - return trans.fill_template( '/admin/requests/dataset_transfer.mako', + return trans.fill_template( '/admin/requests/get_data.mako', cntrller='requests_admin', request=request, sample_id_select_field=sample_id_select_field, @@ -435,7 +435,7 @@ class RequestsAdmin( BaseController, Use elif params.get( 'folder_up', False ): # get the filenames from the remote host files = self.__get_files( trans, request.type, folder_path ) - return trans.fill_template( '/admin/requests/dataset_transfer.mako', + return trans.fill_template( '/admin/requests/get_data.mako', cntrller='requests_admin', request=request, sample_id_select_field=sample_id_select_field, @@ -449,7 +449,7 @@ class RequestsAdmin( BaseController, Use folder_path = self.__check_path( folder_path ) # get the filenames from the remote host files = self.__get_files( trans, request.type, folder_path ) - return trans.fill_template( '/admin/requests/dataset_transfer.mako', + return trans.fill_template( '/admin/requests/get_data.mako', cntrller='requests_admin', request=request, sample_id_select_field=sample_id_select_field, --- a/templates/admin/requests/get_data.mako +++ b/templates/admin/requests/get_data.mako @@ -96,7 +96,7 @@ </li></ul> -<form name="get_data" id="get_data" action="${h.url_for( controller='requests_admin', cntrller=cntrller, action='get_data', request_id=trans.security.encode_id( request.id )}" method="post" > +<form name="get_data" id="get_data" action="${h.url_for( controller='requests_admin', cntrller=cntrller, action='get_data', request_id=trans.security.encode_id( request.id ) )}" method="post" ><div class="toolForm"><div class="toolFormTitle">Select files for transfer</div><div class="form-row"> --- a/templates/requests/common/find_samples.mako +++ b/templates/requests/common/find_samples.mako @@ -66,7 +66,7 @@ %for sample in samples: <div class="form-row"> Sample: <b>${sample.name}</b> | Barcode: ${sample.bar_code}<br/> - State: ${sample.state}<br/> + State: ${sample.state.name}<br/> Datasets: <a href="${h.url_for( controller='requests_common', action='view_dataset_transfer', cntrller=cntrller, sample_id=trans.security.encode_id( sample.id ) )}">${sample.transferred_dataset_files}/${len( sample.datasets )}</a><br/> %if is_admin: <i>User: ${sample.request.user.email}</i>
participants (1)
-
commits-noreply@bitbucket.org