{% extends "base.html" %} {% block title %}FlowSurgeon — Requests{% endblock %} {% block topbar %} {% endblock %} {% block content %} {# Build page base URL for pagination (omit defaults to keep URLs clean) #} {% set pb = debug_route + "?view=" + active_view %} {% if q %}{% set pb = pb + "&q=" + q %}{% endif %} {% if order and order != "queries" %}{% set pb = pb + "&order=" + order %}{% endif %} {% if show and show != 25 %}{% set pb = pb + "&show=" + show|string %}{% endif %} {% set pb = pb + "&" %}

Requests

{% if active_view != "profiling" %}
{{ total_records }} request{% if total_records != 1 %}s{% endif %}
{% endif %}
{# Controls row: tab buttons (left) + filters (right) #}
Latency & Queries Profiling
{% if active_view == 'latency' %}
Path: Show: Order:
{% endif %}
{% if active_view == 'profiling' %} {# ── Profiling placeholder ── #}
Profiling Coming soon — call-stack profiling per endpoint.
{% else %} {# ── Latency & Queries grid ── #} {% if records %}
{% for r in records %} {% set qms = namespace(val=0.0) %} {% for qr in r.queries %}{% set qms.val = qms.val + qr.duration_ms %}{% endfor %}
{{ r.status_code }} {{ r.method }}
{{ r.path }} {{ "%.0f"|format(r.duration_ms) }}ms overall {{ "%.0f"|format(qms.val) }}ms on queries · {{ r.queries | length }} quer{% if r.queries | length != 1 %}ies{% else %}y{% endif %}
{% endfor %}
{% else %}
No requests recorded{% if q %} matching “{{ q }}”{% endif %}.
{% endif %} {% if total_pages > 1 %}
Showing {{ page_start }}–{{ page_end }} of {{ total_records }} requests
{% endif %} {% endif %} {% endblock %}