{# ── Single log line card — called in a loop by index.html ─────────── #} {% from "partials/status_badge.html" import status_badge %} {% set p = la.parsed %} {% set log_parts = _render_log_parts(la) %}
{# ── Left column: compact badge-only metadata ── #}
{# Timestamp + level + refs all inline, wrapping naturally #} {% if p.timestamp %} {{ p.timestamp.strftime('%Y-%m-%d %H:%M:%S.') }}{{ p.timestamp.strftime('%f')[:3] }}{% set tz = p.timestamp.strftime('%z') %}{% if tz %}{{ tz[:3] }}:{{ tz[3:] }}{% endif %} {% endif %} {% if p.level %} {{ p.level }} {% endif %} {% if p.is_valid %} {# Bracket runners #} {% for rm in la.runner_matches %} {% if rm.contexts %} {% for ctx in rm.contexts %} memory {{ rm.parsed.cls_abbr }}({{ rm.parsed.partial_id }}) {% endfor %} {% else %} memory {{ rm.parsed.cls_abbr }}({{ rm.parsed.partial_id }}) {% endif %} {% endfor %} {# Bracket invocation — full ID + status + timeline (grouped) #} {% if p.invocation_id %} {% set inv_d = analysis.ref_details.get('invocation:' ~ p.invocation_id, {}) if analysis else {} %} info {{ p.invocation_id }} {% if inv_d.status %} {{ inv_d.status }} {% endif %} timeline {% endif %} {# Bracket task #} {% if p.task_key %} task {{ p.task_key }} {% endif %} {% endif %}
{# ── Right column: message text + message-body entity badges ── #}
{% if log_parts.message %}
{{ log_parts.message|safe }}
{% endif %} {% if la.extra_entity_refs %}
{% for ref in la.extra_entity_refs %} {% if ref.kind in ('invocation','parent-invocation','child-invocation','new-invocation') %} {% set ref_d = analysis.ref_details.get('invocation:' ~ ref.value, {}) if analysis else {} %} info {% if ref.kind == 'invocation' %}{{ ref.value }}{% elif ref.kind == 'parent-invocation' %}Parent: {{ ref.value }}{% elif ref.kind == 'child-invocation' %}Child: {{ ref.value }}{% elif ref.kind == 'new-invocation' %}New: {{ ref.value }}{% endif %} {% if ref_d.status %} {{ ref_d.status }} {% endif %} timeline {% elif ref.kind in ('runner','worker','current-owner-runner','attempted-owner-runner') %} {% set runner_label = ref.kind|replace('-runner','')|replace('-',' ')|title %} memory {{ runner_label }}: {{ ref.value }} {% elif ref.kind == 'task' %} task {{ ref.value }} {% elif ref.kind in ('workflow','sub-workflow','parent-workflow') %} account_tree {{ ref.kind|replace('-',' ')|title }}: {{ ref.value }} {% else %} {{ ref.kind }}: {{ ref.value }} {% endif %} {% endfor %}
{% endif %}