Skip to content

Commit

Permalink
Merge pull request #793 from carlfeberhard/fix.rerun-details-take2
Browse files Browse the repository at this point in the history
UI, datasets: Move support for rerunnable to dataset-li expansion; re…
  • Loading branch information
dannon committed Sep 24, 2015
2 parents ace8c88 + 12ada39 commit 0428de0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
12 changes: 9 additions & 3 deletions client/galaxy/scripts/mvc/dataset/dataset-li.js
Expand Up @@ -37,8 +37,6 @@ var DatasetListItemView = _super.extend(

/** where should pages from links be displayed? (default to new tab/window) */
this.linkTarget = attributes.linkTarget || '_blank';

this._setUpListeners();
},

/** event listeners */
Expand All @@ -60,13 +58,21 @@ var DatasetListItemView = _super.extend(
},

// ......................................................................... expandable
/** In this override, only get details if in the ready state.
/** In this override, only get details if in the ready state, get rerunnable if in other states.
* Note: fetch with no 'change' event triggering to prevent automatic rendering.
*/
_fetchModelDetails : function(){
var view = this;
if( view.model.inReadyState() && !view.model.hasDetails() ){
return view.model.fetch({ silent: true });

// special case the need for the rerunnable and creating_job attributes
// needed for rendering re-run button on queued, running datasets
} else if( !view.model.has( 'rerunnable' ) ){
return view.model.fetch({ silent: true, data: {
// only fetch rerunnable and creating_job to keep overhead down
keys: [ 'rerunnable', 'creating_job' ].join(',')
}});
}
return jQuery.when();
},
Expand Down
12 changes: 4 additions & 8 deletions client/galaxy/scripts/mvc/tools/tools-jobs.js
Expand Up @@ -35,12 +35,8 @@ return {
success : function(response) {
callback && callback();
form.reciept(ToolTemplate.success(response));
// Get hda ids from response, request detailed refresh of these.
var detailIds = [];
response.outputs.forEach(function(e, i, a){
detailIds.push(e.id);
});
self._refreshHdas(detailIds);
// begin checking the history for updates
self._refreshHdas();
},
error : function(response, response_full) {
callback && callback();
Expand Down Expand Up @@ -140,9 +136,9 @@ return {

/** Refreshes the history panel
*/
_refreshHdas: function(detailIds) {
_refreshHdas: function(detailIds, options) {
if (parent.Galaxy && parent.Galaxy.currHistoryPanel) {
parent.Galaxy.currHistoryPanel.refreshContents(detailIds);
parent.Galaxy.currHistoryPanel.refreshContents(detailIds, options);
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/dataset/dataset-li.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0428de0

Please sign in to comment.