Add FastAPI+htmx review dashboard (port 8092, systemd service)
This commit is contained in:
60
dashboard/templates/index.html
Normal file
60
dashboard/templates/index.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>photo-pipeline dashboard</title>
|
||||
<script src="/static/htmx.min.js" defer></script>
|
||||
<style>
|
||||
:root { color-scheme: dark; }
|
||||
body { font-family: system-ui, sans-serif; margin: 0; background: #111; color: #eee; }
|
||||
header { padding: 1rem 1.5rem; border-bottom: 1px solid #333; display: flex; gap: 1.5rem; align-items: baseline; }
|
||||
header h1 { font-size: 1.2rem; margin: 0; }
|
||||
header a { color: #6cf; text-decoration: none; }
|
||||
main { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
|
||||
table { border-collapse: collapse; width: 100%; }
|
||||
th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid #222; }
|
||||
th { color: #999; font-size: .8rem; text-transform: uppercase; }
|
||||
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; }
|
||||
.badge.scanned { background: #333; }
|
||||
.badge.approved { background: #1d4; color: #031; }
|
||||
.badge.rejected { background: #d43; color: #fff; }
|
||||
.badge.review { background: #da4; color: #321; }
|
||||
.stat { font-size: 2rem; font-weight: 700; }
|
||||
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
|
||||
.card { background: #1a1a1a; border: 1px solid #333; border-radius: 8px; overflow: hidden; }
|
||||
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
|
||||
.card .meta { padding: .5rem; font-size: .75rem; color: #aaa; word-break: break-all; }
|
||||
.card .actions { display: flex; gap: .25rem; padding: .5rem; }
|
||||
.card button { flex: 1; border: 0; border-radius: 4px; padding: .4rem; cursor: pointer; font-size: .8rem; }
|
||||
.approve { background: #1d4; color: #031; }
|
||||
.reject { background: #d43; color: #fff; }
|
||||
.reset { background: #444; color: #eee; }
|
||||
.none { color: #666; font-style: italic; padding: 2rem; text-align: center; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>📸 photo-pipeline</h1>
|
||||
<a href="/">Overview</a>
|
||||
<a href="/review">Review queue</a>
|
||||
</header>
|
||||
<main>
|
||||
<h2>Library status</h2>
|
||||
<p class="stat">{{ total }}</p>
|
||||
<p>images fingerprinted</p>
|
||||
<table>
|
||||
<tr><th>Source</th><th>Status</th><th>Count</th></tr>
|
||||
{% for r in rows %}
|
||||
<tr>
|
||||
<td>{{ r["source"] }}</td>
|
||||
<td><span class="badge {{ r["status"] }}">{{ r["status"] }}</span></td>
|
||||
<td>{{ r["n"] }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="3" class="none">No images yet — run photo-ingest first</td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user