Compare commits
24
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c1e72819a | ||
|
|
a0fb7553a5 | ||
|
|
a0034b2cfc | ||
|
|
4a297180fd | ||
|
|
5fa3a3313a | ||
|
|
29ee87c4aa | ||
|
|
94a247e24a | ||
|
|
6d37710fec | ||
|
|
c016beb2e5 | ||
|
|
f9e1b85c6a | ||
|
|
38ba19e665 | ||
|
|
f55c99d2d6 | ||
|
|
c5e8b83d8a | ||
|
|
d52d9cfed2 | ||
|
|
93325642aa | ||
|
|
165e94abbc | ||
|
|
2e3127e766 | ||
|
|
d37326d905 | ||
|
|
e51e39ff38 | ||
|
|
6c075b6d74 | ||
|
|
b2f63c6e0f | ||
|
|
8c2d73e8af | ||
|
|
1c0ff8930e | ||
|
|
e2b8355639 |
No files matched your search
@@ -167,7 +167,7 @@ jobs:
|
|||||||
- name: Cache Playwright browsers
|
- name: Cache Playwright browsers
|
||||||
if: '!env.ACT'
|
if: '!env.ACT'
|
||||||
id: playwright-cache
|
id: playwright-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/ms-playwright
|
path: ~/.cache/ms-playwright
|
||||||
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||||
@@ -185,7 +185,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload E2E artifacts
|
- name: Upload E2E artifacts
|
||||||
if: failure() && !env.ACT
|
if: failure() && !env.ACT
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: playwright-report
|
name: playwright-report
|
||||||
path: e2e/test-results/
|
path: e2e/test-results/
|
||||||
|
|||||||
+15
-3
@@ -1,4 +1,4 @@
|
|||||||
# syntax=docker/dockerfile:1.10
|
# syntax=docker/dockerfile:1.25
|
||||||
|
|
||||||
FROM node:24.18.0-alpine AS base
|
FROM node:24.18.0-alpine AS base
|
||||||
|
|
||||||
@@ -9,12 +9,24 @@ RUN apk add --no-cache libc6-compat curl bash && apk update
|
|||||||
RUN corepack enable pnpm
|
RUN corepack enable pnpm
|
||||||
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
||||||
COPY patches ./patches
|
COPY patches ./patches
|
||||||
|
# Workaround for pnpm/pnpm#5268: pnpm fetch crashes when patchedDependencies
|
||||||
|
# are configured with nodeLinker: hoisted. The applyPatchToDir function tries
|
||||||
|
# to chdir into node_modules/<pkg> which doesn't exist during fetch (only the
|
||||||
|
# content-addressable store is populated). By temporarily switching to the
|
||||||
|
# isolated linker, patches apply inside the virtual store (node_modules/.pnpm/...)
|
||||||
|
# which IS created by pnpm fetch. The original hoisted linker is restored
|
||||||
|
# before the install step so the final node_modules layout stays flat.
|
||||||
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
|
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
|
||||||
pnpm config set store-dir /pnpm/store && pnpm fetch
|
pnpm config set store-dir /pnpm/store && \
|
||||||
|
sed -i 's/nodeLinker: hoisted/nodeLinker: isolated/' pnpm-workspace.yaml && \
|
||||||
|
pnpm fetch && \
|
||||||
|
sed -i 's/nodeLinker: isolated/nodeLinker: hoisted/' pnpm-workspace.yaml
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
# Follow the pnpm fetch pattern from https://pnpm.io/cli/fetch
|
||||||
|
# --frozen-lockfile is omitted as recommended by the pnpm fetch docs
|
||||||
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
|
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
|
||||||
pnpm install --recursive --offline --frozen-lockfile
|
pnpm install --recursive
|
||||||
|
|
||||||
ARG SKIP_ENV_VALIDATION='true'
|
ARG SKIP_ENV_VALIDATION='true'
|
||||||
ARG CI='true'
|
ARG CI='true'
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import {
|
|||||||
queryCacheDefaultGcTimeMs,
|
queryCacheDefaultGcTimeMs,
|
||||||
queryCacheDefaultRefetchIntervalMs,
|
queryCacheDefaultRefetchIntervalMs,
|
||||||
queryCacheDefaultStaleTimeMs,
|
queryCacheDefaultStaleTimeMs,
|
||||||
|
widgetRefetchIntervalOverrides,
|
||||||
} from "@homarr/api/query-cache";
|
} from "@homarr/api/query-cache";
|
||||||
import { createHeadersCallbackForSource, getTrpcUrl } from "@homarr/api/shared";
|
import { createHeadersCallbackForSource, getTrpcUrl } from "@homarr/api/shared";
|
||||||
import { env } from "@homarr/common/env";
|
import { env } from "@homarr/common/env";
|
||||||
@@ -90,6 +91,9 @@ export function TRPCReactProvider(props: PropsWithChildren) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
client.setQueryDefaults([["widget"]], { refetchInterval: queryCacheDefaultRefetchIntervalMs });
|
client.setQueryDefaults([["widget"]], { refetchInterval: queryCacheDefaultRefetchIntervalMs });
|
||||||
|
for (const [path, interval] of Object.entries(widgetRefetchIntervalOverrides)) {
|
||||||
|
client.setQueryDefaults([path.split(".")], { refetchInterval: interval });
|
||||||
|
}
|
||||||
return client;
|
return client;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,44 @@ export const queryCacheMaxValueBytes = 1024 * 1024;
|
|||||||
export const queryCacheStoragePrefix = "homarr-widget-query";
|
export const queryCacheStoragePrefix = "homarr-widget-query";
|
||||||
export const queryCacheBuster = "v2-superjson";
|
export const queryCacheBuster = "v2-superjson";
|
||||||
|
|
||||||
|
export const widgetRefetchIntervalOverrides: Record<string, number> = {
|
||||||
|
"widget.healthMonitoring": 5_000,
|
||||||
|
"widget.dnsHole": 5_000,
|
||||||
|
"widget.downloads": 5_000,
|
||||||
|
"widget.mediaServer": 5_000,
|
||||||
|
"widget.tracearr": 5_000,
|
||||||
|
"widget.firewall.getFirewallCpuStatus": 5_000,
|
||||||
|
"widget.firewall.getFirewallMemoryStatus": 15_000,
|
||||||
|
"widget.firewall.getFirewallInterfacesStatus": 30_000,
|
||||||
|
"widget.firewall.getFirewallVersionStatus": 3_600_000,
|
||||||
|
"widget.anchorNotes": 15_000,
|
||||||
|
"widget.coolify": 30_000,
|
||||||
|
"widget.umami.getActiveVisitors": 30_000,
|
||||||
|
"widget.umami": 300_000,
|
||||||
|
"widget.calendar": 60_000,
|
||||||
|
"widget.mediaRequests": 60_000,
|
||||||
|
"widget.smartHome": 60_000,
|
||||||
|
"widget.ups": 60_000,
|
||||||
|
"widget.uptimeKuma": 60_000,
|
||||||
|
"widget.weather": 60_000,
|
||||||
|
"widget.timetable": 60_000,
|
||||||
|
"widget.indexerManager": 300_000,
|
||||||
|
"widget.mediaRelease": 300_000,
|
||||||
|
"widget.mediaTranscoding": 300_000,
|
||||||
|
"widget.networkController": 300_000,
|
||||||
|
"widget.notifications": 300_000,
|
||||||
|
"widget.rssFeed": 300_000,
|
||||||
|
"widget.stockPrice": 300_000,
|
||||||
|
"widget.minecraft": 300_000,
|
||||||
|
"widget.vpn": 300_000,
|
||||||
|
"widget.archiveTeamWarrior": 300_000,
|
||||||
|
"widget.audiobookshelf": 600_000,
|
||||||
|
"widget.navidrome": 600_000,
|
||||||
|
"widget.speedtestTracker": 600_000,
|
||||||
|
"widget.immich": 900_000,
|
||||||
|
"widget.paperlessNgx": 900_000,
|
||||||
|
};
|
||||||
|
|
||||||
let activeQueryCacheBoardId: string | null = null;
|
let activeQueryCacheBoardId: string | null = null;
|
||||||
|
|
||||||
export const setActiveQueryCacheBoardId = (boardId: string | null) => {
|
export const setActiveQueryCacheBoardId = (boardId: string | null) => {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export const anchorNotesListRequestHandler = createIntegrationRequestHandler<
|
|||||||
const instance = await createIntegrationAsync(integration);
|
const instance = await createIntegrationAsync(integration);
|
||||||
return instance.listNotesAsync(input);
|
return instance.listNotesAsync(input);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 15_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const anchorNoteRequestHandler = createIntegrationRequestHandler<AnchorNote, "anchor", { noteId: string }>({
|
export const anchorNoteRequestHandler = createIntegrationRequestHandler<AnchorNote, "anchor", { noteId: string }>({
|
||||||
@@ -19,4 +20,5 @@ export const anchorNoteRequestHandler = createIntegrationRequestHandler<AnchorNo
|
|||||||
const instance = await createIntegrationAsync(integration);
|
const instance = await createIntegrationAsync(integration);
|
||||||
return instance.getNoteAsync(input.noteId);
|
return instance.getNoteAsync(input.noteId);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 15_000,
|
||||||
});
|
});
|
||||||
@@ -13,4 +13,5 @@ export const archiveTeamWarriorRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getStatusAsync();
|
return await integrationInstance.getStatusAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
@@ -12,4 +12,5 @@ export const audiobookshelfRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getDashboardDataAsync();
|
return await integrationInstance.getDashboardDataAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 600_000,
|
||||||
});
|
});
|
||||||
@@ -23,4 +23,5 @@ export const calendarMonthRequestHandler = createIntegrationRequestHandler<
|
|||||||
input.showUnmonitored,
|
input.showUnmonitored,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 60_000,
|
||||||
});
|
});
|
||||||
@@ -12,4 +12,5 @@ export const coolifyRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getInstanceInfoAsync();
|
return await integrationInstance.getInstanceInfoAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 30_000,
|
||||||
});
|
});
|
||||||
@@ -13,4 +13,5 @@ export const dnsHoleRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getSummaryAsync();
|
return await integrationInstance.getSummaryAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 5_000,
|
||||||
});
|
});
|
||||||
@@ -177,6 +177,7 @@ export const dockerContainersRequestHandler = createWidgetRequestHandler({
|
|||||||
}
|
}
|
||||||
return await getContainersWithStatsAsync();
|
return await getContainersWithStatsAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 20_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
const extractImage = (container: ContainerInfo) => extractContainerImageName(container.Image);
|
const extractImage = (container: ContainerInfo) => extractContainerImageName(container.Image);
|
||||||
|
|||||||
@@ -13,4 +13,5 @@ export const downloadClientRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getClientJobsAndStatusAsync(input);
|
return await integrationInstance.getClientJobsAndStatusAsync(input);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 5_000,
|
||||||
});
|
});
|
||||||
@@ -69,4 +69,5 @@ export const duckDuckGoBangsRequestHandler = createRequestHandler({
|
|||||||
|
|
||||||
return normalized;
|
return normalized;
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 86_400_000,
|
||||||
});
|
});
|
||||||
@@ -18,6 +18,7 @@ export const firewallCpuRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return integrationInstance.getFirewallCpuAsync();
|
return integrationInstance.getFirewallCpuAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 5_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const firewallMemoryRequestHandler = createIntegrationRequestHandler<
|
export const firewallMemoryRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -29,6 +30,7 @@ export const firewallMemoryRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getFirewallMemoryAsync();
|
return await integrationInstance.getFirewallMemoryAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 15_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const firewallInterfacesRequestHandler = createIntegrationRequestHandler<
|
export const firewallInterfacesRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -40,6 +42,7 @@ export const firewallInterfacesRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getFirewallInterfacesAsync();
|
return await integrationInstance.getFirewallInterfacesAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 30_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const firewallVersionRequestHandler = createIntegrationRequestHandler<
|
export const firewallVersionRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -51,4 +54,5 @@ export const firewallVersionRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getFirewallVersionAsync();
|
return await integrationInstance.getFirewallVersionAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 3_600_000,
|
||||||
});
|
});
|
||||||
@@ -13,6 +13,7 @@ export const systemInfoRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getSystemInfoAsync();
|
return await integrationInstance.getSystemInfoAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 5_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const clusterInfoRequestHandler = createIntegrationRequestHandler<
|
export const clusterInfoRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -24,4 +25,5 @@ export const clusterInfoRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getClusterInfoAsync();
|
return await integrationInstance.getClusterInfoAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 5_000,
|
||||||
});
|
});
|
||||||
@@ -13,6 +13,7 @@ export const immichStatsRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getServerStatsAsync();
|
return await integrationInstance.getServerStatsAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 900_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const immichAlbumsRequestHandler = createIntegrationRequestHandler<
|
export const immichAlbumsRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -28,6 +29,7 @@ export const immichAlbumsRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getAlbumsAsync();
|
return await integrationInstance.getAlbumsAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 900_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const immichAlbumRequestHandler = createIntegrationRequestHandler<
|
export const immichAlbumRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -39,4 +41,5 @@ export const immichAlbumRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getAlbumAsync(input.albumId);
|
return await integrationInstance.getAlbumAsync(input.albumId);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 900_000,
|
||||||
});
|
});
|
||||||
@@ -13,4 +13,5 @@ export const indexerManagerRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getIndexersAsync();
|
return await integrationInstance.getIndexersAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
@@ -2,6 +2,7 @@ import { createRequestHandler } from "./request-handler";
|
|||||||
|
|
||||||
interface Options<TData, TInput extends Record<string, unknown>> {
|
interface Options<TData, TInput extends Record<string, unknown>> {
|
||||||
requestAsync: (input: TInput) => Promise<TData>;
|
requestAsync: (input: TInput) => Promise<TData>;
|
||||||
|
cacheTtlMs?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createWidgetRequestHandler = <TData, TInput extends Record<string, unknown>>(
|
export const createWidgetRequestHandler = <TData, TInput extends Record<string, unknown>>(
|
||||||
@@ -10,5 +11,6 @@ export const createWidgetRequestHandler = <TData, TInput extends Record<string,
|
|||||||
handler: (widgetOptions: TInput) =>
|
handler: (widgetOptions: TInput) =>
|
||||||
createRequestHandler<TData, TInput>({
|
createRequestHandler<TData, TInput>({
|
||||||
requestAsync: options.requestAsync,
|
requestAsync: options.requestAsync,
|
||||||
|
cacheTtlMs: options.cacheTtlMs,
|
||||||
}).handler(widgetOptions),
|
}).handler(widgetOptions),
|
||||||
});
|
});
|
||||||
@@ -13,4 +13,5 @@ export const mediaReleaseRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getMediaReleasesAsync();
|
return await integrationInstance.getMediaReleasesAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
@@ -16,4 +16,5 @@ export const mediaRequestStatsRequestHandler = createIntegrationRequestHandler<
|
|||||||
users: await integrationInstance.getUsersAsync(),
|
users: await integrationInstance.getUsersAsync(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 60_000,
|
||||||
});
|
});
|
||||||
@@ -15,4 +15,5 @@ export const mediaServerRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getCurrentSessionsAsync({ showOnlyPlaying: input.showOnlyPlaying });
|
return await integrationInstance.getCurrentSessionsAsync({ showOnlyPlaying: input.showOnlyPlaying });
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 5_000,
|
||||||
});
|
});
|
||||||
@@ -17,6 +17,7 @@ export const mediaTranscodingRequestHandler = createIntegrationRequestHandler<
|
|||||||
statistics: await integrationInstance.getStatisticsAsync(),
|
statistics: await integrationInstance.getStatisticsAsync(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export interface MediaTranscoding {
|
export interface MediaTranscoding {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export const minecraftServerStatusRequestHandler = createWidgetRequestHandler({
|
|||||||
);
|
);
|
||||||
return responseSchema.parse(await response.json());
|
return responseSchema.parse(await response.json());
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
const responseSchema = z
|
const responseSchema = z
|
||||||
|
|||||||
@@ -12,4 +12,5 @@ export const navidromeRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getDashboardDataAsync();
|
return await integrationInstance.getDashboardDataAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 600_000,
|
||||||
});
|
});
|
||||||
@@ -13,4 +13,5 @@ export const networkControllerRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getNetworkSummaryAsync();
|
return await integrationInstance.getNetworkSummaryAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
@@ -13,4 +13,5 @@ export const notificationsRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getNotificationsAsync();
|
return await integrationInstance.getNotificationsAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
@@ -12,4 +12,5 @@ export const paperlessNgxStatsRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getStatsAsync();
|
return await integrationInstance.getStatsAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 900_000,
|
||||||
});
|
});
|
||||||
@@ -28,6 +28,7 @@ export const rssFeedsRequestHandler = createWidgetRequestHandler({
|
|||||||
entries: result.entries?.map((entry) => ({ ...entry, feedUrl: input.url })).slice(0, input.count) ?? [],
|
entries: result.entries?.map((entry) => ({ ...entry, feedUrl: input.url })).slice(0, input.count) ?? [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
const attemptGetImageFromEntry = (feedUrl: string, entry: object) => {
|
const attemptGetImageFromEntry = (feedUrl: string, entry: object) => {
|
||||||
|
|||||||
@@ -18,4 +18,5 @@ export const smartHomeEntityStateRequestHandler = createIntegrationRequestHandle
|
|||||||
|
|
||||||
return result.data.state;
|
return result.data.state;
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 60_000,
|
||||||
});
|
});
|
||||||
@@ -12,4 +12,5 @@ export const speedtestTrackerRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getDashboardDataAsync();
|
return await integrationInstance.getDashboardDataAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 600_000,
|
||||||
});
|
});
|
||||||
@@ -39,6 +39,7 @@ export const fetchStockPriceHandler = createWidgetRequestHandler({
|
|||||||
shortName: firstResult.meta.shortName,
|
shortName: firstResult.meta.shortName,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataSchema = z
|
const dataSchema = z
|
||||||
|
|||||||
@@ -12,4 +12,5 @@ export const tracearrRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getDashboardDataAsync();
|
return await integrationInstance.getDashboardDataAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 5_000,
|
||||||
});
|
});
|
||||||
@@ -12,6 +12,7 @@ export const umamiRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getVisitorStatsAsync(input.websiteId, input.timeFrame, input.eventName);
|
return await integrationInstance.getVisitorStatsAsync(input.websiteId, input.timeFrame, input.eventName);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const umamiEventNamesRequestHandler = createIntegrationRequestHandler<string[], "umami", { websiteId: string }>({
|
export const umamiEventNamesRequestHandler = createIntegrationRequestHandler<string[], "umami", { websiteId: string }>({
|
||||||
@@ -19,6 +20,7 @@ export const umamiEventNamesRequestHandler = createIntegrationRequestHandler<str
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getEventNamesAsync(input.websiteId);
|
return await integrationInstance.getEventNamesAsync(input.websiteId);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const umamiTopPagesRequestHandler = createIntegrationRequestHandler<
|
export const umamiTopPagesRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -30,6 +32,7 @@ export const umamiTopPagesRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getTopPagesAsync(input.websiteId, input.timeFrame, input.limit);
|
return await integrationInstance.getTopPagesAsync(input.websiteId, input.timeFrame, input.limit);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const umamiTopReferrersRequestHandler = createIntegrationRequestHandler<
|
export const umamiTopReferrersRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -41,6 +44,7 @@ export const umamiTopReferrersRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getTopReferrersAsync(input.websiteId, input.timeFrame, input.limit);
|
return await integrationInstance.getTopReferrersAsync(input.websiteId, input.timeFrame, input.limit);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const umamiMultiEventRequestHandler = createIntegrationRequestHandler<
|
export const umamiMultiEventRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -52,6 +56,7 @@ export const umamiMultiEventRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getMultiEventTimeSeriesAsync(input.websiteId, input.timeFrame, input.eventNames);
|
return await integrationInstance.getMultiEventTimeSeriesAsync(input.websiteId, input.timeFrame, input.eventNames);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const umamiActiveVisitorsRequestHandler = createIntegrationRequestHandler<
|
export const umamiActiveVisitorsRequestHandler = createIntegrationRequestHandler<
|
||||||
@@ -63,4 +68,5 @@ export const umamiActiveVisitorsRequestHandler = createIntegrationRequestHandler
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getActiveVisitorsAsync(input.websiteId);
|
return await integrationInstance.getActiveVisitorsAsync(input.websiteId);
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 30_000,
|
||||||
});
|
});
|
||||||
@@ -13,4 +13,5 @@ export const upsSummariesRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getUpsSummariesAsync();
|
return await integrationInstance.getUpsSummariesAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 60_000,
|
||||||
});
|
});
|
||||||
@@ -12,4 +12,5 @@ export const uptimeKumaRequestHandler = createIntegrationRequestHandler<
|
|||||||
const integrationInstance = await createIntegrationAsync(integration);
|
const integrationInstance = await createIntegrationAsync(integration);
|
||||||
return await integrationInstance.getDashboardDataAsync();
|
return await integrationInstance.getDashboardDataAsync();
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 60_000,
|
||||||
});
|
});
|
||||||
@@ -25,4 +25,5 @@ export const vpnSummaryHandler = createIntegrationRequestHandler<
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 300_000,
|
||||||
});
|
});
|
||||||
@@ -31,6 +31,7 @@ export const weatherRequestHandler = createWidgetRequestHandler({
|
|||||||
}),
|
}),
|
||||||
} satisfies Weather;
|
} satisfies Weather;
|
||||||
},
|
},
|
||||||
|
cacheTtlMs: 60_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
const atLocationOutput = z.object({
|
const atLocationOutput = z.object({
|
||||||
|
|||||||
@@ -184,12 +184,8 @@ export default function DockerWidget({ options, width, isEditMode }: WidgetCompo
|
|||||||
const t = useScopedI18n("docker");
|
const t = useScopedI18n("docker");
|
||||||
const isTiny = width <= 256;
|
const isTiny = width <= 256;
|
||||||
|
|
||||||
const {
|
const { data, refetch, isFetching } = clientApi.docker.getContainers.useQuery(undefined, {
|
||||||
data,
|
refetchInterval: 20_000,
|
||||||
refetch,
|
|
||||||
isFetching,
|
|
||||||
} = clientApi.docker.getContainers.useQuery(undefined, {
|
|
||||||
refetchInterval: 30_000,
|
|
||||||
});
|
});
|
||||||
const containers = data?.containers ?? [];
|
const containers = data?.containers ?? [];
|
||||||
const timestamp = useMemo(() => data?.timestamp ?? new Date(), [data?.timestamp]);
|
const timestamp = useMemo(() => data?.timestamp ?? new Date(), [data?.timestamp]);
|
||||||
@@ -304,9 +300,7 @@ export default function DockerWidget({ options, width, isEditMode }: WidgetCompo
|
|||||||
{t("table.totalMemory", { memory: formatBytes(totals.memory) })}
|
{t("table.totalMemory", { memory: formatBytes(totals.memory) })}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Tooltip
|
<Tooltip label={t("table.refresh.lastUpdated", { when: relativeTime })}>
|
||||||
label={t("table.refresh.lastUpdated", { when: relativeTime })}
|
|
||||||
>
|
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="transparent"
|
variant="transparent"
|
||||||
|
|||||||
Generated
+564
-642
File diff suppressed because it is too large.
Load diff
+12
-12
@@ -18,7 +18,7 @@ catalog:
|
|||||||
"@gitbeaker/rest": ^43.8.0
|
"@gitbeaker/rest": ^43.8.0
|
||||||
"@homarr/gridstack": ^1.12.0
|
"@homarr/gridstack": ^1.12.0
|
||||||
"@homarr/node-unifi": ^2.6.0
|
"@homarr/node-unifi": ^2.6.0
|
||||||
"@immich/sdk": ^3.0.1
|
"@immich/sdk": ^3.0.2
|
||||||
"@jellyfin/sdk": ^0.13.0
|
"@jellyfin/sdk": ^0.13.0
|
||||||
"@kubernetes/client-node": ^1.4.0
|
"@kubernetes/client-node": ^1.4.0
|
||||||
"@modelcontextprotocol/sdk": 1.29.0
|
"@modelcontextprotocol/sdk": 1.29.0
|
||||||
@@ -93,11 +93,11 @@ catalog:
|
|||||||
"@types/video.js": ^7.3.58
|
"@types/video.js": ^7.3.58
|
||||||
"@types/ws": ^8.18.1
|
"@types/ws": ^8.18.1
|
||||||
"@types/xml2js": ^0.4.14
|
"@types/xml2js": ^0.4.14
|
||||||
posthog-js: ^1.398.2
|
posthog-js: ^1.399.0
|
||||||
posthog-node: ^5.39.2
|
posthog-node: ^5.40.0
|
||||||
"@vitejs/plugin-react": ^6.0.3
|
"@vitejs/plugin-react": ^6.0.3
|
||||||
"@vitest/coverage-v8": ^4.1.9
|
"@vitest/coverage-v8": ^4.1.10
|
||||||
"@vitest/ui": ^4.1.9
|
"@vitest/ui": ^4.1.10
|
||||||
"@xterm/addon-canvas": ^0.7.0
|
"@xterm/addon-canvas": ^0.7.0
|
||||||
"@xterm/addon-fit": 0.11.0
|
"@xterm/addon-fit": 0.11.0
|
||||||
"@xterm/xterm": ^6.0.0
|
"@xterm/xterm": ^6.0.0
|
||||||
@@ -139,20 +139,20 @@ catalog:
|
|||||||
jsonpath-plus: ^10.4.0
|
jsonpath-plus: ^10.4.0
|
||||||
ldapts: 8.1.8
|
ldapts: 8.1.8
|
||||||
lodash.clonedeep: ^4.5.0
|
lodash.clonedeep: ^4.5.0
|
||||||
lucide-react: ^1.23.0
|
lucide-react: ^1.24.0
|
||||||
"mantine-contextmenu": ^9.3.1
|
"mantine-contextmenu": ^9.3.1
|
||||||
mantine-datatable: ^9.3.1
|
mantine-datatable: ^9.3.1
|
||||||
mantine-react-table: npm:mantine-react-table-open@9.0.3
|
mantine-react-table: npm:mantine-react-table-open@9.0.3
|
||||||
mcp-handler: ^1.1.0
|
mcp-handler: ^1.1.0
|
||||||
maria2: ^0.4.1
|
maria2: ^0.4.1
|
||||||
mysql2: 3.22.5
|
mysql2: 3.22.6
|
||||||
next: 16.2.10
|
next: 16.2.10
|
||||||
next-auth: 5.0.0-beta.31
|
next-auth: 5.0.0-beta.31
|
||||||
next-intl: 4.13.1
|
next-intl: 4.13.1
|
||||||
node-loader: ^2.1.0
|
node-loader: ^2.1.0
|
||||||
octokit: ^5.0.5
|
octokit: ^5.0.5
|
||||||
oxfmt: ^0.58.0
|
oxfmt: ^0.58.0
|
||||||
oxlint: ^1.72.0
|
oxlint: ^1.73.0
|
||||||
pg: ^8.22.0
|
pg: ^8.22.0
|
||||||
postcss-preset-mantine: ^1.18.0
|
postcss-preset-mantine: ^1.18.0
|
||||||
prismjs: ^1.30.0
|
prismjs: ^1.30.0
|
||||||
@@ -177,13 +177,13 @@ catalog:
|
|||||||
tsdav: ^2.3.0
|
tsdav: ^2.3.0
|
||||||
tsx: 4.20.4
|
tsx: 4.20.4
|
||||||
turbo: ^2.10.4
|
turbo: ^2.10.4
|
||||||
typescript: ^6.0.3
|
typescript: "npm:@typescript/typescript6@^6.0.2"
|
||||||
vite: ^8.1.2
|
vite: ^8.1.4
|
||||||
undici: 7.28.0
|
undici: 7.28.0
|
||||||
use-deep-compare-effect: ^1.8.1
|
use-deep-compare-effect: ^1.8.1
|
||||||
video.js: ^8.23.9
|
video.js: ^8.23.9
|
||||||
vite-tsconfig-paths: ^6.1.1
|
vite-tsconfig-paths: ^6.1.1
|
||||||
vitest: ^4.1.9
|
vitest: ^4.1.10
|
||||||
winston: 3.19.0
|
winston: 3.19.0
|
||||||
ws: ^8.21.0
|
ws: ^8.21.0
|
||||||
xml2js: ^0.6.2
|
xml2js: ^0.6.2
|
||||||
@@ -229,7 +229,7 @@ overrides:
|
|||||||
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.3"
|
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.3"
|
||||||
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.3"
|
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.3"
|
||||||
"tmp@<=0.2.3": ">=0.2.7"
|
"tmp@<=0.2.3": ">=0.2.7"
|
||||||
"vite@>=5.0.0 <=5.4.18": ">=8.1.3"
|
"vite@>=5.0.0 <=5.4.18": ">=8.1.4"
|
||||||
patchedDependencies:
|
patchedDependencies:
|
||||||
"@types/node-unifi": "patches/@types__node-unifi.patch"
|
"@types/node-unifi": "patches/@types__node-unifi.patch"
|
||||||
"trpc-to-openapi": "patches/trpc-to-openapi.patch"
|
"trpc-to-openapi": "patches/trpc-to-openapi.patch"
|
||||||
|
|||||||
Reference in new issue
Block a user