Skip to content

Commit

Permalink
[17.05] Fix FTP upload of multiple files in collection uploader.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed May 11, 2017
1 parent 9940ae7 commit 04bb1e8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
Expand Up @@ -130,10 +130,9 @@ function( Utils, UploadModel, UploadRow, UploadFtp, Popover, Select, Ui, LIST_CO
/** Success */
_eventSuccess: function( index, message ) {
// var hdaId = message["outputs"][0]["id"];
var hid = message["outputs"][0]["hid"];
console.log(message["outputs"][0]);
var hids = _.pluck(message["outputs"], "hid");
var it = this.collection.get( index );
it.set( { 'percentage': 100, 'status': 'success', 'hid': hid } );
it.set( { 'percentage': 100, 'status': 'success', 'hids': hids } );
this.ui_button.model.set( 'percentage', this._uploadPercentage( 100, it.get( 'file_size' ) ) );
this.upload_completed += it.get( 'file_size' ) * 100;
this.counter.announce--;
Expand Down Expand Up @@ -161,7 +160,9 @@ function( Utils, UploadModel, UploadRow, UploadFtp, Popover, Select, Ui, LIST_CO
},

_eventBuild: function() {
var models = this.collection.map( function( upload ) { return Galaxy.currHistoryPanel.collection.getByHid( upload.get( 'hid' ) ) } );
var allHids = [];
_.forEach( this.collection.models, function( upload ) { allHids.push.apply(allHids, upload.get( 'hids' )); } );
var models = _.map( allHids, function( hid ) { return Galaxy.currHistoryPanel.collection.getByHid( hid ) } );
var selection = new Galaxy.currHistoryPanel.collection.constructor( models );
// I'm building the selection wrong because I need to set this historyId directly.
selection.historyId = Galaxy.currHistoryPanel.collection.historyId;
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/upload/collection/collection-view.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/scripts/bundled/analysis.bundled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/analysis.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js

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

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/login.bundled.js.map

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

0 comments on commit 04bb1e8

Please sign in to comment.