fix(ui): unify header/breadcrumb treatment, drop redundant back buttons
The page-top chrome was inconsistent: most nested views used the breadcrumb
kicker + page-title pattern, but plugin sub-pages used ad-hoc "← back" links,
~11 pages stacked a breadcrumb AND a redundant ancestor back button, and two
(monitors/edit, hosts/uptime) had a back button but no breadcrumb. The
settings/plugin_detail page stacked all of it at once.
Unify on the breadcrumb-led model:
- settings/_tabs.html: drop the hardcoded "Settings" h1; the breadcrumb
("Settings › …") plus the tab strip is the header.
- settings/plugin_detail: drop the "← Plugins" back button.
- docker container_detail/swarm/disk + snmp/device: replace ad-hoc back links
with the standard crumbs() breadcrumb.
- host_agent, ansible/*, alerts/maintenance: remove redundant ancestor back
buttons (the breadcrumb's parent crumbs already link there); keep lateral
shortcuts (Inventory/Schedules/Browse/Targets/Groups/New).
- monitors/edit, hosts/uptime: add the missing breadcrumb, drop the back link.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Jg27rgypiW2efULXJDtMC
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
{% endif %}
|
||||
<a href="/ansible/inventory/targets" class="btn btn-ghost btn-sm">Inventory</a>
|
||||
<a href="/ansible/schedules" class="btn btn-ghost btn-sm">Schedules</a>
|
||||
<a href="/ansible/" class="btn btn-ghost btn-sm">← Run History</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +34,6 @@
|
||||
<button type="submit" class="btn btn-sm btn-danger">Delete</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<a href="/ansible/browse" class="btn btn-ghost btn-sm">← Back to browse</a>
|
||||
</div>
|
||||
</div>
|
||||
<pre style="background:var(--bg);padding:1rem;border-radius:4px;overflow-x:auto;font-size:0.8rem;color:var(--text-muted);max-height:600px;overflow-y:auto;">{{ view_contents }}</pre>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
{% block content %}
|
||||
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;">
|
||||
<h1 class="page-title" style="margin-bottom:0;">Group: {{ group.name }}</h1>
|
||||
<a href="/ansible/inventory/groups" class="btn btn-ghost btn-sm">← Groups</a>
|
||||
</div>
|
||||
|
||||
<form method="post" action="/ansible/inventory/groups/{{ group.id }}">
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<h1 class="page-title" style="margin-bottom:0;">Inventory Groups</h1>
|
||||
<div style="display:flex;gap:0.5rem;">
|
||||
<a href="/ansible/inventory/targets" class="btn btn-ghost btn-sm">Targets</a>
|
||||
<a href="/ansible/" class="btn btn-ghost btn-sm">← Ansible</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
{% block content %}
|
||||
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;">
|
||||
<h1 class="page-title" style="margin-bottom:0;">Target: {{ target.name }}</h1>
|
||||
<a href="/ansible/inventory/targets" class="btn btn-ghost btn-sm">← Targets</a>
|
||||
</div>
|
||||
|
||||
<form method="post" action="/ansible/inventory/targets/{{ target.id }}">
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<h1 class="page-title" style="margin-bottom:0;">Inventory Targets</h1>
|
||||
<div style="display:flex;gap:0.5rem;">
|
||||
<a href="/ansible/inventory/groups" class="btn btn-ghost btn-sm">Groups</a>
|
||||
<a href="/ansible/" class="btn btn-ghost btn-sm">← Ansible</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
{% block content %}
|
||||
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem;gap:1rem;flex-wrap:wrap;">
|
||||
<h1 class="page-title" style="margin-bottom:0;">{{ "Edit playbook" if editing else "New playbook" }}</h1>
|
||||
<a href="/ansible/browse" class="btn btn-ghost btn-sm">← Browse</a>
|
||||
</div>
|
||||
|
||||
{% if error %}<div class="alert alert-error">{{ error }}</div>{% endif %}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
{% block breadcrumb %}{{ crumbs([("Ansible", "/ansible/"), ("Run " ~ run.id[:8], "")]) }}{% endblock %}
|
||||
{% block content %}
|
||||
<div style="display:flex;align-items:center;gap:1rem;margin-bottom:1.5rem;">
|
||||
<a href="/ansible/" class="btn btn-ghost btn-sm">← Runs</a>
|
||||
<h1 class="page-title" style="margin-bottom:0;">Run Detail</h1>
|
||||
<div style="margin-left:auto;display:flex;gap:0.5rem;">
|
||||
{% if run.status.value in ("running", "queued") and session.user_role in ("operator", "admin") %}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<div style="display:flex;gap:0.5rem;">
|
||||
<a href="/ansible/inventory/targets" class="btn btn-ghost">Inventory</a>
|
||||
<a href="/ansible/browse" class="btn btn-ghost">Browse</a>
|
||||
<a href="/ansible/" class="btn btn-ghost">← Runs</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user