feat: add operational sync controls
This commit is contained in:
@@ -4,13 +4,28 @@
|
||||
|
||||
{% block content %}
|
||||
<h1>Dashboard</h1>
|
||||
<p><a href="/users/new">Add user</a></p>
|
||||
<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 user in users %}
|
||||
{% for row in rows %}
|
||||
<li>
|
||||
<a href="/users/{{ user.id }}">{{ user.name }}</a>
|
||||
— {{ "enabled" if user.enabled else "disabled" }}
|
||||
— {{ user.health_state.value }}
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user