feat: show last-run duration on the groups list
groups_index attaches last_duration_s from the latest group run; groups.html renders it as a new right-aligned duration column (— when never run). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
3b3fe6f865
commit
9a11050d3b
@ -1333,9 +1333,11 @@ def groups_index(request: Request):
|
||||
if recent:
|
||||
g["last_run_at"] = recent[0]["started_at"]
|
||||
g["last_status"] = recent[0]["status"]
|
||||
g["last_duration_s"] = recent[0]["duration_s"]
|
||||
else:
|
||||
g["last_run_at"] = None
|
||||
g["last_status"] = None
|
||||
g["last_duration_s"] = None
|
||||
return _templates.TemplateResponse(
|
||||
request, "groups.html",
|
||||
_ctx(groups=groups),
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
<th>name</th>
|
||||
<th>members</th>
|
||||
<th>last run</th>
|
||||
<th style="width:7em;text-align:right">duration</th>
|
||||
<th style="width:9em">status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@ -29,6 +30,7 @@
|
||||
<td><a href="/groups/{{ g.id }}"><strong>{{ g.name }}</strong></a></td>
|
||||
<td class="mono">{{ g.member_count }}</td>
|
||||
<td class="mono">{{ g.last_run_at | localtime }}</td>
|
||||
<td class="mono" style="text-align:right">{{ g.last_duration_s | duration }}</td>
|
||||
<td>
|
||||
{% if g.last_status %}
|
||||
<span class="pill {{ g.last_status }}">{{ g.last_status }}</span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user