2023-07-12 01:17:44 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html th:lang="${#locale.toString()}"
|
|
|
|
th:lang-direction="#{language.direction}"
|
|
|
|
xmlns:th="http://www.thymeleaf.org">
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-07-15 17:06:33 +02:00
|
|
|
<th:block
|
2024-01-02 00:37:20 +01:00
|
|
|
th:insert="~{fragments/common :: head(title=#{pipeline.title}, header=#{pipeline.header})}"></th:block>
|
2023-07-15 17:06:33 +02:00
|
|
|
<style>
|
|
|
|
.btn-margin {
|
|
|
|
margin-right: 2px;
|
|
|
|
}
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
.bordered-box {
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
padding: 20px;
|
|
|
|
margin: 20px;
|
|
|
|
width: 70%;
|
|
|
|
}
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
.center-element {
|
|
|
|
width: 80%;
|
|
|
|
text-align: center;
|
|
|
|
margin: auto;
|
|
|
|
}
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
.element-margin {
|
|
|
|
margin: 10px 0;
|
|
|
|
/* Adjust this value to increase/decrease the margin as needed */
|
|
|
|
}
|
2023-07-15 17:06:33 +02:00
|
|
|
</style>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2024-01-01 15:19:22 +01:00
|
|
|
<script th:inline="javascript">
|
|
|
|
const saveSettings = /*[[#{pipelineOptions.saveSettings}]]*/ '';
|
|
|
|
</script>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-07-12 01:17:44 +02:00
|
|
|
<body>
|
|
|
|
<div id="page-container">
|
|
|
|
<div id="content-wrap">
|
|
|
|
<div th:insert="~{fragments/navbar.html :: navbar}"></div>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-07-12 01:17:44 +02:00
|
|
|
<br> <br>
|
2023-07-15 17:06:33 +02:00
|
|
|
<div class="container">
|
2023-07-12 01:17:44 +02:00
|
|
|
<div class="row justify-content-center">
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 17:01:27 +01:00
|
|
|
<h1 th:text="#{pipeline.header}"></h1>
|
|
|
|
<h2 th:text="#{WorkInProgess}"> </h2>
|
2023-12-31 14:28:18 +01:00
|
|
|
<div class="bordered-box">
|
|
|
|
<div class="text-end text-top">
|
2023-12-31 17:01:27 +01:00
|
|
|
<button id="uploadPipelineBtn" class="btn btn-primary"
|
|
|
|
th:text="#{pipeline.uploadButton}"></button>
|
2023-12-31 14:28:18 +01:00
|
|
|
<button type="button" class="btn btn-primary"
|
2023-12-31 17:01:27 +01:00
|
|
|
data-bs-toggle="modal" data-bs-target="#pipelineSettingsModal"
|
|
|
|
th:text="#{pipeline.configureButton}"></button>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
</div>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<div class="center-element">
|
|
|
|
<div class="element-margin">
|
|
|
|
<select id="pipelineSelect" class="custom-select">
|
|
|
|
<option
|
|
|
|
value="{"name":"Custom","pipeline":[],"_examples":{"outputDir":"{outputFolder}/{folderName}","outputFileName":"{filename}-{pipelineName}-{date}-{time}"},"outputDir":"{outputFolder}","outputFileName":"{filename}"}"
|
2023-12-31 17:01:27 +01:00
|
|
|
th:text="#{pipeline.defaultOption}"></option>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<th:block th:each="config : ${pipelineConfigsWithNames}">
|
|
|
|
<option th:value="${config.json}" th:text="${config.name}"></option>
|
|
|
|
</th:block>
|
|
|
|
</select>
|
2023-07-15 17:06:33 +02:00
|
|
|
</div>
|
2023-12-31 14:28:18 +01:00
|
|
|
<div class="element-margin">
|
|
|
|
<div
|
|
|
|
th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=true)}"></div>
|
|
|
|
</div>
|
|
|
|
<div class="element-margin">
|
2023-12-31 17:01:27 +01:00
|
|
|
<button class="btn btn-primary" id="submitConfigBtn"
|
|
|
|
th:text="#{pipeline.submitButton}"></button>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
|
|
|
|
2024-01-05 19:00:30 +01:00
|
|
|
<p>Below info is Alpha only, will be removed and hence not translated</p>
|
2023-12-23 16:47:18 +01:00
|
|
|
<h3>Current Limitations</h3>
|
|
|
|
<ul>
|
2023-12-31 14:28:18 +01:00
|
|
|
<li>Cannot have more than one of the same operation</li>
|
|
|
|
<li>Cannot input additional files via UI</li>
|
|
|
|
<li>All files and operations run in serial mode</li>
|
2023-12-23 16:47:18 +01:00
|
|
|
</ul>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-23 16:47:18 +01:00
|
|
|
<h3>How it Works Notes</h3>
|
|
|
|
<ul>
|
2023-12-31 14:28:18 +01:00
|
|
|
<li>Configure the pipeline config file and input files to run
|
|
|
|
files against it</li>
|
|
|
|
<li>For reuse, download the config file and re-upload it when
|
|
|
|
needed, or place it in /pipeline/defaultWebUIConfigs/ to
|
|
|
|
auto-load in the web UI for all users</li>
|
2023-12-23 16:47:18 +01:00
|
|
|
</ul>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-27 16:18:26 +01:00
|
|
|
<h3>How to use pre-load configs in web UI</h3>
|
2023-12-27 01:53:31 +01:00
|
|
|
<ul>
|
2023-12-31 14:28:18 +01:00
|
|
|
<li>Download config files</li>
|
|
|
|
<li>For reuse, download the config file and re-upload it when
|
|
|
|
needed, or place it in /pipeline/defaultWebUIConfigs/ to
|
|
|
|
auto-load in the web UI for all users</li>
|
2023-12-27 01:53:31 +01:00
|
|
|
</ul>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-25 19:52:11 +01:00
|
|
|
<h3>Todo</h3>
|
|
|
|
<ul>
|
2023-12-31 15:56:08 +01:00
|
|
|
<li>Save to browser/Account</li>
|
2024-01-05 19:00:30 +01:00
|
|
|
<li>offline folder scan mode checks and testing for unique usecases</li>
|
2023-12-31 14:28:18 +01:00
|
|
|
<li>Improve operation config settings UI</li>
|
2023-12-25 19:52:11 +01:00
|
|
|
</ul>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<h2>User Guide for Local Directory Scanning and File
|
|
|
|
Processing</h2>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<h3>Setting Up Watched Folders:</h3>
|
|
|
|
<p>Create a folder where you want your files to be monitored.
|
|
|
|
This is your 'watched folder'.</p>
|
|
|
|
<p>
|
|
|
|
The default directory for this is
|
|
|
|
<code>./pipeline/watchedFolders/</code>
|
|
|
|
</p>
|
|
|
|
<p>Place any directories you want to be scanned into this
|
|
|
|
folder, this folder should contain multiple folders each for their
|
|
|
|
own tasks and pipelines.</p>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<h3>Configuring Processing with JSON Files:</h3>
|
|
|
|
<p>
|
|
|
|
In each directory you want processed (e.g
|
|
|
|
<code>./pipeline/watchedFolders/officePrinter</code>
|
|
|
|
), include a JSON configuration file.
|
|
|
|
</p>
|
|
|
|
<p>This JSON file should specify how you want the files in the
|
|
|
|
directory to be handled (e.g., what operations to perform on them)
|
|
|
|
which can be made, configured and downloaded from Stirling-PDF
|
|
|
|
Pipeline interface.</p>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<h3>Automatic Scanning and Processing:</h3>
|
|
|
|
<p>The system automatically checks the watched folder every
|
|
|
|
minute for new directories and files to process.</p>
|
|
|
|
<p>When a directory with a valid JSON configuration file is
|
|
|
|
found, it begins processing the files inside as per the
|
|
|
|
configuration.</p>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<h3>Processing Steps:</h3>
|
|
|
|
<p>Files in each directory are processed according to the
|
|
|
|
instructions in the JSON file.</p>
|
|
|
|
<p>This might involve file conversions, data filtering,
|
|
|
|
renaming files, etc. If the output of a step is a zip, this zip
|
|
|
|
will be automatically unzipped as it passes to next process.</p>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<h3>Results and Output:</h3>
|
|
|
|
<p>
|
|
|
|
After processing, the results are saved in a specified output
|
|
|
|
location. This could be a different folder or location as defined
|
|
|
|
in the JSON file or the default location
|
|
|
|
<code>./pipeline/finishedFolders/</code>
|
|
|
|
.
|
|
|
|
</p>
|
|
|
|
<p>Each processed file is named and organized according to the
|
|
|
|
rules set in the JSON configuration.</p>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<h3>Completion and Cleanup:</h3>
|
|
|
|
<p>Once processing is complete, the original files in the
|
|
|
|
watched folder's directory are removed.</p>
|
|
|
|
<p>You can find the processed files in the designated output
|
|
|
|
location.</p>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<h3>Error Handling:</h3>
|
|
|
|
<p>If there's an error during processing, the system will not
|
|
|
|
delete the original files, allowing you to check and retry if
|
|
|
|
necessary.</p>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<h3>User Interaction:</h3>
|
|
|
|
<p>As a user, your main tasks are to set up the watched
|
|
|
|
folders, place directories with files for processing, and create
|
|
|
|
the corresponding JSON configuration files.</p>
|
|
|
|
<p>The system handles the rest, including scanning, processing,
|
|
|
|
and outputting results.</p>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<!-- The Modal -->
|
|
|
|
<div class="modal" id="pipelineSettingsModal">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content dark-card">
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<!-- Modal Header -->
|
|
|
|
<div class="modal-header">
|
2023-12-31 17:01:27 +01:00
|
|
|
<h2 class="modal-title" th:text="#{pipelineOptions.header}"></h2>
|
2023-12-31 14:28:18 +01:00
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal"
|
|
|
|
aria-label="Close"></button>
|
|
|
|
</div>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<!-- Modal body -->
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="mb-3">
|
2023-12-31 17:01:27 +01:00
|
|
|
<label for="pipelineName" class="form-label"
|
|
|
|
th:text="#{pipelineOptions.pipelineNameLabel}"></label> <input
|
|
|
|
type="text" id="pipelineName" class="form-control"
|
2024-01-01 15:19:22 +01:00
|
|
|
th:placeholder="#{pipelineOptions.pipelineNamePrompt}">
|
2023-12-31 14:28:18 +01:00
|
|
|
</div>
|
|
|
|
<div class="mb-3">
|
2024-01-05 19:00:30 +01:00
|
|
|
<label for="operationsDropdown" th:text="#{pipelineOptions.selectOperation}"></label>
|
2023-12-31 14:28:18 +01:00
|
|
|
<select id="operationsDropdown" class="form-select">
|
|
|
|
<!-- Options will be dynamically populated here -->
|
|
|
|
</select>
|
2023-07-15 17:06:33 +02:00
|
|
|
</div>
|
2023-12-31 14:28:18 +01:00
|
|
|
<div class="mb-3">
|
2023-12-31 17:01:27 +01:00
|
|
|
<button id="addOperationBtn" class="btn btn-primary"
|
|
|
|
th:text="#{pipelineOptions.addOperationButton}"></button>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
</div>
|
2023-12-31 17:01:27 +01:00
|
|
|
<h3 id="pipelineHeader" style="display: none;"
|
|
|
|
th:text="#{pipelineOptions.pipelineHeader}"></h3>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<ol id="pipelineList" class="list-group">
|
|
|
|
<!-- Pipeline operations will be dynamically populated here -->
|
|
|
|
</ol>
|
|
|
|
<div id="pipelineSettingsContent">
|
|
|
|
<!-- pipelineSettings will be dynamically populated here -->
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<!-- Modal footer -->
|
|
|
|
<div class="modal-footer">
|
2023-12-31 17:01:27 +01:00
|
|
|
<button id="savePipelineBtn" class="btn btn-success"
|
|
|
|
th:text="#{pipelineOptions.saveButton}"></button>
|
|
|
|
<button id="validateButton" class="btn btn-success"
|
|
|
|
th:text="#{pipelineOptions.validateButton}"></button>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<div class="btn-group">
|
|
|
|
<input type="file" id="uploadPipelineInput" accept=".json"
|
|
|
|
style="display: none;">
|
|
|
|
</div>
|
2023-07-15 17:06:33 +02:00
|
|
|
</div>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-07-15 17:06:33 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-12-31 14:28:18 +01:00
|
|
|
</div>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
<script src="js/pipeline.js"></script>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-12-31 14:28:18 +01:00
|
|
|
</div>
|
2023-07-12 01:17:44 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-07-12 01:17:44 +02:00
|
|
|
<div th:insert="~{fragments/footer.html :: footer}"></div>
|
|
|
|
</div>
|
2024-02-11 17:47:00 +01:00
|
|
|
|
2023-07-12 01:17:44 +02:00
|
|
|
</body>
|
2024-02-11 18:14:21 +01:00
|
|
|
</html>
|