From 2cb0964aa237eacc97811ec0dab8935ac7a0bc46 Mon Sep 17 00:00:00 2001 From: ajnart <49837342+ajnart@users.noreply.github.com> Date: Thu, 25 Jun 2026 09:57:29 +0000 Subject: [PATCH] style: auto-fix lint and format --- .../[locale]/manage/tools/docker/docker-table.tsx | 7 ++++++- packages/api/src/router/widgets/firewall.ts | 8 +++++++- packages/api/src/router/widgets/health-monitoring.ts | 7 ++++++- packages/api/src/router/widgets/media-server.ts | 4 +++- packages/widgets/src/firewall/component.tsx | 12 +++++++++--- 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/apps/nextjs/src/app/[locale]/manage/tools/docker/docker-table.tsx b/apps/nextjs/src/app/[locale]/manage/tools/docker/docker-table.tsx index 03bc8f6a9..61f8d6136 100644 --- a/apps/nextjs/src/app/[locale]/manage/tools/docker/docker-table.tsx +++ b/apps/nextjs/src/app/[locale]/manage/tools/docker/docker-table.tsx @@ -198,7 +198,12 @@ export function DockerTable({ containers, timestamp }: RouterOutputs["docker"][" mantineTableHeadCellProps: { style: { padding: "4px 8px" } }, renderRowActions: ({ row }: { row: MRT_Row }) => , renderTopToolbarCustomActions: () => ( - ), diff --git a/packages/api/src/router/widgets/firewall.ts b/packages/api/src/router/widgets/firewall.ts index 6929a68b6..d4ef1b68e 100644 --- a/packages/api/src/router/widgets/firewall.ts +++ b/packages/api/src/router/widgets/firewall.ts @@ -13,7 +13,13 @@ import { createTRPCRouter, publicProcedure } from "../../trpc"; const firewallMiddleware = createManyIntegrationMiddleware("query", ...getIntegrationKindsByCategory("firewall")); // ponytail: can't extract a generic factory here because each handler returns a different data type -const queryFirewall = { getDataAsync: () => Promise<{ data: any; timestamp: Date }> } }>(handler: THandler) => +const queryFirewall = < + THandler extends { + handler: (integration: any, input: any) => { getDataAsync: () => Promise<{ data: any; timestamp: Date }> }; + }, +>( + handler: THandler, +) => publicProcedure.concat(firewallMiddleware).query(async ({ ctx }) => settleIntegrationQueries(ctx.integrations, async (integration) => { const { data, timestamp } = await handler.handler(integration, {}).getDataAsync(); diff --git a/packages/api/src/router/widgets/health-monitoring.ts b/packages/api/src/router/widgets/health-monitoring.ts index 990faa238..de49a1083 100644 --- a/packages/api/src/router/widgets/health-monitoring.ts +++ b/packages/api/src/router/widgets/health-monitoring.ts @@ -19,7 +19,12 @@ export const healthMonitoringRouter = createTRPCRouter({ .query(async ({ ctx }) => { return await settleIntegrationQueries(ctx.integrations, async (integration) => { const { data, timestamp } = await systemInfoRequestHandler.handler(integration, {}).getDataAsync(); - return { integrationId: integration.id, integrationName: integration.name, healthInfo: data, updatedAt: timestamp }; + return { + integrationId: integration.id, + integrationName: integration.name, + healthInfo: data, + updatedAt: timestamp, + }; }); }), getClusterHealthStatus: publicProcedure diff --git a/packages/api/src/router/widgets/media-server.ts b/packages/api/src/router/widgets/media-server.ts index e673cefac..3e3e64a4f 100644 --- a/packages/api/src/router/widgets/media-server.ts +++ b/packages/api/src/router/widgets/media-server.ts @@ -24,7 +24,9 @@ export const mediaServerRouter = createTRPCRouter({ .input(z.object({ showOnlyPlaying: z.boolean() })) .query(async ({ ctx, input }) => { return await settleIntegrationQueries(ctx.integrations, async (integration) => { - const { data } = await mediaServerRequestHandler.handler(integration, { showOnlyPlaying: input.showOnlyPlaying }).getDataAsync(); + const { data } = await mediaServerRequestHandler + .handler(integration, { showOnlyPlaying: input.showOnlyPlaying }) + .getDataAsync(); return { integrationId: integration.id, integrationKind: integration.kind, sessions: data }; }); }), diff --git a/packages/widgets/src/firewall/component.tsx b/packages/widgets/src/firewall/component.tsx index 90011d768..523eadd8d 100644 --- a/packages/widgets/src/firewall/component.tsx +++ b/packages/widgets/src/firewall/component.tsx @@ -30,9 +30,15 @@ export default function FirewallWidget({ integrationIds, width, itemId }: Widget }, []); const { data: firewallsCpuData = [] } = clientApi.widget.firewall.getFirewallCpuStatus.useQuery({ integrationIds }); - const { data: firewallsMemoryData = [] } = clientApi.widget.firewall.getFirewallMemoryStatus.useQuery({ integrationIds }); - const { data: firewallsVersionData = [] } = clientApi.widget.firewall.getFirewallVersionStatus.useQuery({ integrationIds }); - const { data: firewallsInterfacesData = [] } = clientApi.widget.firewall.getFirewallInterfacesStatus.useQuery({ integrationIds }); + const { data: firewallsMemoryData = [] } = clientApi.widget.firewall.getFirewallMemoryStatus.useQuery({ + integrationIds, + }); + const { data: firewallsVersionData = [] } = clientApi.widget.firewall.getFirewallVersionStatus.useQuery({ + integrationIds, + }); + const { data: firewallsInterfacesData = [] } = clientApi.widget.firewall.getFirewallInterfacesStatus.useQuery({ + integrationIds, + }); const initialSelectedFirewall = firewallsVersionData[0] ? firewallsVersionData[0].integration.id : "undefined"; const isTiny = width < 256;