Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to upload multiple FTP files within a single request #4513

Merged
merged 40 commits into from
Oct 9, 2017
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
fe556c8
Add new tab for batchmode ftp uploads
guerler Aug 28, 2017
40f3ac3
Load ftp file list view into ftp specific tab
guerler Aug 28, 2017
985b17f
Adjust styles for view of ftp list
guerler Aug 28, 2017
b677bb1
Remove important tag from css style adjustment
guerler Aug 28, 2017
6d11c85
Fix extensions and genome build styles, align with default uploader view
guerler Aug 28, 2017
4f5b574
Align style of composite uploader to all other upload modes
guerler Aug 28, 2017
7a2c1cd
Add handlers to add and remove selected ftp files
guerler Aug 28, 2017
47d7357
Add extension info popup
guerler Aug 28, 2017
668c268
Add reusable extension info popup
guerler Aug 28, 2017
4637e4e
Add packed files
guerler Aug 28, 2017
e38ecb4
Add listener to adjust start button activity
guerler Aug 28, 2017
bac5299
Fix upload submission, refresh history after success
guerler Aug 28, 2017
7496d66
Augment ftp popover view, add refresh button to ftp view
guerler Aug 29, 2017
779a341
Fix select all event handler
guerler Aug 29, 2017
aca251d
Fix submission of multiple ftp files
guerler Aug 29, 2017
911bb2b
Order tab alphabatically
guerler Aug 29, 2017
d6221bf
Show proper message if files are selected twice
guerler Aug 29, 2017
459bd88
Merge branch 'dev' into ftp_uploader
guerler Aug 29, 2017
e4cb491
Hide ftp tab if ftp is unavailable, use info header of ftp tab to dis…
guerler Aug 29, 2017
1b9a627
Use model and consistently named attributes
guerler Aug 29, 2017
694f586
Indicate job submission in start button
guerler Aug 29, 2017
6757d04
Rename tab label
guerler Aug 29, 2017
2ecd18e
Index ftp files instead of using backbones filtering function
guerler Aug 30, 2017
de3bf8e
Merge branch 'dev' into ftp_uploader
guerler Sep 1, 2017
dc3218e
Fix ftp test
guerler Sep 5, 2017
5548638
Use lazy loader to handle uploader row construction
guerler Sep 6, 2017
4de5c95
Use limit loader
guerler Sep 6, 2017
5b16f09
Remove separate ftp tab
guerler Sep 6, 2017
45ec3a9
Put lazy loader into separate file for reusability
guerler Sep 6, 2017
9977d85
Add support to submit ftp files before queueing remaining files
guerler Sep 6, 2017
edd6bcb
Use consistent names
guerler Sep 6, 2017
7816b6b
Move render function
guerler Sep 6, 2017
f24fda5
Add collection listener to govern lazy loader
guerler Sep 6, 2017
33414be
Move ftp helper to separate function
guerler Sep 6, 2017
a7108b6
Add submission function using current format
guerler Sep 6, 2017
728087e
Merge remote-tracking branch 'jmchilton/multiple_files_per_upload' in…
guerler Oct 3, 2017
5c4ae1e
Specify file type and dbkey per entry
guerler Oct 3, 2017
833554a
Make sure that column count and lines are defined
guerler Oct 3, 2017
10196dd
Merge branch 'dev' into ftp_uploader
guerler Oct 4, 2017
6081c0b
Merge remote-tracking branch 'jmchilton/dev' into ftp_uploader
jmchilton Oct 9, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add listener to adjust start button activity
guerler committed Aug 28, 2017
commit e38ecb4b11f28840b51bee922a46dbbc4f764140
54 changes: 22 additions & 32 deletions client/galaxy/scripts/mvc/upload/ftp/ftp-view.js
Original file line number Diff line number Diff line change
@@ -71,47 +71,37 @@ function( Utils, Select, Ui, UploadModel, UploadFtp, UploadExtension ) {
placement : 'top'
});
}).on( 'mousedown', function( e ) { e.preventDefault() } );

// listen to changes in collection
this.listenTo( this.collection, 'add remove', this.render, this );
this.render();
},

/** Start upload process */
_eventStart: function() {
alert( 'Submit all ftp files' );
var self = this;
this.collection.each( function( model ) {
model.set( { 'genome' : self.select_genome.value(),
'extension': self.select_extension.value() } );
});
$.uploadpost({
url : this.app.options.nginx_upload_path,
data : this.app.toData( this.collection.filter() ),
success : function( message ) { self._eventSuccess( message ) },
error : function( message ) { self._eventError( message ) },
progress : function( percentage ) { self._eventProgress( percentage ) }
});
},

/** Set screen */
_updateScreen: function () {
var message = '';
if( this.counter.announce == 0 ) {
if (this.uploadbox.compatible()) {
message = ' ';
} else {
message = 'Browser does not support Drag & Drop. Try Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+.';
}
render: function () {
if ( this.collection.length > 0 ) {
this.btnStart.enable();
this.btnStart.$el.addClass( 'btn-primary' );
} else {
if ( this.counter.running == 0 ) {
message = 'You added ' + this.counter.announce + ' file(s) to the queue. Add more files or click \'Start\' to proceed.';
} else {
message = 'Please wait...' + this.counter.announce + ' out of ' + this.counter.running + ' remaining.';
}
this.btnStart.disable();
this.btnStart.$el.removeClass( 'btn-primary' );
}
this.$( '.upload-top-info' ).html( message );
var enable_reset = this.counter.running == 0 && this.counter.announce + this.counter.success + this.counter.error > 0;
var enable_start = this.counter.running == 0 && this.counter.announce > 0;
var enable_build = this.counter.running == 0 && this.counter.announce == 0 && this.counter.success > 0 && this.counter.error == 0
var enable_sources = this.counter.running == 0;
var show_table = this.counter.announce + this.counter.success + this.counter.error > 0;
this.btnReset[ enable_reset ? 'enable' : 'disable' ]();
this.btnStart[ enable_start ? 'enable' : 'disable' ]();
this.btnStart.$el[ enable_start ? 'addClass' : 'removeClass' ]( 'btn-primary' );
this.btnBuild[ enable_build ? 'enable' : 'disable' ]();
this.btnBuild.$el[ enable_build ? 'addClass' : 'removeClass' ]( 'btn-primary' );
this.btnStop[ this.counter.running > 0 ? 'enable' : 'disable' ]();
this.btnLocal[ enable_sources ? 'enable' : 'disable' ]();
this.btnFtp[ enable_sources ? 'enable' : 'disable' ]();
this.btnCreate[ enable_sources ? 'enable' : 'disable' ]();
this.btnFtp.$el[ this.ftp_upload_site ? 'show' : 'hide' ]();
this.$( '.upload-table' )[ show_table ? 'show' : 'hide' ]();
this.$( '.upload-helper' )[ show_table ? 'hide' : 'show' ]();
},

/** Template */
2 changes: 1 addition & 1 deletion static/maps/mvc/upload/ftp/ftp-view.js.map

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

12 changes: 6 additions & 6 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.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/mvc/upload/ftp/ftp-view.js

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