Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/genepi/cloudgene into rel…
Browse files Browse the repository at this point in the history
…ease-2.5.6-tis
  • Loading branch information
abought committed Apr 6, 2023
2 parents f358107 + 6153fdd commit 368f031
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 457 deletions.
18 changes: 2 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>cloudgene</groupId>
<artifactId>cloudgene</artifactId>
<version>2.5.4</version>
<version>2.5.6</version>

<name>Cloudgene</name>
<url>http://www.cloudgene.io</url>
Expand Down Expand Up @@ -190,7 +190,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>3.0.9</version>
<version>3.0.17</version>
<type>pom</type>
</dependency>

Expand Down Expand Up @@ -267,13 +267,6 @@
<version>1.6.2</version>
</dependency>


<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>

<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
Expand Down Expand Up @@ -402,13 +395,6 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-sftp</artifactId>
<version>0.9.0</version>
<scope>test</scope>
</dependency>

</dependencies>

<!-- **** Build **** -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,10 @@
</div>

<div class="col-sm-7" {{data 'param'}} >
<select class="form-control folder-source" name="{{id}}-source">
<option value="upload" selected>File Upload</option>
<option value="http">URLs (HTTP)</option>
<option value="sftp">Secure File Transfer Protocol (SFTP)</option>
<option value="s3">S3 Bucket</option>
</select>
<div class="form-control file-list-control">
<ul class="fa-ul file-list">
</ul>
</div>
{{#is(source,'upload')}}
<button id="select-files-btn" type="button" class="btn btn-sm btn-secondary"><i class="fa fa-folder-open"></i> Select Files</button>
<button id="change-files-btn" type="button" class="btn btn-sm btn-secondary" style="display:none;"><i class="fa fa-folder-open"></i> Change</button>
<button id="remove-all-files-btn" type="button" class="btn btn-sm btn-secondary" style="display:none;"><i class="fa fa-trash"></i> Remove All</button>
Expand All @@ -26,22 +19,6 @@
style="display:none;" multiple
>
<small class="form-text text-muted">Multiple files can be selected by using the <span class="badge badge-secondary">ctrl</span> / <span class="badge badge-secondary">cmd</span> or <span class="badge badge-secondary">shift</span> keys.</small>
{{/is}}
{{#is(source,'http')}}
<button id="add-urls-btn" type="button" class="btn btn-sm btn-secondary"><i class="fas fa-link"></i> Add URLs</button>
<input name="{{id}}" id="{{id}}" type ="text" style="display:none;" class="form-control hidden-parameter" {{#is(required, true)}}required{{/is}} value="{{value}}">
{{/is}}
{{#is(source,'sftp')}}
<button id="add-sftp-files-btn" type="button" class="btn btn-sm btn-secondary"><i class="fas fa-upload"></i> Import Files</button>
<input name="{{id}}" id="{{id}}" type ="text" style="display:none;" class="form-control hidden-parameter" {{#is(required, true)}}required{{/is}} value="{{value}}">
{{/is}}
{{#is(source,'s3')}}
<button id="add-s3-btn" type="button" class="btn btn-sm btn-secondary"><i class="fas fa-cloud"></i> Add S3 bucket</button>
<input name="{{id}}" id="{{id}}" type ="text" style="display:none;" class="form-control hidden-parameter" {{#is(required, true)}}required{{/is}} value="{{value}}">
{{/is}}
{{#if(details)}}
<small class="form-text text-muted">{{details}}</small>
{{/if}}
<div class="invalid-feedback">
Please choose one or more files.
</div>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

207 changes: 3 additions & 204 deletions src/main/html/webapp/components/core/job/submit/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import ErrorPage from 'helpers/error-page';
import Application from 'models/application';

import template from './submit.stache';
import templateS3Dialog from './dialogs/s3.stache';
import templateHttpDialog from './dialogs/http.stache';
import templateSftpDialog from './dialogs/sftp.stache';
import templateUploadingDialog from './dialogs/uploading.stache';
import templateLabel from './controls/label.stache';
import templateSelect from './controls/select.stache';
Expand Down Expand Up @@ -143,9 +140,9 @@ export default Control.extend({

// custom file upload controls for single files

'.select-control change': function(){
this.application.updateBinding();
},
'.select-control change': function(){
this.application.updateBinding();
},

'#select-single-file-btn click': function(button) {
// trigger click to open file dialog
Expand Down Expand Up @@ -207,204 +204,6 @@ export default Control.extend({
fileUpload.parent().find("#select-files").show();
fileUpload.parent().find("#change-files").hide();
fileUpload.parent().find("#remove-all-files").hide();
},

// custom handler for import urls

'.folder-source change': function(source) {

//delete filelist
var parent = $(source).parent();

var fileList = $(parent).find(".file-list");
fileList.empty();

//update parameter source
var param = domData.get.call($(parent)[0], 'param');
param.attr('source', $(source).val());
},

'#add-urls-btn click': function(button) {

var parent = $(button).parent();

var fileList = $(parent).find(".file-list");
//fileList.empty();

var paramInputField = $(parent).find(".hidden-parameter");


var urlDialog = bootbox.confirm(
templateHttpDialog({
value: paramInputField.val()
}),
function(result) {
if (result) {
var urls = $('#urls').val();
$.ajax({
url: "api/v2/importer/files",
type: "POST",
data: {
input: urls
},
success: function(data) {

var arr = $.parseJSON(data);
fileList.empty();
$.each(arr, function(index, value) {
fileList.append('<li><span class="fa-li"><i class="fas fa-file"></i></span>' + value["text"].toString() + '</li>');
});

//update value
if (arr.length > 0) {
paramInputField.val(urls);
urlDialog.modal('hide');
} else {
paramInputField.val("");
bootbox.alert("Error: No valid files found on the provided urls.");
}

},
error: function(message) {
bootbox.alert("Error: " + message.responseText);
}
});

return false;
}
});
},

'#add-s3-btn click': function(button) {

var parent = $(button).parent();

var fileList = $(parent).find(".file-list");
//fileList.empty();

var paramInputField = $(parent).find(".hidden-parameter");

var urlDialog = bootbox.confirm(
templateS3Dialog(),
function(result) {
if (result) {
var buckets = $('#buckets').val();

var waitingDialog = bootbox.dialog({
close: false,
message: '<p><i class="fa fa-spin fa-spinner"></i> Connecting...</p>',
show: false
});

waitingDialog.on('shown.bs.modal', function() {

$.ajax({
url: "api/v2/importer/files",
type: "POST",
data: {
input: buckets
},

success: function(data) {

waitingDialog.modal('hide');

var arr = $.parseJSON(data);
fileList.empty();
$.each(arr, function(index, value) {
fileList.append('<li><span class="fa-li"><i class="fas fa-file"></i></span>' + value["text"].toString() + '</li>');
});

//update value
if (arr.length > 0) {
paramInputField.val(buckets);
urlDialog.modal('hide');
} else {
paramInputField.val("");
bootbox.alert('<p class="text-danger">Error: No valid files found on the provided urls. Please check your credentials and your file path.');
}

},
error: function(message) {
waitingDialog.modal('hide');
bootbox.alert('<p class="text-danger">Error: ' + message.responseText + '</p>');
}
});

});

waitingDialog.modal('show');

return false;
}
});
},

'#add-sftp-files-btn click': function(button) {

var parent = $(button).parent();

var fileList = $(parent).find(".file-list");
//fileList.empty();

var paramInputField = $(parent).find(".hidden-parameter");

var urlDialog = bootbox.confirm(
templateSftpDialog(),
function(result) {
if (result) {
var path = $('#path').val();
var username = $('#username').val();
var password = $('#password').val();

var waitingDialog = bootbox.dialog({
close: false,
message: '<p><i class="fa fa-spin fa-spinner"></i> Connecting...</p>',
show: false
});

waitingDialog.on('shown.bs.modal', function() {

$.ajax({
url: "api/v2/importer/files",
type: "POST",
data: {
input: path + ';' + username + ';' + password
},

success: function(data) {

waitingDialog.modal('hide');

var arr = $.parseJSON(data);
fileList.empty();
$.each(arr, function(index, value) {
fileList.append('<li><span class="fa-li"><i class="fas fa-file"></i></span>' + value["text"].toString() + '</li>');
});

//update value
if (arr.length > 0) {
paramInputField.val(path + ';' + username + ';' + password);
urlDialog.modal('hide');
} else {
paramInputField.val("");
bootbox.alert('<p class="text-danger">Error: No valid files found on the provided urls. Please check your credentials and your file path.');
}

},
error: function(message) {
waitingDialog.modal('hide');
bootbox.alert('<p class="text-danger">Error: ' + message.responseText + '</p>');
}
});

});

waitingDialog.modal('show');

return false;
}
});
}

});
2 changes: 1 addition & 1 deletion src/main/html/webapp/package-lock.json

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

2 changes: 1 addition & 1 deletion src/main/html/webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudgene",
"version": "2.5.4",
"version": "2.5.6",
"description": "Cloudgene web client",
"homepage": "http://www.cloudgene.io",
"author": "Lukas Forer <[email protected] (http://www.forer.it)",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cloudgene/mapred/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

public class Main {

public static final String VERSION = "2.5.4";
public static final String VERSION = "2.5.6";

private Database database;

Expand Down
Loading

0 comments on commit 368f031

Please sign in to comment.