The v1.69.0 caching refactor replaced Redis pub/sub with a global 30s client polling interval. Live monitoring widgets (health-monitoring, Dashdot, dns-hole) that previously refreshed every 5s were stuck at 30s. Adds refetchInterval?: number | null to WidgetDefinition: - number = poll every N seconds (e.g. 5 for live monitoring) - null = fetch on mount only, no background polling - undefined = use global 30s default 9 widgets set refetchInterval: 5 (live monitoring) 16 widgets set refetchInterval: null (slow data, mount-only) Removed inline refetchInterval from docker widget component. Fixes #6268
16 lines
538 B
TypeScript
16 lines
538 B
TypeScript
import { IconShieldLock } from "@tabler/icons-react";
|
|
|
|
import { getIntegrationKindsByCategory } from "@homarr/definitions";
|
|
|
|
import { createWidgetDefinition } from "../definition";
|
|
import { optionsBuilder } from "../options";
|
|
|
|
export const { componentLoader, definition } = createWidgetDefinition("vpn", {
|
|
icon: IconShieldLock,
|
|
refetchInterval: null,
|
|
createOptions() {
|
|
return optionsBuilder.from(() => ({}));
|
|
},
|
|
supportedIntegrations: getIntegrationKindsByCategory("vpn"),
|
|
}).withDynamicImport(() => import("./component"));
|