{% extends "base.html" %} {% block title %}FlowSurgeon — {% if active_view == "requests" %}Recent Requests{% else %}API Endpoints{% endif %}{% endblock %} {% block topbar %} {% endblock %} {% block content %} {% if active_view == "requests" %} {# ── Recent Requests view ── #} {# Build page base URL for pagination (all params except page) #} {% set pb = debug_route + "?view=requests" %} {% if path_filter %}{% set pb = pb + "&path=" + path_filter %}{% endif %} {% if method_filter %}{% set pb = pb + "&method=" + method_filter %}{% endif %} {% if q %}{% set pb = pb + "&q=" + q %}{% endif %} {% if status_filter %}{% set pb = pb + "&status=" + status_filter %}{% endif %} {% set pb = pb + "&" %}
{% if path_filter %}
← APIs

{% if method_filter %}{{ method_filter }}{% endif %}{{ path_filter }}

{% else %}

Recent Requests

{% endif %} {{ total_records }} result{% if total_records != 1 %}s{% endif %}
{% if not path_filter %}
{% if q or status_filter or method_filter %} Clear {% endif %}
{% endif %}
TIMESTAMP ENDPOINT METHOD DURATION SQL STATUS
{% if records %} {% for r in records %} {{ r.timestamp.strftime("%m-%d %H:%M:%S") }} {{ r.path }}{% if r.query_string %}?{{ r.query_string }}{% endif %} {{ r.method }} {{ "%.0f"|format(r.duration_ms) }} ms {{ r.queries | length if r.queries else '—' }}{% if r.queries %} quer.{% endif %} {{ r.status_code }} {% if not loop.last %}
{% endif %} {% endfor %} {% else %}
No requests recorded{% if q or status_filter or method_filter %} matching filters{% endif %}.
{% endif %}
{% if total_pages > 1 %} {% endif %} {% else %} {# ── APIs view ── #} {# Build page base URL for pagination #} {% set apb = debug_route + "?" %} {% if apis_method %}{% set apb = apb + "amethod=" + apis_method + "&" %}{% endif %} {% if sort and sort != "duration" %}{% set apb = apb + "sort=" + sort + "&" %}{% endif %}

API Endpoints

{{ total_summaries }} endpoint{% if total_summaries != 1 %}s{% endif %}
{% if apis_method or (sort and sort != "duration") %} Clear {% endif %}
ENDPOINT METHOD LATEST MS SQL SQL MS REQUESTS LAST REQUEST STATUS
{% if endpoint_summaries %} {% for ep in endpoint_summaries %} {{ ep.path }} {{ ep.method }} {% if ep.has_data %}{{ "%.0f"|format(ep.latest_duration_ms) }} ms{% else %}—{% endif %} {{ ep.latest_query_count if ep.latest_query_count else '—' }} {% if ep.latest_query_ms > 0 %}{{ "%.0f"|format(ep.latest_query_ms) }} ms{% else %}—{% endif %} {{ ep.count if ep.count else '—' }}{% if ep.count %} req{% if ep.count != 1 %}s{% endif %}{% endif %} {{ ep.last_request_time or '—' }} {% if ep.has_data %} {{ ep.latest_status }} {% else %} no traffic {% endif %} {% if not loop.last %}
{% endif %} {% endfor %} {% else %}
No endpoints registered yet.
{% endif %}
{% if total_pages > 1 %} {% endif %} {% endif %} {% endblock %}