From 4acaa42a971d3034b2df2349c9e99a4e0bbe7f73 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 7 Oct 2026 23:53:38 -0400 Subject: [PATCH] fix(ansible): the playbook variables partial on classes; Run again assertion matches the link (#5331, #5332) CI run 8705 on 0c72892: the schedule page's no-inline-style guard caught _playbook_vars.html (shared by the run and schedule forms), and the run page's Run again assertion left out the link's class. Co-Authored-By: Claude Opus 5.5 --- steward/static/steward.css | 14 +++++++ steward/templates/ansible/_playbook_vars.html | 38 +++++++------------ tests/core/test_ansible_runs_page.py | 2 +- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/steward/static/steward.css b/steward/static/steward.css index c8f6683..fc44125 100644 --- a/steward/static/steward.css +++ b/steward/static/steward.css @@ -387,6 +387,20 @@ a.stat-tile:hover { border-color: var(--border-mid); background: var(--bg-elevat .playbook-source > summary { cursor: pointer; margin: 0; } .playbook-source[open] > summary { margin-bottom: 0.75rem; } .card-flush-note { margin: 0; padding: 0.75rem 1rem; } +/* A playbook's own words above its fields (_playbook_vars.html): what it does, + the destructive gate, then its variables. */ +.pb-about { background: var(--bg); border-left: 3px solid var(--accent); border-radius: var(--fs-radius-sm); + padding: 0.5rem 0.7rem; margin: 0.25rem 0 0.6rem; font-size: 0.82rem; color: var(--text-muted); } +.pb-category { display: inline-block; margin-right: 0.4rem; padding: 0.05em 0.45em; border-radius: var(--fs-radius-sm); + background: var(--bg-elevated); color: var(--text-dim); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; } +.pb-confirm { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0 0 0.6rem; padding: 0.6rem 0.8rem; cursor: pointer; + background: color-mix(in srgb, var(--red) 10%, var(--bg-elevated)); border: 1px solid color-mix(in srgb, var(--red) 35%, var(--border)); + border-radius: 6px; font-size: 0.82rem; font-weight: normal; } +.pb-confirm input { margin-top: 0.15rem; } +.pb-confirm strong { color: var(--red); } +.pb-vars-title { margin: 0.5rem 0 0.25rem; font-size: 0.82rem; color: var(--text-muted); font-weight: 500; } +.pb-vars-hint { margin: 0 0 0.6rem; } +.pb-var-name { color: var(--text-muted); font-weight: normal; font-size: 0.76rem; } /* Monospaced data: ids, limits, tags, paths. */ .mono { font-family: var(--fs-font-mono); font-size: 0.85em; } /* The host page's health header (_host_vitals.html). */ diff --git a/steward/templates/ansible/_playbook_vars.html b/steward/templates/ansible/_playbook_vars.html index e299eaa..ecb7422 100644 --- a/steward/templates/ansible/_playbook_vars.html +++ b/steward/templates/ansible/_playbook_vars.html @@ -1,5 +1,5 @@ {# Description + discovered variable fields for a selected playbook. Shared by - the browse run form, host run form, and schedule form. Expects `variables` + the playbook page's run form and the schedule form. Expects `variables` and `description`. Rendered standalone by /ansible/playbook-vars. Optional: `values` (dict var-name→saved value, prefills fields for edit forms) and `schedule` (True in the schedule form — schedules can't prompt, @@ -7,57 +7,47 @@ {% set _values = values|default({}) %} {% set _schedule = schedule|default(false) %} {% if description or category %} -
- {% if category %}{{ category }}{% endif %} +
+ {% if category %}{{ category }}{% endif %} {{ description }}
{% endif %} {% if confirm %} -