diff --git a/lib/galaxy/webapps/galaxy/api/history_contents.py b/lib/galaxy/webapps/galaxy/api/history_contents.py index e47f9f48f6b..cf8666a7cd1 100644 --- a/lib/galaxy/webapps/galaxy/api/history_contents.py +++ b/lib/galaxy/webapps/galaxy/api/history_contents.py @@ -102,8 +102,10 @@ class HistoryContentsController( BaseAPIController, UsesHistoryDatasetAssociatio contents_kwds[ 'deleted' ] = kwd.get( 'deleted', None ) contents_kwds[ 'visible' ] = kwd.get( 'visible', None ) # details param allows a mixed set of summary and detailed hdas - #TODO: this is getting convoluted due to backwards compat - details = kwd.get( 'details', None ) or [] + # Ever more convoluted due to backwards compat..., details + # should be considered deprecated in favor of more specific + # dataset_details (and to be implemented dataset_collection_details). + details = kwd.get( 'details', None ) or kwd.get( 'dataset_details', None ) or [] if details and details != 'all': details = util.listify( details ) diff --git a/static/scripts/mvc/history/history-model.js b/static/scripts/mvc/history/history-model.js index c3d0ee9067b..eaca8f7815d 100644 --- a/static/scripts/mvc/history/history-model.js +++ b/static/scripts/mvc/history/history-model.js @@ -200,6 +200,7 @@ History.UPDATE_DELAY = 4000; History.getHistoryData = function getHistoryData( historyId, options ){ options = options || {}; var hdaDetailIds = options.hdaDetailIds || []; + var hdcaDetailIds = options.hdcaDetailIds || []; //console.debug( 'getHistoryData:', historyId, options ); var df = jQuery.Deferred(), @@ -224,7 +225,18 @@ History.getHistoryData = function getHistoryData( historyId, options ){ if( _.isFunction( hdaDetailIds ) ){ hdaDetailIds = hdaDetailIds( historyData ); } - var data = ( hdaDetailIds.length )?( { details : hdaDetailIds.join( ',' ) } ):( {} ); + if( _.isFunction( hdcaDetailIds ) ){ + hdcaDetailIds = hdcaDetailIds( historyData ); + } + var data = {}; + if( hdaDetailIds.length ) { + data[ "dataset_details" ] = hdaDetailIds.join( ',' ); + } + if( hdcaDetailIds.length ) { + // for symmetry, not actually used by backend of consumed + // by frontend. + data[ "dataset_collection_details" ] = hdcaDetailIds.join( ',' ); + } return jQuery.ajax( galaxy_config.root + 'api/histories/' + historyData.id + '/contents', { data: data }); }