feat(beszel): wire live SSE streaming for 1-minute time period
Add "Live" option to time period selector that uses the existing subscribeSystemStats tRPC subscription (PocketBase SSE) instead of REST polling. A useLiveStats hook accumulates incoming data points in a 60-entry rolling buffer. Charts use HH:mm:ss timestamps in live mode.
This commit is contained in:
3 files changed
+62
-13
No files matched your search
@@ -4,6 +4,7 @@ import { createWidgetDefinition } from "../definition";
|
||||
import { optionsBuilder } from "../options";
|
||||
|
||||
const timePeriodOptions = [
|
||||
{ value: "1m", label: "Live" },
|
||||
{ value: "1h", label: "1 Hour" },
|
||||
{ value: "12h", label: "12 Hours" },
|
||||
{ value: "24h", label: "24 Hours" },
|
||||
|
||||
Reference in new issue
Block a user