feat: add Jinja2 admin UI templates

This commit is contained in:
2026-05-15 00:19:50 +03:00
parent eabeb54767
commit 04f152a873
6 changed files with 235 additions and 6 deletions
+40 -1
View File
@@ -1 +1,40 @@
{% extends "base.html" %}{% block content %}logs{% endblock %}
{% extends "base.html" %}
{% block content %}
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:16px;">
<h1>Export Logs &#8212; {{ config.name }}</h1>
<a href="/configs/{{ config.id }}" class="btn" style="background:#6b7280;color:#fff;">&#8592; Back</a>
</div>
{% if logs %}
<table>
<thead>
<tr>
<th>Time</th>
<th>Status</th>
<th>Nodes</th>
<th>Error</th>
</tr>
</thead>
<tbody>
{% for log in logs %}
<tr>
<td>{{ log.fetched_at.strftime('%Y-%m-%d %H:%M:%S') }}</td>
<td>
{% if log.success %}
<span class="success">&#10003; OK</span>
{% else %}
<span class="error">&#10007; Failed</span>
{% endif %}
</td>
<td>{{ log.node_count }}</td>
<td style="font-size:.8rem;color:#666;">{{ log.error_message or '' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="card">
<p style="color:#666;text-align:center;">No export logs yet.</p>
</div>
{% endif %}
{% endblock %}