Files
FabledSteward/plugins/traefik/templates/traefik/index.html
T
bvandeusenandClaude Opus 5.5 0bac1d2068
CI / lint (push) Successful in 3s
CI / integration (push) Successful in 1m27s
CI / unit (push) Failing after 1m38s
CI / publish (push) Skipped
feat(traefik): the page leads with its verdict and the request chart (#5710)
The Traefik page now reads state first: a verdict naming each router that
needs a look, why, and when it started (from its history buckets over the
page's range), then the request chart following the page's time range, then
the problem cards (which say since when too), the proxy's own figures, and
the healthy rest. The verdict is filled out of band by /rows each poll; the
"Needs attention" and "Healthy routers" tiles it replaces are gone.

The request chart takes ?range= from the page; past a day its times carry the
day, and its clock is 24-hour (hourCycle h23).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:50:09 -04:00

50 lines
1.8 KiB
HTML

{# plugins/traefik/templates/traefik/index.html #}
{% extends "base.html" %}
{% block title %}Traefik — Steward{% endblock %}
{% block content %}
<div style="display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0.75rem;margin-bottom:1.5rem;">
<div style="display:flex;align-items:baseline;gap:1rem;">
<h1 class="page-title" style="margin-bottom:0;">Traefik Services</h1>
<span style="color:var(--text-muted);font-size:0.85rem;">polling every {{ poll_interval }}s</span>
</div>
<div style="display:flex;align-items:center;gap:0.75rem;flex-wrap:wrap;">
{% if session.user_role == 'admin' %}
<a href="/settings/thresholds/#traefik" class="btn btn-ghost btn-sm">Thresholds</a>
{% endif %}
{% include "_time_range.html" %}
</div>
</div>
{# State first (#5710): the verdict, which /rows fills out of band each poll;
then requests and 5xx over the page's range; then the routers. #}
<p class="page-verdict tone-muted" id="traefik-verdict">Reading routers…</p>
<div class="card" style="margin-bottom:1rem;">
<div id="traefik-chart"
hx-get="/plugins/traefik/widget/request_chart?wid=page"
hx-trigger="load, every 300s, rangeChange from:body"
hx-include="#time-range"
hx-swap="innerHTML">
</div>
</div>
<div id="traefik-rows"
hx-get="/plugins/traefik/rows"
hx-trigger="load, every {{ poll_interval }}s, rangeChange from:body"
hx-include="#time-range"
hx-swap="innerHTML">
</div>
{% if access_log_enabled %}
<div style="margin-top:1.5rem;">
<h2 class="section-title" style="margin-bottom:1rem;">Traffic Origin</h2>
<div id="traefik-traffic"
hx-get="/plugins/traefik/traffic"
hx-trigger="load, every {{ poll_interval }}s, rangeChange from:body"
hx-include="#time-range"
hx-swap="innerHTML">
</div>
</div>
{% endif %}
{% endblock %}