feat(ansible): the whole run row opens the run (#5214)
Same .row-link / .row-target as the Alerts rules list (snippet #5320). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
{# ansible/_runs_page.html — one page of runs, then the sentinel that loads the
|
{# ansible/_runs_page.html — one page of runs, then the sentinel that loads the
|
||||||
next page as the reader nears it (core.paging, pref 172). #}
|
next page as the reader nears it (core.paging, pref 172). The whole row
|
||||||
|
opens the run (.row-link); its title is the one real link. #}
|
||||||
{% from "_macros.html" import status_badge, scroll_more, scroll_end %}
|
{% from "_macros.html" import status_badge, scroll_more, scroll_end %}
|
||||||
{% for row in runs %}
|
{% for row in runs %}
|
||||||
{% set run = row.run %}
|
{% set run = row.run %}
|
||||||
<tr>
|
<tr class="row-link">
|
||||||
<td>
|
<td>
|
||||||
<a href="/ansible/runs/{{ run.id }}">{{ row.title }}</a>
|
<a class="row-target" href="/ansible/runs/{{ run.id }}">{{ row.title }}</a>
|
||||||
{% if row.check %}<span class="badge badge-dim" title="Ansible check mode: nothing was changed">dry run</span>{% endif %}
|
{% if row.check %}<span class="badge badge-dim" title="Ansible check mode: nothing was changed">dry run</span>{% endif %}
|
||||||
<div class="field-hint">{{ run.source_name }}</div>
|
<div class="field-hint">{{ run.source_name }}</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -54,7 +54,8 @@ async def test_the_runs_list_names_each_run_with_one_badge(app):
|
|||||||
page = await render_template("ansible/index.html", runs=runs, after="2026-10-07T01:00:00+00:00|x")
|
page = await render_template("ansible/index.html", runs=runs, after="2026-10-07T01:00:00+00:00|x")
|
||||||
|
|
||||||
main = page[page.index("<main"):]
|
main = page[page.index("<main"):]
|
||||||
assert '<a href="/ansible/runs/aaaa1111">update.yml on web-1</a>' in main
|
assert '<tr class="row-link">' in main # the whole row opens the run
|
||||||
|
assert '<a class="row-target" href="/ansible/runs/aaaa1111">update.yml on web-1</a>' in main
|
||||||
assert "steward:target:t1" not in main # no raw scope, not even as a tooltip
|
assert "steward:target:t1" not in main # no raw scope, not even as a tooltip
|
||||||
assert ">update.yml on all inventory targets</a>" in main
|
assert ">update.yml on all inventory targets</a>" in main
|
||||||
assert '<span class="badge badge-info">Running</span>' in main
|
assert '<span class="badge badge-info">Running</span>' in main
|
||||||
|
|||||||
Reference in New Issue
Block a user