mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-05 16:52:02 +00:00
🤖 format everything with pre-commit by <github-actions[bot]> (#2685)
Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ludy <Ludy87@users.noreply.github.com>
This commit is contained in:
parent
bf0958f588
commit
5605e4d3bb
@ -60,4 +60,4 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
volumes:
|
volumes:
|
||||||
- ./stirling/latest/data:/pgdata
|
- ./stirling/latest/data:/pgdata
|
||||||
|
@ -135,9 +135,10 @@ def compare_files(
|
|||||||
# elif "language.direction" in sort_ignore_translation[language]["missing"]:
|
# elif "language.direction" in sort_ignore_translation[language]["missing"]:
|
||||||
# sort_ignore_translation[language]["missing"].remove("language.direction")
|
# sort_ignore_translation[language]["missing"].remove("language.direction")
|
||||||
|
|
||||||
with open(default_file_path, encoding="utf-8") as default_file, open(
|
with (
|
||||||
file_path, encoding="utf-8"
|
open(default_file_path, encoding="utf-8") as default_file,
|
||||||
) as file:
|
open(file_path, encoding="utf-8") as file,
|
||||||
|
):
|
||||||
for _ in range(5):
|
for _ in range(5):
|
||||||
next(default_file)
|
next(default_file)
|
||||||
try:
|
try:
|
||||||
|
@ -23,12 +23,12 @@ public class InstallationPathConfig {
|
|||||||
private static final String PIPELINE_WATCHED_FOLDERS_PATH;
|
private static final String PIPELINE_WATCHED_FOLDERS_PATH;
|
||||||
private static final String PIPELINE_FINISHED_FOLDERS_PATH;
|
private static final String PIPELINE_FINISHED_FOLDERS_PATH;
|
||||||
private static final String PIPELINE_DEFAULT_WEB_UI_CONFIGS;
|
private static final String PIPELINE_DEFAULT_WEB_UI_CONFIGS;
|
||||||
|
|
||||||
// Custom file paths
|
// Custom file paths
|
||||||
private static final String STATIC_PATH;
|
private static final String STATIC_PATH;
|
||||||
private static final String TEMPLATES_PATH;
|
private static final String TEMPLATES_PATH;
|
||||||
private static final String SIGNATURES_PATH;
|
private static final String SIGNATURES_PATH;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
BASE_PATH = initializeBasePath();
|
BASE_PATH = initializeBasePath();
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ public class InstallationPathConfig {
|
|||||||
PIPELINE_WATCHED_FOLDERS_PATH = PIPELINE_PATH + "watchedFolders" + File.separator;
|
PIPELINE_WATCHED_FOLDERS_PATH = PIPELINE_PATH + "watchedFolders" + File.separator;
|
||||||
PIPELINE_FINISHED_FOLDERS_PATH = PIPELINE_PATH + "finishedFolders" + File.separator;
|
PIPELINE_FINISHED_FOLDERS_PATH = PIPELINE_PATH + "finishedFolders" + File.separator;
|
||||||
PIPELINE_DEFAULT_WEB_UI_CONFIGS = PIPELINE_PATH + "defaultWebUIConfigs" + File.separator;
|
PIPELINE_DEFAULT_WEB_UI_CONFIGS = PIPELINE_PATH + "defaultWebUIConfigs" + File.separator;
|
||||||
|
|
||||||
// Initialize custom file paths
|
// Initialize custom file paths
|
||||||
STATIC_PATH = CUSTOM_FILES_PATH + "static" + File.separator;
|
STATIC_PATH = CUSTOM_FILES_PATH + "static" + File.separator;
|
||||||
TEMPLATES_PATH = CUSTOM_FILES_PATH + "templates" + File.separator;
|
TEMPLATES_PATH = CUSTOM_FILES_PATH + "templates" + File.separator;
|
||||||
@ -123,7 +123,7 @@ public class InstallationPathConfig {
|
|||||||
public static String getPipelineDefaultWebUIConfigsDir() {
|
public static String getPipelineDefaultWebUIConfigsDir() {
|
||||||
return PIPELINE_DEFAULT_WEB_UI_CONFIGS;
|
return PIPELINE_DEFAULT_WEB_UI_CONFIGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getStaticPath() {
|
public static String getStaticPath() {
|
||||||
return STATIC_PATH;
|
return STATIC_PATH;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ import stirling.software.SPDF.model.provider.UnsupportedProviderException;
|
|||||||
public class DatabaseConfig {
|
public class DatabaseConfig {
|
||||||
|
|
||||||
public final String DATASOURCE_DEFAULT_URL;
|
public final String DATASOURCE_DEFAULT_URL;
|
||||||
|
|
||||||
public static final String DATASOURCE_URL_TEMPLATE = "jdbc:%s://%s:%4d/%s";
|
public static final String DATASOURCE_URL_TEMPLATE = "jdbc:%s://%s:%4d/%s";
|
||||||
public static final String DEFAULT_DRIVER = "org.h2.Driver";
|
public static final String DEFAULT_DRIVER = "org.h2.Driver";
|
||||||
public static final String DEFAULT_USERNAME = "sa";
|
public static final String DEFAULT_USERNAME = "sa";
|
||||||
|
@ -222,30 +222,30 @@ document.getElementById('deletePipelineBtn').addEventListener('click', function(
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
let pipelineName = document.getElementById('pipelineName').value;
|
let pipelineName = document.getElementById('pipelineName').value;
|
||||||
|
|
||||||
if (confirm(deletePipelineText + pipelineName)) {
|
if (confirm(deletePipelineText + pipelineName)) {
|
||||||
removePipelineFromUI(pipelineName);
|
removePipelineFromUI(pipelineName);
|
||||||
let key = "#Pipeline-" + pipelineName;
|
let key = "#Pipeline-" + pipelineName;
|
||||||
if (localStorage.getItem(key)) {
|
if (localStorage.getItem(key)) {
|
||||||
localStorage.removeItem(key);
|
localStorage.removeItem(key);
|
||||||
}
|
}
|
||||||
let pipelineSelect = document.getElementById("pipelineSelect");
|
let pipelineSelect = document.getElementById("pipelineSelect");
|
||||||
let modal = document.getElementById('pipelineSettingsModal');
|
let modal = document.getElementById('pipelineSettingsModal');
|
||||||
if (modal.style.display !== 'none') {
|
if (modal.style.display !== 'none') {
|
||||||
$('#pipelineSettingsModal').modal('hide');
|
$('#pipelineSettingsModal').modal('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pipelineSelect.options.length > 0) {
|
if (pipelineSelect.options.length > 0) {
|
||||||
pipelineSelect.selectedIndex = 0;
|
pipelineSelect.selectedIndex = 0;
|
||||||
pipelineSelect.dispatchEvent(new Event('change'));
|
pipelineSelect.dispatchEvent(new Event('change'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function removePipelineFromUI(pipelineName) {
|
function removePipelineFromUI(pipelineName) {
|
||||||
let pipelineSelect = document.getElementById("pipelineSelect");
|
let pipelineSelect = document.getElementById("pipelineSelect");
|
||||||
for (let i = 0; i < pipelineSelect.options.length; i++) {
|
for (let i = 0; i < pipelineSelect.options.length; i++) {
|
||||||
console.log(pipelineSelect.options[i])
|
console.log(pipelineSelect.options[i])
|
||||||
console.log("list " + pipelineSelect.options[i].innerText + " vs " + pipelineName)
|
console.log("list " + pipelineSelect.options[i].innerText + " vs " + pipelineName)
|
||||||
if (pipelineSelect.options[i].innerText === pipelineName) {
|
if (pipelineSelect.options[i].innerText === pipelineName) {
|
||||||
pipelineSelect.remove(i);
|
pipelineSelect.remove(i);
|
||||||
break;
|
break;
|
||||||
@ -414,22 +414,22 @@ document.getElementById("addOperationBtn").addEventListener("click", function ()
|
|||||||
parameterInput.type = "checkbox";
|
parameterInput.type = "checkbox";
|
||||||
if (defaultValue === true) parameterInput.checked = true;
|
if (defaultValue === true) parameterInput.checked = true;
|
||||||
break;
|
break;
|
||||||
case "array":
|
case "array":
|
||||||
// If parameter.schema.format === 'binary' is to be checked, it should be checked here
|
// If parameter.schema.format === 'binary' is to be checked, it should be checked here
|
||||||
parameterInput = document.createElement("textarea");
|
parameterInput = document.createElement("textarea");
|
||||||
parameterInput.placeholder = 'Enter a JSON formatted array, e.g., ["item1", "item2", "item3"]';
|
parameterInput.placeholder = 'Enter a JSON formatted array, e.g., ["item1", "item2", "item3"]';
|
||||||
parameterInput.className = "form-control";
|
parameterInput.className = "form-control";
|
||||||
break;
|
break;
|
||||||
case "object":
|
case "object":
|
||||||
parameterInput = document.createElement("textarea");
|
parameterInput = document.createElement("textarea");
|
||||||
parameterInput.placeholder = 'Enter a JSON formatted object, e.g., {"key": "value"} If this is a fileInput, it is not currently supported';
|
parameterInput.placeholder = 'Enter a JSON formatted object, e.g., {"key": "value"} If this is a fileInput, it is not currently supported';
|
||||||
parameterInput.className = "form-control";
|
parameterInput.className = "form-control";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
parameterInput = document.createElement("input");
|
parameterInput = document.createElement("input");
|
||||||
parameterInput.type = "text";
|
parameterInput.type = "text";
|
||||||
parameterInput.className = "form-control";
|
parameterInput.className = "form-control";
|
||||||
if (defaultValue !== undefined) parameterInput.value = defaultValue;
|
if (defaultValue !== undefined) parameterInput.value = defaultValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parameterInput.id = parameter.name;
|
parameterInput.id = parameter.name;
|
||||||
@ -481,21 +481,21 @@ document.getElementById("addOperationBtn").addEventListener("click", function ()
|
|||||||
break;
|
break;
|
||||||
case "array":
|
case "array":
|
||||||
case "object":
|
case "object":
|
||||||
if (value === null || value === "") {
|
if (value === null || value === "") {
|
||||||
settings[parameter.name] = "";
|
settings[parameter.name] = "";
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const parsedValue = JSON.parse(value);
|
const parsedValue = JSON.parse(value);
|
||||||
if (Array.isArray(parsedValue)) {
|
if (Array.isArray(parsedValue)) {
|
||||||
settings[parameter.name] = parsedValue;
|
settings[parameter.name] = parsedValue;
|
||||||
} else {
|
} else {
|
||||||
settings[parameter.name] = value;
|
settings[parameter.name] = value;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
settings[parameter.name] = value;
|
settings[parameter.name] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
settings[parameter.name] = value;
|
settings[parameter.name] = value;
|
||||||
}
|
}
|
||||||
@ -686,13 +686,13 @@ async function processPipelineConfig(configString) {
|
|||||||
case "text":
|
case "text":
|
||||||
case "textarea":
|
case "textarea":
|
||||||
default:
|
default:
|
||||||
var value = operationConfig.parameters[parameterName]
|
var value = operationConfig.parameters[parameterName]
|
||||||
if (typeof value !== 'string') {
|
if (typeof value !== 'string') {
|
||||||
input.value = JSON.stringify(value) ;
|
input.value = JSON.stringify(value) ;
|
||||||
} else {
|
} else {
|
||||||
input.value = value;
|
input.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user