[17.05] Fix FTP upload of multiple files in collection uploader.

This commit is contained in:
John Chilton
2017-05-11 15:37:50 -04:00
parent 9940ae7030
commit 04bb1e85cd
8 changed files with 13 additions and 12 deletions
@@ -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--;
@@ -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;
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,4 +1,4 @@
!function(t){function e(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return t[i].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var i=window.webpackJsonp;window.webpackJsonp=function(o,r){for(var a,l,u=0,c=[];u<o.length;u++)l=o[u],s[l]&&c.push.apply(c,s[l]),s[l]=0;for(a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a]);for(i&&i(o,r);c.length;)c.shift().call(null,e);if(r[0])return n[0]=0,e(0)};var n={},s={2:0};return e.e=function(t,i){if(0===s[t])return i.call(null,e);if(void 0!==s[t])s[t].push(i);else{s[t]=[i];var n=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.src=e.p+""+t+"."+({3:"analysis",4:"login"}[t]||t)+".bundled.js",n.appendChild(o)}},e.m=t,e.c=n,e.p="",e(0)}([function(t,e,i){i(133),i(1),i(107),i(69),i(66),i(67),i(68),i(105),i(65),i(102),i(64),i(104),i(2),i(3),i(86),i(62),i(10),t.exports=i(132)},function(t,e,i){var n,s;/*!
!function(t){function e(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return t[i].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var i=window.webpackJsonp;window.webpackJsonp=function(o,r){for(var a,l,u=0,c=[];u<o.length;u++)l=o[u],s[l]&&c.push.apply(c,s[l]),s[l]=0;for(a in r)t[a]=r[a];for(i&&i(o,r);c.length;)c.shift().call(null,e);if(r[0])return n[0]=0,e(0)};var n={},s={2:0};return e.e=function(t,i){if(0===s[t])return i.call(null,e);if(void 0!==s[t])s[t].push(i);else{s[t]=[i];var n=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.src=e.p+""+t+"."+({3:"analysis",4:"login"}[t]||t)+".bundled.js",n.appendChild(o)}},e.m=t,e.c=n,e.p="",e(0)}([function(t,e,i){i(133),i(1),i(107),i(69),i(66),i(67),i(68),i(105),i(65),i(102),i(64),i(104),i(2),i(3),i(86),i(62),i(10),t.exports=i(132)},function(t,e,i){var n,s;/*!
* jQuery JavaScript Library v1.12.4
* http://jquery.com/
*
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long