fix(unifi): the Overview's history buckets on Postgres; devices name their state (#5207)
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 1m24s
CI / unit (push) Successful in 1m35s
CI / publish (push) Successful in 1m29s

#5207 "UniFi Overview tab: func.strftime is SQLite-only": the WAN and
client sparklines bucketed with strftime('%s'), which Postgres lacks, so
/plugins/unifi/rows failed. Traefik's date_bin bucket moves to
core/time_range.time_bucket and both plugins use it. Devices list offline
and failing first, and a state other than online is named (Upgrading,
Adopting, Heartbeat missed...) instead of drawn as Down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 17:28:19 -04:00
co-authored by Claude Opus 5.5
parent 46a301652b
commit ea31deabf9
6 changed files with 145 additions and 49 deletions
+7 -1
View File
@@ -50,7 +50,7 @@
{% for d in devices %}
<tr>
<td style="padding:0.2rem 0.5rem 0.2rem 0;">
{{ status_dot('up' if d.state == 1 else 'down') }}
{% set dot, label = device_state(d.state) %}{{ status_dot(dot, label) }}
<span style="margin-left:0.3rem;">{{ d.name or d.mac }}</span>
</td>
<td style="padding:0.2rem 0.3rem;color:var(--text-muted);font-size:0.78rem;">{{ d.model or d.device_type or "" }}</td>
@@ -62,6 +62,12 @@
up {{ d.uptime_seconds|duration }}
</td>
</tr>
{% elif d.state != 1 %}
<tr>
<td colspan="3" style="padding:0 0 0.3rem 1.2rem;color:var(--text-dim);font-size:0.75rem;">
{{ label }}
</td>
</tr>
{% endif %}
{% endfor %}
</table>