{% from "leeuwenhoek/_macros.html" import status_tag, duration, time_ago, json_tree %} {% macro outcome(c) %}{% if c.error %}{{ c.error['class'].split('.')[-1] }}{% else %}{{ status_tag(c.status) }}{% endif %}{% endmacro %} {% macro head() %}
{{ e.content.url | lw_truncate(90) }}{{ e.content.url | lw_truncate(90) }} {{ outcome(e.content) }} {{ duration(e.content.duration_ms) }}{% endmacro %}
{% macro detail(e) %}
{% set c = e.content %}
Method
{{ c.method }}
Status
{{ outcome(c) }}
Duration
{{ c.duration_ms | lw_duration }}
Host
{{ c.host or '—' }}
Client
{{ c.library }}
{{ c.url }}
{%- if c.redirects %}
{{ c.redirects }} redirect{{ 's' if c.redirects > 1 }} → {{ c.final_url }}{% endif %}