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

[bot] Merge 24.11 to develop #457

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading