feat: restyle admin UI and add per-user sync run history

Adds a self-hosted stylesheet (no CDN dependencies) with a card-based
dashboard and color-coded status badges, and shows the last 10 sync
runs per user on the detail page.
This commit is contained in:
Bastian Wagner
2026-08-15 20:19:31 +02:00
parent 990a55af14
commit 85b0d861b4
13 changed files with 597 additions and 126 deletions

View File

@@ -1,17 +1,45 @@
<ul>
{% for outcome in outcomes %}
<li>
User {{ outcome.user_id if outcome.user_id is not none else "unknown" }}:
status={{ outcome.status }}
discovered={{ outcome.discovered }}
imported={{ outcome.imported }}
skipped={{ outcome.skipped }}
failed={{ outcome.failed }}
{% if outcome.message %}
&mdash; {{ outcome.message }}
{% endif %}
</li>
{% else %}
<li>No outcomes.</li>
{% endfor %}
</ul>
{% extends "base.html" %}
{% block title %}Sync result - MyWhoosh Garmin Sync{% endblock %}
{% block content %}
<h1>Sync result</h1>
<div class="page-actions">
<a class="btn secondary" href="/">Back to dashboard</a>
</div>
<div class="card">
<table>
<thead>
<tr>
<th>User</th>
<th>Status</th>
<th>Discovered</th>
<th>Imported</th>
<th>Skipped</th>
<th>Failed</th>
</tr>
</thead>
<tbody>
{% for outcome in outcomes %}
<tr>
<td>{{ outcome.user_id if outcome.user_id is not none else "unknown" }}</td>
<td><span class="badge badge-{{ outcome.status }}">{{ outcome.status }}</span></td>
<td>{{ outcome.discovered }}</td>
<td>{{ outcome.imported }}</td>
<td>{{ outcome.skipped }}</td>
<td>{{ outcome.failed }}</td>
</tr>
{% if outcome.message %}
<tr>
<td colspan="6" class="summary-error">{{ outcome.message }}</td>
</tr>
{% endif %}
{% else %}
<tr>
<td colspan="6" class="empty-state">No outcomes.</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}