{#- 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) -%}
{% if packet %}{% endif %} {% for r in runs %} {% if packet %}{% endif %} {% endfor %}
RunStatusProgressFailedStartedTimePacketWhere
{{ r.title }}{% if r.parent %} nested{% endif %} {{ status(r) }} {{ bar(r) }} {{ r.finished }}/{{ r.total }} {{ r.failed|length or "" }} {{ r.t0|epoch }} {{ r.elapsed|secs }}{% if r.wpid and r.project %}{{ r.wpid[:8] }}{% if r.step %} step {{ r.step }}{% endif %}{% elif r.wpid %}{{ r.wpid[:8] }}{% else %}shell{% endif %}{{ r.host }}:{{ r.cwd }}
{%- endmacro %} {% macro panel(r, next_n=3) -%} {#- One run, compact: the live view's side column, next to the processes. -#}
{{ r.title }} {{ status(r) }} {{ r.elapsed|secs }}
{{ 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 %}{% endfor %}
{{ n.label or n.name }}{% if n.cmd %} {{ n.cmd }}{% endif %}{{ n.for_s|secs }}
{% endif %} {% if r.failed %} {% for n in r.failed[:5] %}{% endfor %} {% if r.failed|length > 5 %}{% endif %}
✗ {{ n.label or n.name }}{% if n.markers %} {{ n.markers[0].msg }}{% endif %}{% if n.log or n.logfile %}log{% endif %}
… and {{ r.failed|length - 5 }} more
{% 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 %}