{% from "leeuwenhoek/_macros.html" import status_tag, duration, time_ago, json_tree %} {% macro head() %}VerbPathStatusDurationWhen{% endmacro %} {% macro row(e) %} {{ e.content.method }} {{ e.content.path }} {{ status_tag(e.content.status) }} {{ duration(e.content.duration_ms) }} {{ time_ago(e.created_at) }} {% endmacro %} {% macro summary(e) %}{{ e.content.method }} {{ e.content.path }} {{ status_tag(e.content.status) }} {{ duration(e.content.duration_ms) }}{% endmacro %} {% macro detail(e) %} {% set c = e.content %}

Method

{{ c.method }}

Status

{{ status_tag(c.status) }}

Duration

{{ c.duration_ms | lw_duration }}

{% if c.get('memory_peak_kb') is not none %}

Peak memory

{{ c.memory_peak_kb | lw_kb }}

{% endif %}

IP

{{ c.ip or '—' }}

User

{{ c.user or '—' }}

{{ c.url }}
{{ c.rule }} → {{ c.endpoint }}

{{ json_tree({'query': c.query, 'body': c.body}, true) }}
{% endmacro %}