fix(demo): stop seeded widget background polling (#6980)

* fix(demo): stop seeded widget background polling

* docs(demo): clarify single-replica requirements

* fix: abort startup when auth secret generation fails

* docs: remove demo deployment changes from PR

* fix: scope demo polling changes
This commit is contained in:
Thomas authored and GitHub committed 2026-10-05 09:51:35 +02:00
1 parent a17845aa1c
commit 4dbe4343e5
10 files changed
+48 -19

No files matched your search

+2 -1
View File
@@ -12,7 +12,7 @@ import classes from "./component.module.css";
import { UmamiEventsContent } from "./umami-events-content";
import { getUmamiLayout } from "./umami-layout";
import { UmamiTopPagesContent, UmamiTopReferrersContent } from "./umami-top-list";
import { formatTimeFrameLabel, formatXLabel, umamiQueryOptions } from "./umami-utils";
import { formatTimeFrameLabel, formatXLabel, useUmamiQueryOptions } from "./umami-utils";
import type { TimeFrame } from "./umami-utils";
import { getUsableWidgetQueryData, isInitialWidgetQueryPending } from "../common/query-state";
import { WidgetQueryLoadingState } from "../common/query-state-indicator";
@@ -48,6 +48,7 @@ export function UmamiContent({
}: UmamiContentProps) {
const t = useI18n("widget.umami");
const locale = useCurrentIntlLocale();
const umamiQueryOptions = useUmamiQueryOptions();
const tickColor = "var(--mantine-color-dimmed)";
const statsQuery = clientApi.widget.umami.getVisitorStats.useQuery(
@@ -7,7 +7,7 @@ import type { UmamiMetricItem } from "@homarr/integrations/types";
import { useCurrentIntlLocale, useI18n } from "@homarr/translation/client";
import classes from "./component.module.css";
import { umamiQueryOptions } from "./umami-utils";
import { useUmamiQueryOptions } from "./umami-utils";
import { getUsableWidgetQueryData } from "../common/query-state";
interface UmamiTopListProps {
@@ -19,6 +19,7 @@ interface UmamiTopListProps {
export function UmamiTopPagesContent({ integrationIds, websiteId, timeFrame, limit }: UmamiTopListProps) {
const t = useI18n("widget.umami");
const umamiQueryOptions = useUmamiQueryOptions();
const data =
getUsableWidgetQueryData(
clientApi.widget.umami.getTopPages.useQuery(
@@ -31,6 +32,7 @@ export function UmamiTopPagesContent({ integrationIds, websiteId, timeFrame, lim
export function UmamiTopReferrersContent({ integrationIds, websiteId, timeFrame, limit }: UmamiTopListProps) {
const t = useI18n("widget.umami");
const umamiQueryOptions = useUmamiQueryOptions();
const data =
getUsableWidgetQueryData(
clientApi.widget.umami.getTopReferrers.useQuery(
+4 -1
View File
@@ -1,8 +1,11 @@
import type { useI18n } from "@homarr/translation/client";
import { useDemoReadOnly } from "../demo-read-only";
import { timeFrameValues } from "./index";
export const umamiQueryOptions = { refetchInterval: 60_000 } as const;
export const useUmamiQueryOptions = (): { refetchInterval: number | false } => ({
refetchInterval: useDemoReadOnly() ? false : 60_000,
});
export const EVENT_COLORS = ["blue.5", "orange.5", "green.5", "red.5", "violet.5", "teal.5", "yellow.5", "pink.5"];