106 lines
4.4 KiB
Plaintext
106 lines
4.4 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Ingest</title>
|
|
<link rel="stylesheet" href="/static/app.css">
|
|
</head>
|
|
<body>
|
|
<div class="app-shell" id="app-shell">
|
|
<aside class="sidebar">
|
|
<div class="sidebar-top">
|
|
<div class="sidebar-toggle" id="menu-toggle" aria-label="Toggle navigation" role="button" tabindex="0">
|
|
<span></span><span></span><span></span>
|
|
</div>
|
|
<div class="brand">Document Processor</div>
|
|
</div>
|
|
|
|
<div class="sidebar-section-title">Workspace</div>
|
|
<nav class="nav-list">
|
|
<a class="nav-link" href="/documents/" title="Documents"><span class="nav-link-short">D</span><span class="nav-link-text">Documents</span></a>
|
|
<a class="nav-link" href="/line-items/" title="Line Items"><span class="nav-link-short">L</span><span class="nav-link-text">Line Items</span></a>
|
|
<a class="nav-link" href="/queue/" title="Review Queue"><span class="nav-link-short">Q</span><span class="nav-link-text">Review Queue</span></a>
|
|
<a class="nav-link" href="/trash/" title="Trash"><span class="nav-link-short">T</span><span class="nav-link-text">Trash</span></a>
|
|
<a class="nav-link active" href="/ingest/" title="Ingest"><span class="nav-link-short">I</span><span class="nav-link-text">Ingest</span></a>
|
|
</nav>
|
|
</aside>
|
|
|
|
<main class="main">
|
|
<div class="topbar">
|
|
<div>
|
|
<h1 class="page-title">Ingest</h1>
|
|
<p class="page-subtitle">Upload files or ingest from server-side paths.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2 class="card-title">Upload files</h2>
|
|
<form method="post" action="/ingest/upload-files" enctype="multipart/form-data">
|
|
<div class="form-field full">
|
|
<label>Select file(s)</label>
|
|
<input type="file" name="uploaded_files" multiple required>
|
|
</div>
|
|
<div class="button-row" style="margin-top: 1rem;">
|
|
<button class="primary" type="submit">Upload and ingest</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2 class="card-title">Server-side ingest</h2>
|
|
|
|
<form method="post" action="/ingest/server-file" style="margin-bottom: 1.25rem;">
|
|
<div class="form-field full">
|
|
<label>Ingest one server file</label>
|
|
<input type="text" name="file_path" placeholder="/mnt/storage/.../file.pdf" required>
|
|
</div>
|
|
<div class="button-row" style="margin-top: 1rem;">
|
|
<button type="submit">Ingest file</button>
|
|
</div>
|
|
</form>
|
|
|
|
<form method="post" action="/ingest/server-directory" style="margin-bottom: 1.25rem;">
|
|
<div class="form-field full">
|
|
<label>Ingest one server directory</label>
|
|
<input type="text" name="directory_path" placeholder="/mnt/storage/.../incoming" required>
|
|
</div>
|
|
<div class="form-field">
|
|
<label><input type="checkbox" name="recursive" value="1"> Recursive</label>
|
|
</div>
|
|
<div class="button-row" style="margin-top: 1rem;">
|
|
<button type="submit">Ingest directory</button>
|
|
</div>
|
|
</form>
|
|
|
|
<form method="post" action="/ingest/inbox">
|
|
<div class="form-field full">
|
|
<label>Inbox root</label>
|
|
<input type="text" value="{{ inbox_root }}" readonly>
|
|
</div>
|
|
<div class="button-row" style="margin-top: 1rem;">
|
|
<button type="submit">Ingest inbox</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<script>
|
|
(function () {
|
|
const appShell = document.getElementById("app-shell");
|
|
const menuToggle = document.getElementById("menu-toggle");
|
|
if (!appShell || !menuToggle) return;
|
|
menuToggle.addEventListener("click", function () {
|
|
appShell.classList.toggle("nav-open");
|
|
});
|
|
menuToggle.addEventListener("keydown", function (e) {
|
|
if (e.key === "Enter" || e.key === " ") {
|
|
e.preventDefault();
|
|
appShell.classList.toggle("nav-open");
|
|
}
|
|
});
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|