{# plugins/traefik/templates/traefik/widget.html — the dashboard Routers widget (#5254): a verdict, routers in trouble with why, then the busiest healthy ones, under one header. Only routers Traefik still reports. A certificate shows on the router it serves (TLS column, days left); when Traefik's API can't say which hosts a router serves, the expiring certificates are listed after the routers instead. #} {% from "_macros.html" import status_dot %} {% if not total %}
No Traefik data yet.
{% else %} {% set crit = problems | selectattr("state", "equalto", "crit") | list %}
{%- if problems|length == 1 %}{{ problems[0].name.split('@')[0] }}: {{ problems[0].why }}. {%- elif problems %}{{ problems|length }} of {{ total }} routers need a look. {%- else %}All {{ total }} router{{ 's' if total != 1 }} healthy{% if loose_certs %}; {{ loose_certs|length }} certificate{{ 's' if loose_certs|length != 1 }} expiring{% endif %}.{% endif -%}
{% if domains_known %}{% endif %}{% if domains_known %}{% endif %} {% for r in problems + healthy %} {% set m = r.latest %} {% if domains_known %} {% endif %} {% endfor %}
RouterReq/sBandwidthp95TLS
{{- status_dot(r.state) -}} {{ r.name.split('@')[0] }} {%- if r.why %}{{ r.why }}{% endif %} {% if m.request_rate is none %}—{% else %}{{ "%.2f"|format(m.request_rate) }}{% endif %} {% if m.response_bytes_rate is none %}—{% else %}{{ m.response_bytes_rate|rate }}{% endif %} {%- if m.latency_p95_ms is none %}—{% else %}{{ "%.0f"|format(m.latency_p95_ms) }} ms{% endif -%} {%- if r.cert %}{{ cert_left(r.cert.days) }}{% else %}—{% endif -%}
{% if healthy_more %}
+{{ healthy_more }} more healthy{% if session.user_id %} · all routers{% endif %}
{% endif %} {% if loose_certs %}
Certificates expiring
{% for c in loose_certs %}
{{- status_dot(status_class(c.days, 'tls_days')) -}} {{ c.cn }} {{ cert_left(c.days) }}
{% endfor %}
Traefik's API didn't say which hosts each router serves, so these can't be shown on their routers.
{% endif %} {% endif %}