- /ansible/playbooks lists every playbook across sources: what it says it does, its category and destructive flag, how it last ran; the whole row opens the playbook. A source with none is one quiet line. - /ansible/playbooks/<source>/<path>: the verdict (what it does, flagged destructive, last ran), the run form in place (dry run beside the button, options folded), the schedules that use it, its recent runs, the playbook itself folded. ?from=<run> fills the form from that run: Run again on a run's page. - /ansible/browse, its view page and the /run-form fragment are gone, not redirected (rule 122); every link points at the new pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
2.6 KiB
HTML
41 lines
2.6 KiB
HTML
{# ansible/index.html — the Runs tab (#5329): a verdict line (how the last
|
|
30 days went, failures first, what runs next), a filter bar, then every run
|
|
newest first as the reader scrolls (ansible/_runs_table.html). #}
|
|
{% extends "base.html" %}
|
|
{% from "_macros.html" import page_header %}
|
|
{% from "ansible/_tabs.html" import ansible_tabs %}
|
|
{% block title %}Ansible Runs — Steward{% endblock %}
|
|
{% block content %}
|
|
{{ ansible_tabs("runs") }}
|
|
{% call page_header("Ansible Runs") %}
|
|
<a href="/ansible/playbooks" class="btn">Run a playbook</a>
|
|
{% endcall %}
|
|
|
|
{% set v = verdict %}
|
|
<p class="page-verdict">
|
|
{%- if not v.total %}<span class="tone-muted">No runs in the last {{ v.days }} days</span>
|
|
{%- elif v.failed %}<span class="tone-crit">{{ v.failed }} of {{ v.total }} run{{ 's' if v.total != 1 }} failed</span> in the last {{ v.days }} days
|
|
{%- if v.latest_failed %} — latest <a href="/ansible/runs/{{ v.latest_failed.run.id }}">{{ v.latest_failed.title }}</a> {{ v.latest_failed.run.started_at|ago }}{% endif %}
|
|
{%- else %}<span class="tone-ok">{{ v.total }} run{{ 's' if v.total != 1 }} in the last {{ v.days }} days, {{ 'all' if v.total > 1 else 'it' }} succeeded</span>{% endif %}
|
|
{%- if v.running %} · <span class="tone-info">{{ v.running }} running now</span>{% endif %}
|
|
{%- if v.next %} · next: <a href="/ansible/schedules">{{ v.next.name }}</a> {% if v.next.at %}{{ v.next.at|ago }}{% else %}due now{% endif %}{% endif -%}
|
|
</p>
|
|
|
|
<form class="filter-bar" method="get" action="/ansible/" role="search"
|
|
hx-target="#runs-table" hx-push-url="true" hx-include="closest form">
|
|
<input type="search" name="q" value="{{ f.q }}" class="input" placeholder="Search playbooks"
|
|
aria-label="Search runs by playbook" autocomplete="off"
|
|
hx-get="/ansible/" hx-trigger="input changed delay:250ms, search">
|
|
<select name="status" aria-label="Status" hx-get="/ansible/" hx-trigger="change">
|
|
<option value="">Any status</option>
|
|
{% for key, (label, _) in statuses.items() %}<option value="{{ key }}"{% if f.status == key %} selected{% endif %}>{{ label }}</option>{% endfor %}
|
|
</select>
|
|
<select name="origin" aria-label="Started by" hx-get="/ansible/" hx-trigger="change">
|
|
<option value="">Started by anyone</option>
|
|
{% for key, label in origins.items() %}<option value="{{ key }}"{% if f.origin == key %} selected{% endif %}>{{ label }}</option>{% endfor %}
|
|
</select>
|
|
<noscript><button type="submit" class="btn btn-sm">Filter</button></noscript>
|
|
</form>
|
|
<div id="runs-table">{% include "ansible/_runs_table.html" %}</div>
|
|
{% endblock %}
|