Просмотр исходного кода

fix(overview): apply first/last seen to the SSE device snapshot (#1111)

The overview wrote the seen marks but never applied them to its own
device list, so the live table (fed by the SSE snapshot) rendered a
dash for every client even though the REST endpoint had the data (only
the detail paths applied it). The overview now applies device_seen like
the detail endpoints do.

closes #1095
Nacho 2 месяцев назад
Родитель
Сommit
8ff1a0abdf
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      server-go/internal/adapters/live.go

+ 4 - 0
server-go/internal/adapters/live.go

@@ -2981,6 +2981,10 @@ func (l *Live) buildOverview(ctx context.Context) (*Overview, error) {
 	l.trackDevicePresence(devices, time.Now().UnixMilli())
 	// #954: first/last seen persistente de TODOS los clientes online.
 	l.noteDevicesSeen(devices, time.Now().UnixMilli())
+	// #1095: el overview (snapshot SSE del que vive la tabla de clientes)
+	// escribía las marcas pero NUNCA las aplicaba: la UI en vivo mostraba
+	// "—" aunque la API REST las tuviera (sólo los detalles las aplicaban).
+	l.applyDeviceSeen(devices)
 	// Clientes reales por router (atribución wireless/FDB, no leases)
 	countClientsPerRouter(routerList, devices)
 	// Sparkline de la tarjeta para fuentes sin throughput bps (switch beacon/