{# plugins/unifi/templates/unifi/rows.html #}
{# ── WAN health bar ───────────────────────────────────────────────────────── #}
{% if latest_wan %}
{# Client summary card #}
{% if latest_clients %}
Clients
{{ sparkline_clients | safe }}
{{ latest_clients.total_clients }}
total
{{ latest_clients.wireless_clients }}↗ wireless
{{ latest_clients.wired_clients }}↔ wired
{% if latest_clients.guest_clients %} {{ latest_clients.guest_clients }} guest{% endif %}
{% endif %}
{# Infrastructure devices card #}
{% if devices %}
Infrastructure Devices
{% for d in devices %}
|
●
{{ d.name or d.mac }}
|
{{ d.model or d.device_type or "" }} |
{{ d.ip or "" }} |
{% if d.state == 1 and d.uptime_seconds %}
|
up {{ (d.uptime_seconds // 86400) }}d {{ ((d.uptime_seconds % 86400) // 3600) }}h
|
{% endif %}
{% endfor %}
{% endif %}
{# Top talkers card #}
{% if top_clients %}
Top Talkers
{% for c in top_clients %}
|
{{ c.hostname }}
{% if c.type == "wireless" and c.signal %}
{{ c.signal }}dBm
{% endif %}
|
{% set rx = c.rx_rate %}{% set tx = c.tx_rate %}
↓
{% if rx >= 1048576 %}{{ "%.1f"|format(rx/1048576) }}M
{% elif rx >= 1024 %}{{ "%.0f"|format(rx/1024) }}K
{% else %}{{ "%.0f"|format(rx) }}B{% endif %}
↑
{% if tx >= 1048576 %}{{ "%.1f"|format(tx/1048576) }}M
{% elif tx >= 1024 %}{{ "%.0f"|format(tx/1024) }}K
{% else %}{{ "%.0f"|format(tx) }}B{% endif %}
|
{% endfor %}
{% endif %}
{# WLAN SSIDs card #}
{% if wlan_latest %}
Wireless Networks
| SSID |
Clients |
Score |
{% for w in wlan_latest %}
| {{ w.ssid }} |
{{ w.num_sta }} |
{% if w.satisfaction is not none %}{{ w.satisfaction }}%{% else %}—{% endif %}
|
{% endfor %}
{% endif %}
{# Speedtest card #}
{% if speedtest %}
Last Speed Test
{% if speedtest.download_mbps is not none %}
↓ DL
{{ "%.1f"|format(speedtest.download_mbps) }}
Mbps
{% endif %}
{% if speedtest.upload_mbps is not none %}
↑ UL
{{ "%.1f"|format(speedtest.upload_mbps) }}
Mbps
{% endif %}
{% if speedtest.latency_ms is not none %}
Latency
{{ "%.0f"|format(speedtest.latency_ms) }}ms
{% endif %}
{% if speedtest.server_name %}
via {{ speedtest.server_name }}
{% endif %}
{{ speedtest.run_at.strftime("%Y-%m-%d %H:%M") }} UTC
{% endif %}
{% if not latest_wan and not devices %}