feat: Tracearr integration (#5060)

This commit is contained in:
StrandedTurtle authored and GitHub committed 2026-03-13 19:19:43 +01:00
1 parent d3c2ad134f
commit f68600150a
22 files changed
+1095 -3

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import dayjs from "dayjs";
import { createIntegrationAsync } from "@homarr/integrations";
import type { TracearrDashboardData } from "@homarr/integrations/types";
import { createCachedIntegrationRequestHandler } from "./lib/cached-integration-request-handler";
export const tracearrRequestHandler = createCachedIntegrationRequestHandler<
TracearrDashboardData,
"tracearr",
Record<string, never>
>({
async requestAsync(integration, _input) {
const integrationInstance = await createIntegrationAsync(integration);
return await integrationInstance.getDashboardDataAsync();
},
cacheDuration: dayjs.duration(5, "seconds"),
queryKey: "tracearrDashboard",
});