{# events/artifacts の欠損に対して safe defaults を使用 #} {% set artifacts = artifacts if artifacts else [] %} {% set events = events if events else [] %} {% set log_artifacts = artifacts | selectattr('artifact_type', 'equalto', 'log') | list %} {% set stdout_artifacts = artifacts | selectattr('artifact_type', 'equalto', 'stdout') | list %} {% set stderr_artifacts = artifacts | selectattr('artifact_type', 'equalto', 'stderr') | list %} {% set total_log_bytes = (log_artifacts | map(attribute='size_bytes') | sum) if log_artifacts else 0 %} {% set recent_events = events[-50:] if events else [] %}
Job status
{{ job.status.value if job.status else '-' }}
Log artifacts
{{ log_artifacts|length }}
Total bytes (log artifacts)
{{ total_log_bytes }}
Recent events
{% if recent_events|length == 0 %}
No events recorded yet.
{% else %}
{% for ev in recent_events %}
{{ fmt_dt(ev.timestamp) if ev.timestamp else '-' }}
{{ ev.to_status.value if ev.to_status else '-' }}
{{ ev.message if ev.message else '-' }}
{% endfor %}
{% endif %}
{% if stdout_artifacts|length > 0 %}
Stdout content
{% for artifact in stdout_artifacts %}
{{ artifact.content if artifact.content else '(no content)' }}
{% endfor %}
{% endif %} {% if stderr_artifacts|length > 0 %}
Stderr content
{% for artifact in stderr_artifacts %}
{{ artifact.content if artifact.content else '(no content)' }}
{% endfor %}
{% endif %}
Log artifact paths (latest)
{% if log_artifacts|length == 0 %}
No log artifacts recorded.
{% else %}
{% for a in log_artifacts[-10:] %}
{{ a.path if a.path else '-' }} +{{ a.size_bytes if a.size_bytes else 0 }} bytes
{% endfor %}
{% endif %}