{% load i18n prometric_extras %} {% comment %}Cloudflare's section of the route-detail page. Context: provider, route, period, metrics (RouteMetrics), chart.{% endcomment %} {% if metrics.requests %}
{% translate "Requests" %}
{{ metrics.requests|num }}
{% translate "Visits" %}
{{ metrics.visits|num }}
{% translate "Bandwidth" %}
{{ metrics.bandwidth_bytes|size }}
{% translate "Errors" %}
{{ metrics.errors|num }}
{{ metrics.error_ratio|pct }}
{% translate "Last seen" %}
{% if metrics.last_seen %}
{{ metrics.last_seen|date:"H:i" }}
{{ metrics.last_seen|date:"M j" }}
{% else %}
{% endif %}
{% if chart.labels %}

{% translate "Traffic" %}

{{ chart|json_script:"pm-route-chart" }}
{% endif %} {% if metrics.performance %}

{% translate "Edge performance" %}

{% translate "TTFB p50" %}
{{ metrics.performance.p50_ms|ms }}
{% translate "TTFB p95" %}
{{ metrics.performance.p95_ms|ms }}
{% translate "TTFB p99" %}
{{ metrics.performance.p99_ms|ms }}
{% endif %}

{% translate "Countries" %}

{% include "django_prometric/components/_bars.html" with items=metrics.countries kind="country" %}

{% translate "Status codes" %}

{% include "django_prometric/components/_bars.html" with items=metrics.statuses kind="status" %}

{% translate "Methods" %}

{% include "django_prometric/components/_bars.html" with items=metrics.methods %}

{% translate "Cache" %}

{% include "django_prometric/components/_bars.html" with items=metrics.cache %}
{% else %}

{% translate "Cloudflare recorded no requests for this route in the selected period." %}

{% translate "If the whole site has traffic but routes stay empty, this app is probably served on a hostname the zone does not proxy — check the HOSTS setting under CLOUDFLARE, and whether the DNS record is proxied (orange cloud)." %}

{% endif %}