86 lines
2.4 KiB
HTML
86 lines
2.4 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<section class="page-head">
|
|
<div>
|
|
<p class="eyebrow">Edge 1030 structured workout bridge</p>
|
|
<h1>Dashboard</h1>
|
|
</div>
|
|
<form method="post" action="/sync/run" class="inline-actions">
|
|
<button type="submit">Sync now</button>
|
|
<label class="checkbox"><input type="checkbox" name="dry_run"> Dry run</label>
|
|
</form>
|
|
</section>
|
|
|
|
<section class="metrics">
|
|
<article>
|
|
<span>Garmin</span>
|
|
<strong>{{ "Configured" if garmin_configured else "Needs setup" }}</strong>
|
|
</article>
|
|
<article>
|
|
<span>Last run</span>
|
|
<strong>{{ status.last_run.status if status.last_run else "Never" }}</strong>
|
|
</article>
|
|
<article>
|
|
<span>Next check</span>
|
|
<strong>{{ next_run.strftime("%Y-%m-%d %H:%M") if next_run else "Disabled" }}</strong>
|
|
</article>
|
|
<article>
|
|
<span>Window</span>
|
|
<strong>{{ schedule.active_window }}</strong>
|
|
</article>
|
|
</section>
|
|
|
|
<section class="panel">
|
|
<header>
|
|
<h2>Manual Checks</h2>
|
|
</header>
|
|
<div class="button-row">
|
|
<form method="post" action="/sync/run">
|
|
<input type="hidden" name="date_value" value="{{ today }}">
|
|
<button type="submit">Check today</button>
|
|
</form>
|
|
<form method="post" action="/sync/run">
|
|
<input type="hidden" name="date_value" value="{{ tomorrow }}">
|
|
<button type="submit">Check tomorrow</button>
|
|
</form>
|
|
<form method="post" action="/sync/run">
|
|
<input type="hidden" name="date_value" value="{{ today }}">
|
|
<input type="hidden" name="dry_run" value="on">
|
|
<button type="submit">Dry-run today</button>
|
|
</form>
|
|
<a class="button secondary" href="/search">Search workouts</a>
|
|
<a class="button secondary" href="/schedule">Edit schedule</a>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel">
|
|
<header>
|
|
<h2>Clone State</h2>
|
|
</header>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Source</th>
|
|
<th>Clone</th>
|
|
<th>Status</th>
|
|
<th>Updated</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for clone in status.clones %}
|
|
<tr>
|
|
<td>{{ clone.scheduled_date }}</td>
|
|
<td>{{ clone.source_name or "-" }}</td>
|
|
<td>{{ clone.clone_workout_name or "-" }}</td>
|
|
<td><span class="badge">{{ clone.status }}</span></td>
|
|
<td>{{ clone.updated_at }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="5" class="empty">No generated clones recorded yet.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
{% endblock %}
|