{#- DFM runs (docs/dfm-events.md §5): the table on /runs, a step and a packet. -#}
{% macro status(r) -%}
{{ r.status }}
{%- endmacro %}
{% macro bar(r) -%}
{%- endmacro %}
{% macro table(runs, packet=True) -%}
{{ bar(r) }} {{ r.finished }}/{{ r.total }} done{% if r.failed %} · {{ r.failed|length }} failed{% else %}{% endif %}{% if r.pending %} · {{ r.pending|length }} to go{% endif %}
{% if r.running %}
{% for n in r.running %}{{ n.label or n.name }}{% if n.cmd %} {{ n.cmd }}{% endif %} | {{ n.for_s|secs }} |
{% endfor %}
{% endif %}
{% if r.failed %}
{% for n in r.failed[:5] %}✗ {{ n.label or n.name }}{% if n.markers %} {{ n.markers[0].msg }}{% endif %} | {% if n.log or n.logfile %}log{% endif %} |
{% endfor %}
{% if r.failed|length > 5 %}| … and {{ r.failed|length - 5 }} more | |
{% endif %}
{% endif %}
{% if r.live and r.pending %}
Next: {% for n in r.pending[:next_n] %}{{ n.label or n.name }}{% if n.waiting %} (after {{ n.waiting }}){% endif %}{{ ", " if not loop.last }}{% endfor %}{% if r.pending|length > next_n %} …{% endif %}
{% endif %}
{%- endmacro %}
{% macro style() -%}
{%- endmacro %}