Merge branch 'pipeline' of git@github.com:Frooodle/Stirling-PDF.git into
pipeline
This commit is contained in:
parent
f313857f96
commit
c81c1006b7
2 changed files with 94 additions and 109 deletions
|
@ -119,7 +119,7 @@ public class Controller {
|
||||||
outputFileName = outputFileName.replace("{date}", LocalDate.now().format(dateFormatter));
|
outputFileName = outputFileName.replace("{date}", LocalDate.now().format(dateFormatter));
|
||||||
DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("HHmmss");
|
DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("HHmmss");
|
||||||
outputFileName = outputFileName.replace("{time}", LocalTime.now().format(timeFormatter));
|
outputFileName = outputFileName.replace("{time}", LocalTime.now().format(timeFormatter));
|
||||||
// ... Replace other placeholders
|
// {filename} {folder} {date} {tmime} {pipeline}
|
||||||
|
|
||||||
Files.move(resource.getFile().toPath(), Paths.get(config.getOutputDir(), outputFileName));
|
Files.move(resource.getFile().toPath(), Paths.get(config.getOutputDir(), outputFileName));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,123 +5,108 @@
|
||||||
|
|
||||||
<th:block th:insert="~{fragments/common :: head(title=#{merge.title})}"></th:block>
|
<th:block th:insert="~{fragments/common :: head(title=#{merge.title})}"></th:block>
|
||||||
<body>
|
<body>
|
||||||
<style>
|
<div id="page-container">
|
||||||
.modal {
|
<div id="content-wrap">
|
||||||
display: none; /* Hidden by default */
|
<div th:insert="~{fragments/navbar.html :: navbar}"></div>
|
||||||
position: fixed; /* Stay in place */
|
<br> <br>
|
||||||
z-index: 1; /* Sit on top */
|
<div class="container" id="dropContainer">
|
||||||
padding-top: 100px; /* Location of the box */
|
<div class="row justify-content-center">
|
||||||
left: 0;
|
<div class="col-md-6">
|
||||||
top: 0;
|
|
||||||
width: 100%; /* Full width */
|
|
||||||
height: 100%; /* Full height */
|
|
||||||
overflow: auto; /* Enable scroll if needed */
|
|
||||||
background-color: rgb(0, 0, 0); /* Fallback color */
|
|
||||||
background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Modal Content */
|
<div class="mb-3">
|
||||||
.modal-content {
|
<button id="savePipelineBtn" class="btn btn-success">Save
|
||||||
background-color: #fefefe;
|
Pipeline Configuration</button>
|
||||||
margin: auto;
|
|
||||||
padding: 20px;
|
|
||||||
border: 1px solid #888;
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-margin {
|
<button id="validateButton" class="btn btn-success">Validate</button>
|
||||||
margin-right: 2px;
|
<div class="btn-group">
|
||||||
}
|
<button id="uploadPipelineBtn" class="btn btn-primary">Upload
|
||||||
|
Pipeline Configuration</button>
|
||||||
|
<input type="file" id="uploadPipelineInput" accept=".json"
|
||||||
|
style="display: none;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
.modal-body {
|
<div id="pipelineContainer" class="card">
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div id="page-container">
|
<!-- Pipeline Configuration Card Header -->
|
||||||
<div id="content-wrap">
|
<div class="card-header">
|
||||||
<div th:insert="~{fragments/navbar.html :: navbar}"></div>
|
<h2 class="card-title">Pipeline Configuration</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container" id="dropContainer">
|
<!-- Pipeline Configuration Body -->
|
||||||
<div class="row justify-content-center">
|
<div class="card-body">
|
||||||
<div class="col-md-6">
|
<div class="mb-3">
|
||||||
|
<select id="operationsDropdown" class="form-select">
|
||||||
|
<!-- Options will be dynamically populated here -->
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<button id="addOperationBtn" class="btn btn-primary">Add
|
||||||
|
operation to pipeline</button>
|
||||||
|
</div>
|
||||||
|
<h3>Pipeline:</h3>
|
||||||
|
<ol id="pipelineList" class="list-group">
|
||||||
|
<!-- Pipeline operations will be dynamically populated here -->
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Homepage -->
|
<input type="file" id="fileInput" multiple>
|
||||||
<div class="mb-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Pipelines</label>
|
|
||||||
<select class="form-control" name="Pipelines">
|
|
||||||
<option value="example">example</option>
|
|
||||||
<option value="Pipelines2">example2</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<button id="customizeBtn" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#pipelineModal">Customize</button>
|
|
||||||
<button id="addNewPipelineBtn" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#pipelineModal">Add New Pipeline</button>
|
|
||||||
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
|
|
||||||
<button class="btn btn-primary" id="submitBtn">Submit</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Pipeline Modal -->
|
<button class="btn btn-primary" id="submitConfigBtn">Submit</button>
|
||||||
<div id="pipelineModal" class="modal fade" tabindex="-1" aria-labelledby="pipelineModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-xl">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h2 class="modal-title">Pipeline Configuration</h2>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
|
||||||
<!-- Buttons -->
|
|
||||||
<div class="mb-3">
|
|
||||||
<button id="savePipelineBtn" class="btn btn-success">Save Configuration</button>
|
|
||||||
<button id="validateButton" class="btn btn-success">Validate</button>
|
|
||||||
<div class="btn-group">
|
|
||||||
<button id="uploadPipelineBtn" class="btn btn-primary">Upload Configuration</button>
|
|
||||||
<input type="file" id="uploadPipelineInput" accept=".json" style="display: none;">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Operations dropdown and Add operation button -->
|
</div>
|
||||||
<div class="mb-3">
|
|
||||||
<select id="operationsDropdown" class="form-select">
|
|
||||||
<!-- Options will be dynamically populated here -->
|
|
||||||
</select>
|
|
||||||
<button id="addOperationBtn" class="btn btn-primary">Add operation to pipeline</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Pipeline operations list -->
|
<!-- pipelineSettings modal -->
|
||||||
<h3>Pipeline:</h3>
|
<div id="pipelineSettingsModal" class="modal">
|
||||||
<ol id="pipelineList" class="list-group">
|
<div class="modal-content">
|
||||||
<!-- Pipeline operations will be dynamically populated here -->
|
<div class="modal-body">
|
||||||
</ol>
|
<span class="close">×</span>
|
||||||
</div>
|
<h2>Operation Settings</h2>
|
||||||
|
<div id="pipelineSettingsContent">
|
||||||
|
<!-- pipelineSettings will be dynamically populated here -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="js/pipeline.js"></script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<style>
|
||||||
|
.modal {
|
||||||
|
display: none; /* Hidden by default */
|
||||||
|
position: fixed; /* Stay in place */
|
||||||
|
z-index: 1; /* Sit on top */
|
||||||
|
padding-top: 100px; /* Location of the box */
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%; /* Full width */
|
||||||
|
height: 100%; /* Full height */
|
||||||
|
overflow: auto; /* Enable scroll if needed */
|
||||||
|
background-color: rgb(0, 0, 0); /* Fallback color */
|
||||||
|
background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
|
||||||
|
}
|
||||||
|
|
||||||
<div class="modal-footer">
|
/* Modal Content */
|
||||||
<button class="btn btn-primary" id="submitConfigBtn">Submit</button>
|
.modal-content {
|
||||||
</div>
|
background-color: #fefefe;
|
||||||
</div>
|
margin: auto;
|
||||||
</div>
|
padding: 20px;
|
||||||
</div>
|
border: 1px solid #888;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
<!-- pipelineSettings modal -->
|
.btn-margin {
|
||||||
<div id="pipelineSettingsModal" class="modal">
|
margin-right: 2px;
|
||||||
<div class="modal-content">
|
}
|
||||||
<div class="modal-body">
|
|
||||||
<span class="close">×</span>
|
|
||||||
<h2>Operation Settings</h2>
|
|
||||||
<div id="pipelineSettingsContent">
|
|
||||||
<!-- pipelineSettings will be dynamically populated here -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="js/pipeline.js"></script>
|
.modal-body {
|
||||||
</div>
|
display: flex;
|
||||||
</div>
|
flex-direction: column;
|
||||||
</div>
|
}
|
||||||
</div>
|
</style>
|
||||||
<div th:insert="~{fragments/footer.html :: footer}"></div>
|
<div th:insert="~{fragments/footer.html :: footer}"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue