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>
57 lines
2.1 KiB
HTML
57 lines
2.1 KiB
HTML
{# plugins/unifi/templates/unifi/security.html #}
|
|
<div style="column-width:340px;column-count:2;column-gap:1rem;">
|
|
|
|
{# Active alarms #}
|
|
<div class="card" style="break-inside:avoid;margin-bottom:1rem;">
|
|
<div class="section-title" style="margin-bottom:0.75rem;">
|
|
Active Alarms
|
|
{% if active_alarms %}
|
|
<span class="count-badge" style="float:right;">{{ active_alarms|length }}</span>
|
|
{% endif %}
|
|
</div>
|
|
{% if not active_alarms %}
|
|
<p style="color:var(--green);font-size:0.88rem;">✓ No active alarms</p>
|
|
{% else %}
|
|
<table class="table" style="width:100%;font-size:0.82rem;">
|
|
{% for al in active_alarms %}
|
|
<tr>
|
|
<td style="padding:0.3rem 0.5rem 0.3rem 0;">
|
|
<div style="color:var(--red);font-size:0.78rem;margin-bottom:0.1rem;">
|
|
⚠ {{ al.alarm_key }}
|
|
</div>
|
|
<div>{{ al.message }}</div>
|
|
<div style="color:var(--text-dim);font-size:0.75rem;margin-top:0.1rem;">
|
|
{{ al.alarm_time.strftime("%Y-%m-%d %H:%M") }} UTC
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{# Recent archived alarms #}
|
|
{% if archived_alarms %}
|
|
<div class="card" style="break-inside:avoid;margin-bottom:1rem;">
|
|
<div class="section-title" style="margin-bottom:0.75rem;">
|
|
Recent Archived Alarms
|
|
<span style="float:right;font-weight:normal;font-size:0.78rem;color:var(--text-dim);">last {{ archived_alarms|length }}</span>
|
|
</div>
|
|
<table class="table" style="width:100%;font-size:0.82rem;">
|
|
{% for al in archived_alarms %}
|
|
<tr>
|
|
<td style="padding:0.25rem 0.5rem 0.25rem 0;">
|
|
<div style="color:var(--text-muted);font-size:0.78rem;">{{ al.alarm_key }}</div>
|
|
<div style="color:var(--text-dim);font-size:0.8rem;">{{ al.message }}</div>
|
|
</td>
|
|
<td style="padding:0.25rem 0;text-align:right;color:var(--text-dim);font-size:0.75rem;white-space:nowrap;">
|
|
{{ al.alarm_time.strftime("%m-%d %H:%M") }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|