Skip to content

Commit

Permalink
Merge 24.11 to develop
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-teamcity committed Nov 6, 2024
2 parents 6cdbf76 + 4a3e040 commit 43868b7
Show file tree
Hide file tree
Showing 11 changed files with 763 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nextflow/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import org.labkey.gradle.util.BuildUtils

plugins {
id 'org.labkey.build.module'
}

dependencies {
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: BuildUtils.getPlatformModuleProjectPath(project.gradle, "pipeline"), depProjectConfig: "published", depExtension: "module")
}

8 changes: 8 additions & 0 deletions nextflow/module.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ModuleClass: org.labkey.nextflow.NextFlowModule
Label: NextFlow module
Description: This module provides the functionality \
for running the NextFlow pipeline jobs on PanoramaWeb.
License: Apache 2.0
LicenseURL: http://www.apache.org/licenses/LICENSE-2.0
SupportedDatabases: pgsql
ManageVersion: false
17 changes: 17 additions & 0 deletions nextflow/resources/views/begin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<html>
<button id="enable-button">Enable/Disable Nextflow</button>
<button id="run-button">Nextflow Pipeline</button>
</html>

<script type = "text/javascript" nonce="<%=scriptNonce%>">

$(document).ready(function() {
$('#enable-button').click(function() {
window.location = LABKEY.ActionURL.buildURL('nextflow', 'nextFlowEnable.view');
});

$('#run-button').click(function() {
window.location = LABKEY.ActionURL.buildURL('nextflow', 'nextFlowRun.api');
});
})
</script>
88 changes: 88 additions & 0 deletions nextflow/resources/views/nextFlowConfiguration.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<table>
<tr>
<td class="labkey-form-label">NextFlow Config File Path</td>
<td><input type="text" name="nextFlowConfigFilePath" size=64></td>
</tr>
<tr>
<td class="labkey-form-label">AWS Account Name</td>
<td><input type="text" name="name" size=64></td>
</tr>
<tr>
<td class="labkey-form-label">AWS Identity</td>
<td><input type="text" name="identity" size=64></td>
</tr>
<tr>
<td class="labkey-form-label">AWS S3 Bucket Path</td>
<td><input type="text" name="s3BucketPath" size=64></td>
</tr>
<tr>
<td class="labkey-form-label">AWS Credential</td>
<td><input type="password" name="credential" size=64></td>
</tr>
</table>
<button id="submit-button">Submit</button>
<button id="delete-button">Delete</button>
<button id="cancel-button">Cancel</button>

<script type="text/javascript" nonce="<%=scriptNonce%>">
$(document).ready(function() {
// load the current configuration on page load
LABKEY.Ajax.request({
url: LABKEY.ActionURL.buildURL('nextflow', 'GetNextFlowConfiguration.api'),
method: 'GET',
success: function(response) {
const parsed = JSON.parse(response.responseText);
if (parsed.config) {
const response = parsed.config;
$('input[name=nextFlowConfigFilePath]').val(response.nextFlowConfigFilePath);
$('input[name=name]').val(response.accountName);
$('input[name=identity]').val(response.identity);
$('input[name=s3BucketPath]').val(response.s3BucketPath);
$('input[name=credential]').val(response.credential);
}

},
failure: function(response) {
alert('Failed to load configuration');
}
});

$('#submit-button').click(function() {
let data = {
nextFlowConfigFilePath: $('input[name=nextFlowConfigFilePath]').val(),
accountName: $('input[name=name]').val(),
identity: $('input[name=identity]').val(),
s3BucketPath: $('input[name=s3BucketPath]').val(),
credential: $('input[name=credential]').val()
};
LABKEY.Ajax.request({
url: LABKEY.ActionURL.buildURL('nextflow', 'nextFlowConfiguration.api'),
method: 'POST',
params: data,
success: function(response) {
window.location = LABKEY.ActionURL.buildURL('project', 'start');
},
failure: function(response) {
alert('Failed to save configuration');
}
});
});

$('#delete-button').click(function() {
LABKEY.Ajax.request({
url: LABKEY.ActionURL.buildURL('nextflow', 'DeleteNextFlowConfiguration.api'),
method: 'POST',
success: function(response) {
window.location = LABKEY.ActionURL.buildURL('project', 'start');
},
failure: function(response) {
alert('Failed to delete configuration');
}
});
});

$('#cancel-button').click(function() {
window.location = LABKEY.ActionURL.buildURL('project', 'start');
});
});
</script>
5 changes: 5 additions & 0 deletions nextflow/resources/views/nextFlowConfiguration.view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<view xmlns="http://labkey.org/data/xml/view" title="NextFlow Configuration">
<dependencies>
<dependency path="internal/jQuery"/>
</dependencies>
</view>
Loading

0 comments on commit 43868b7

Please sign in to comment.