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

Schema builder fixes #1950

Merged
merged 2 commits into from
Aug 24, 2023
Merged
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
36 changes: 17 additions & 19 deletions public_html/assets/js/nf-core-schema-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,25 +283,23 @@ $(function () {
$('.add-param-btn, .add-group-btn, .collapse-groups-btn, .expand-groups-btn, .to-top-btn').attr('disabled', true);
$('#schema-send-status').text('Saving schema..');
// wait a bit to allow any previous events to finish
setTimeout(function () {
post_data = {
post_content: 'json_schema',
version: 'web_builder',
status: 'web_builder_edited',
api: 'true',
cache_id: $('#schema_cache_id').text(),
schema: JSON.stringify(schema),
};
$.post('pipeline_schema_builder', post_data).done(function (returned_data) {
console.log('Sent schema to API. Response:', returned_data);
if (returned_data.status == 'recieved') {
// DO NOT FIX THIS TYPO. nf-core/tools will break.
$('#schema-send-status').text("Ok, that's it - done!");
} else {
$('#schema-send-status').text('Oops, something went wrong!');
}
});
}, 300);
post_data = {
post_content: 'json_schema',
version: 'web_builder',
status: 'web_builder_edited',
api: 'true',
cache_id: $('#schema_cache_id').text(),
schema: JSON.stringify(schema),
};
$.post('/pipeline_schema_builder', post_data).done(function (returned_data) {
console.log('Sent schema to API. Response:', returned_data);
if (returned_data.status == 'recieved') {
// DO NOT FIX THIS TYPO. nf-core/tools will break.
$('#schema-send-status').text("Ok, that's it - done!");
} else {
$('#schema-send-status').text('Oops, something went wrong!');
}
});
} else {
$('.add-param-btn, .add-group-btn, .collapse-groups-btn, .expand-groups-btn, .to-top-btn').attr(
'disabled',
Expand Down
Loading