Files
bvandeusenandClaude Opus 5.5 414c942cbf
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 1m5s
CI / unit (push) Successful in 1m19s
CI / publish (push) Successful in 57s
feat(plugins): Traefik problems first, UniFi/SNMP/fleet on shared shapes, audit names its entities, templates on tokens (#5126)
Traefik: routers are graded from their latest scrape (router_state: crit on
any real 5xx share, warn on p95 past the latency critical cutoff or a high
4xx share). Failing and slow routers lead as cards that say why; healthy
ones fold into one table that stays open or shut across polls. Proxy
counts are stat tiles; certificates are graded by Settings -> Thresholds
(tls_days).

UniFi: WAN health is a stat strip (latency graded by the thresholds),
devices carry status dots, event categories and firewall actions are
badges, the alarm count reuses .count-badge (renamed from .nav-count).
SNMP: each device wears a status badge and its readings are stat tiles.

Agent fleet: the table comes first, with a Status column (Reporting /
Silent / Never reported, by the host page's stale_after_seconds), silent
agents first, hosts linked, last seen as |ago.

Audit: entries name their entity (one query per type, steward/audit/
service.py) and link it; something deleted since keeps the name its entry
recorded and says "(deleted)".

Tokens: charts read colours through chart-colors.js (stewardColor resolves
a token to the rgb the browser computed; Chart.js defaults take the page's
text and border colours), so host, history, Traefik and SNMP charts drop
their hex. Template hex colours reach 0 (HEX_CEILING = 0), the last rgba
pills go, and heavy weights (600/700/bold, 60 of them) become 500, the
house pair being 400/500; a guard keeps templates there.

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

57 lines
2.9 KiB
HTML

{#- How to point an AI client at /mcp. `mcp_url` is the endpoint; `token` is the
raw token on the page that just created one, else a placeholder. -#}
{% set tok = token or "stw_…your token…" %}
{% set pre = "background:var(--bg);padding:0.75rem;border-radius:4px;overflow-x:auto;font-size:0.78rem;color:var(--text);margin:0.5rem 0 0;white-space:pre;" %}
<div class="card" id="connect">
<div class="section-title" style="margin-bottom:0.5rem;">Connect a client</div>
<div style="font-size:0.85rem;color:var(--text-muted);line-height:1.55;margin-bottom:0.75rem;">
Steward's MCP endpoint. Clients send the token as
<code>Authorization: Bearer …</code> on every request.
</div>
<div style="display:flex;gap:0.5rem;align-items:center;margin-bottom:1rem;">
<input type="text" id="mcp-url" value="{{ mcp_url }}" readonly aria-label="MCP endpoint URL"
style="flex:1;font-family:ui-monospace,monospace;font-size:0.8rem;background:var(--bg);color:var(--text);">
<button type="button" class="btn btn-ghost btn-sm" style="white-space:nowrap;"
onclick="navigator.clipboard.writeText(document.getElementById('mcp-url').value).then(()=>this.textContent='Copied')">Copy</button>
</div>
<details open>
<summary style="cursor:pointer;font-weight:500;">Claude Code</summary>
<pre style="{{ pre }}">claude mcp add --transport http steward {{ mcp_url }} \
--header "Authorization: Bearer {{ tok }}"</pre>
</details>
<details style="margin-top:0.75rem;">
<summary style="cursor:pointer;font-weight:500;">Claude Desktop</summary>
<div style="font-size:0.8rem;color:var(--text-muted);margin-top:0.4rem;line-height:1.5;">
Add to <code>claude_desktop_config.json</code>. It bridges through
<code>mcp-remote</code>, which needs Node.js.
</div>
<pre style="{{ pre }}">{
"mcpServers": {
"steward": {
"command": "npx",
"args": ["mcp-remote", "{{ mcp_url }}",
"--header", "Authorization:${STEWARD_AUTH}"],
"env": { "STEWARD_AUTH": "Bearer {{ tok }}" }
}
}
}</pre>
</details>
<details style="margin-top:0.75rem;">
<summary style="cursor:pointer;font-weight:500;">Open WebUI and other clients</summary>
<div style="font-size:0.8rem;color:var(--text-muted);margin-top:0.4rem;line-height:1.5;">
Add an MCP server using the <strong>Streamable HTTP</strong> transport, with the URL
above and bearer authentication set to the token. In Open WebUI this is an external
tool connection of type MCP; menu names vary between versions.
</div>
</details>
<div style="font-size:0.78rem;color:var(--text-muted);margin-top:1rem;line-height:1.5;">
Behind a reverse proxy, the URL above comes from <strong>Settings → General → Public
base URL</strong> when it is set. The proxy must pass the <code>Authorization</code>
header through and not buffer responses, since replies stream.
</div>
</div>