{# plugins/traefik/templates/traefik/traffic.html #} {% if summary %} {# ── Overview bar ─────────────────────────────────────────────────────────── #}
Total {{ summary.total }} Internal {{ summary.internal }} External {{ summary.external }} ({{ "%.1f"|format(summary.external_pct) }}%) Bytes {% set mb = summary.total_bytes / 1048576 %} {% if mb >= 1024 %}{{ "%.1f"|format(mb / 1024) }} GB{% else %}{{ "%.1f"|format(mb) }} MB{% endif %} {# External % sparkline #} ext % over time {{ summary.sparkline_external | safe }}
{# ── Internal/external fill bar ───────────────────────────────────────────── #} {% set ext_pct = summary.external_pct %}
{# ── Detail cards in columns ──────────────────────────────────────────────── #}
{# Top source IPs #}
Top Source IPs
{% for entry in summary.top_ips %} {% if entry.country %} {% endif %} {% endfor %}
{{ entry.ip }}{{ entry.country }} {{ entry.count }}
{# Top routers #}
Top Services Hit
{% for entry in summary.top_routers %} {% endfor %}
{{ entry.router }} {{ entry.count }}
{# Top countries (only shown if GeoIP is active) #} {% if summary.top_countries %}
External Traffic by Country
{% for entry in summary.top_countries %} {% endfor %}
{{ entry.country }} {{ entry.count }}
{% endif %}
{% else %}
No access log data yet. {% if not access_log_enabled %} Enable access_log.enabled: true in your plugin config and bind-mount the Traefik log directory. {% endif %}
{% endif %}