Skip to content

Commit

Permalink
Added format check for Docker settings
Browse files Browse the repository at this point in the history
  • Loading branch information
tblock79 committed Sep 23, 2023
1 parent 8df4562 commit 6449cae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0-beta.1
0.3.0-beta.2
2 changes: 1 addition & 1 deletion process/process_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ def decode_task_json(json_string: Optional[str]) -> Any:
try:
return json.loads(json_string)
except json.decoder.JSONDecodeError:
logger.error(f"Unable to convert JSON string {json_string}")
return {}

real_folder = folder


if helper.get_runner() == "docker":
# We want to bind the correct path into the processor, but if we're inside docker we need to use the host path
try:
Expand Down
12 changes: 12 additions & 0 deletions webinterface/templates/modules_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ <h1 class="title">Processing Modules - {{module_name}}</h1>
$('#settings').val("{}");
}
JSON.parse($('#settings').val());

field = "Other Docker Arguments";
field_value=$('#docker_arguments').val();
if (field_value == "") {
field_value="{}";
}
JSON.parse(field_value);
} catch (e) {
$('#erroralert').html('<i class="fas fa-bug"></i>&nbsp;&nbsp;Invalid content in field "' + field + '". Please check for correct syntax.');
$('#erroralert').show();
Expand All @@ -188,6 +195,11 @@ <h1 class="title">Processing Modules - {{module_name}}</h1>
$('#settings').addClass("is-danger");
$('#settings').focus();
}
if (field == "Other Docker Arguments")
{
$('#docker_arguments').addClass("is-danger");
$('#docker_arguments').focus();
}
return false;
}
console.log("PASSED");
Expand Down

0 comments on commit 6449cae

Please sign in to comment.