a7a281cb11
First-party plugins (host_agent, http, snmp, traefik, unifi, docker) are now tracked under plugins/ and baked into the image, so they version atomically with core — ending the cross-repo import drift the roundtable->steward rename exposed. History for these files is preserved in the archived Roundtable-plugins repo. Plugin discovery becomes multi-root: PLUGIN_DIR (single) -> PLUGIN_DIRS (bundled first, then external) + PLUGIN_INSTALL_DIR. Bundled ships in the image; third-party plugins still mount at runtime into the external root (STEWARD_PLUGIN_DIR, default /data/plugins) and downloads/installs land there. Bundled shadows external on a name collision. - config.py: load_bootstrap returns plugin_dirs + plugin_install_dir - app.py: iterate PLUGIN_DIRS at the migration + load sites - migration_runner.py: discover_all_in() unions every plugin root - plugin_manager.py: resolve_plugin_path() (pure, first-root-wins); load / install / hot-reload span all roots; installs target the external root - settings/routes.py: _discover_plugins scans all roots, dedup bundled-first - Dockerfile: COPY plugins/ ; docker-compose: drop host bind, document external - tests/test_plugin_dirs.py: resolution, multi-root discovery, bootstrap split Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
57 lines
2.2 KiB
HTML
57 lines
2.2 KiB
HTML
{# plugins/traefik/templates/traefik/widget.html #}
|
|
{% if expiring_certs %}
|
|
<div style="margin-bottom:0.6rem;">
|
|
{% for cert in expiring_certs %}
|
|
<div style="display:flex;justify-content:space-between;font-size:0.8rem;padding:0.15rem 0;
|
|
{% if cert.days_remaining < 7 %}color:var(--red);{% else %}color:var(--yellow);{% endif %}">
|
|
<span>⚠ {{ cert.cn }}</span>
|
|
<span>{{ cert.days_remaining | int }}d</span>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if router_data %}
|
|
{% for r in router_data %}
|
|
<div class="ping-row">
|
|
<div class="ping-meta">
|
|
<span class="ping-name" style="font-size:0.8rem;word-break:break-all;">{{ r.name }}</span>
|
|
</div>
|
|
<div style="flex:1;display:flex;gap:1.5rem;font-size:0.82rem;font-variant-numeric:tabular-nums;">
|
|
<span title="Requests/s">
|
|
<span style="color:var(--text-muted);">req/s</span>
|
|
<span style="margin-left:0.3rem;">{{ "%.2f"|format(r.latest.request_rate) }}</span>
|
|
</span>
|
|
<span title="Bandwidth">
|
|
<span style="color:var(--text-muted);">bw</span>
|
|
<span style="margin-left:0.3rem;">
|
|
{% set bps = r.latest.response_bytes_rate %}
|
|
{% if bps >= 1048576 %}{{ "%.1f"|format(bps / 1048576) }}MB/s
|
|
{% elif bps >= 1024 %}{{ "%.0f"|format(bps / 1024) }}KB/s
|
|
{% else %}{{ "%.0f"|format(bps) }}B/s{% endif %}
|
|
</span>
|
|
</span>
|
|
<span title="p95 latency">
|
|
<span style="color:var(--text-muted);">p95</span>
|
|
<span style="margin-left:0.3rem;
|
|
{% if r.latest.latency_p95_ms > 500 %}color:var(--red){% elif r.latest.latency_p95_ms > 200 %}color:var(--yellow){% else %}color:var(--green){% endif %};">
|
|
{{ "%.0f"|format(r.latest.latency_p95_ms) }}ms
|
|
</span>
|
|
</span>
|
|
{% if r.latest.error_rate_5xx_pct > 0 %}
|
|
<span title="5xx error rate">
|
|
<span style="color:var(--red);">{{ "%.1f"|format(r.latest.error_rate_5xx_pct) }}% 5xx</span>
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% if total_routers > 5 %}
|
|
<div style="color:var(--text-dim);font-size:0.75rem;padding:0.25rem 0;">
|
|
+{{ total_routers - 5 }} more — <a href="/plugins/traefik/">view all →</a>
|
|
</div>
|
|
{% endif %}
|
|
{% else %}
|
|
<p class="empty" style="padding:0.5rem 0;font-size:0.85rem;">No Traefik data yet.</p>
|
|
{% endif %}
|