{% from "_macros.html" import icon %} {# What is running on the far side, and what it has printed. EVERYTHING here came off somebody else's machine and is untrusted exactly as much as model output is: the command was written by a model, the log is whatever the command printed. Jinja autoescaping covers the lot, and the log is `
` rather than anything that could emit HTML -- services/markdown.py is
the one path allowed to do that, and this is the last content that should be
given it.
Not polled. The chip beside the composer is what refreshes on a timer; this is
fetched when somebody opens it and re-rendered when they press something,
because reading a log is an SSH round trip per job and nobody is looking at
most of them.
#}
{% if not jobs %}
Nothing is running.
{% else %}
Background jobs
{% for job in jobs %}
{# The whole command in the title, a truncated one on screen. A command line
is unbounded and this sits in a menu with a fixed width; CSS truncates,
and the title is how you read the rest. #}
{% if job.running %}
{% endif %}
{% if open_job == job.id %}
{% if error %}
{{ error }}
{% else %}
{{ body or "Nothing printed yet." }}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}