35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Dashboard - MyWhoosh Garmin Sync{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>Dashboard</h1>
|
|
<p><a href="/users/new">Add user</a> | <a href="/system">System</a></p>
|
|
|
|
<form method="post" action="/sync-all">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<button type="submit">Sync all now</button>
|
|
</form>
|
|
|
|
<ul>
|
|
{% for row in rows %}
|
|
<li>
|
|
<a href="/users/{{ row.id }}">{{ row.name }}</a>
|
|
— {{ "enabled" if row.enabled else "disabled" }}
|
|
— {{ row.health_state }}
|
|
— last sync: {{ row.last_sync_at or "-" }}
|
|
— last activity: {{ row.last_activity_name or "-" }} ({{ row.last_activity_status or "-" }})
|
|
{% if row.action_reason == "garmin_mfa_required" %}
|
|
<span class="action-required">Garmin MFA required — <a href="/users/{{ row.id }}">resolve</a></span>
|
|
{% endif %}
|
|
<form method="post" action="/users/{{ row.id }}/sync" style="display:inline">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<button type="submit">Sync now</button>
|
|
</form>
|
|
</li>
|
|
{% else %}
|
|
<li>No users yet.</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endblock %}
|