{# ── 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 atomic service #} {% if p.atomic_service_id %} bolt AS({{ p.atomic_service_id[:8] }}…) {% 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','source-invocation','triggered-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 }}{% elif ref.kind == 'source-invocation' %}Source: {{ ref.value }}{% elif ref.kind == 'triggered-invocation' %}Triggered: {{ ref.value }}{% endif %} {% if ref_d.status %} {{ ref_d.status }} {% endif %} timeline {% elif ref.kind == 'event' %} {% set ref_d = analysis.ref_details.get('event:' ~ ref.value, {}) if analysis else {} %} bolt {% if ref_d.code %}{{ ref_d.code }} · {% endif %}{{ ref.value[:8] }}… {% elif ref.kind == 'trigger-run' %} {% set ref_d = analysis.ref_details.get('trigger-run:' ~ ref.value, {}) if analysis else {} %} play_circle {% if ref_d.task %}{{ ref_d.task }} · {% endif %}{{ ref.value[:8] }}… {% if ref_d.timeline_url %} timeline {% endif %} {% elif ref.kind == 'atomic-service-run' %} bolt AS: {{ ref.value[:8] }}… {% elif ref.kind in ('condition','valid-condition') %} {% set ref_d = analysis.ref_details.get('condition:' ~ ref.value, {}) if analysis and ref.kind == 'condition' else {} %} rule {% if ref.kind == 'valid-condition' %}Valid: {% endif %}{% if ref_d.type %}{{ ref_d.type }} · {% endif %}{{ ref.value[:8] }}… {% elif ref.kind == 'trigger' %} {% set ref_d = analysis.ref_details.get('trigger:' ~ ref.value, {}) if analysis else {} %} flash_on {% if ref_d.task %}{{ ref_d.task }} · {% endif %}{{ ref.value[:8] }}… {% 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 %}