Runs read "update.yml on web-1" (run_title over the scope label, beside describe_scope) on the runs list, the run page's title and breadcrumb, and the run-started panel. The list shows started |ago (full time on hover), |duration (counting "so far" while a run is going) and a dry-run tag. Run statuses join STATES, so the list and the run page use status_badge: queued dim, running info (blue, so work in progress doesn't read as a problem), success ok "Succeeded", failed crit, interrupted warn, cancelled dim. run_started.html leaves its hard-coded colours for tokens; the run page's facts move to the .kv list and its failures to var(--red). Template hex colours: 54 -> 47. Also fixes #5124's sidebar count, which CI run 8389 failed on: the stylesheet guard allows no weight above 500, and .nav-count asked for 600. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
1.1 KiB
HTML
29 lines
1.1 KiB
HTML
{# The run form's answer: the run just started, streaming its output in place. #}
|
|
{% from "_macros.html" import status_badge %}
|
|
<div class="card run-started">
|
|
<div class="run-started-head">
|
|
{{ status_badge('running') }}
|
|
<span>{{ title }}</span>
|
|
<a href="/ansible/runs/{{ run.id }}" class="run-started-link">Full view →</a>
|
|
</div>
|
|
<pre id="sse-output-{{ run.id }}" class="run-output"></pre>
|
|
<div id="sse-status-{{ run.id }}" class="field-hint">
|
|
Streaming output…
|
|
</div>
|
|
<script>
|
|
(function() {
|
|
var es = new EventSource('/ansible/runs/{{ run.id }}/stream');
|
|
var pre = document.getElementById('sse-output-{{ run.id }}');
|
|
var status = document.getElementById('sse-status-{{ run.id }}');
|
|
es.addEventListener('output', function(e) {
|
|
pre.textContent += e.data + '\n';
|
|
pre.scrollTop = pre.scrollHeight;
|
|
});
|
|
es.addEventListener('done', function(e) {
|
|
es.close();
|
|
status.textContent = 'Finished: ' + e.data;
|
|
});
|
|
})();
|
|
</script>
|
|
</div>
|