style: auto-fix lint and format
This commit is contained in:
1 parent
26a8d219af
commit
2cb0964aa2
5 files changed
+31
-7
No files matched your search
@@ -198,7 +198,12 @@ export function DockerTable({ containers, timestamp }: RouterOutputs["docker"]["
|
|||||||
mantineTableHeadCellProps: { style: { padding: "4px 8px" } },
|
mantineTableHeadCellProps: { style: { padding: "4px 8px" } },
|
||||||
renderRowActions: ({ row }: { row: MRT_Row<DockerContainer> }) => <ContainerRowMenu container={row.original} />,
|
renderRowActions: ({ row }: { row: MRT_Row<DockerContainer> }) => <ContainerRowMenu container={row.original} />,
|
||||||
renderTopToolbarCustomActions: () => (
|
renderTopToolbarCustomActions: () => (
|
||||||
<Button variant="default" rightSection={<IconRefresh size="1rem" />} onClick={() => mutate()} loading={isFetching}>
|
<Button
|
||||||
|
variant="default"
|
||||||
|
rightSection={<IconRefresh size="1rem" />}
|
||||||
|
onClick={() => mutate()}
|
||||||
|
loading={isFetching}
|
||||||
|
>
|
||||||
{tDocker("action.refresh.label")}
|
{tDocker("action.refresh.label")}
|
||||||
</Button>
|
</Button>
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -13,7 +13,13 @@ import { createTRPCRouter, publicProcedure } from "../../trpc";
|
|||||||
const firewallMiddleware = createManyIntegrationMiddleware("query", ...getIntegrationKindsByCategory("firewall"));
|
const firewallMiddleware = createManyIntegrationMiddleware("query", ...getIntegrationKindsByCategory("firewall"));
|
||||||
|
|
||||||
// ponytail: can't extract a generic factory here because each handler returns a different data type
|
// ponytail: can't extract a generic factory here because each handler returns a different data type
|
||||||
const queryFirewall = <THandler extends { handler: (integration: any, input: any) => { 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 }) =>
|
publicProcedure.concat(firewallMiddleware).query(async ({ ctx }) =>
|
||||||
settleIntegrationQueries(ctx.integrations, async (integration) => {
|
settleIntegrationQueries(ctx.integrations, async (integration) => {
|
||||||
const { data, timestamp } = await handler.handler(integration, {}).getDataAsync();
|
const { data, timestamp } = await handler.handler(integration, {}).getDataAsync();
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ export const healthMonitoringRouter = createTRPCRouter({
|
|||||||
.query(async ({ ctx }) => {
|
.query(async ({ ctx }) => {
|
||||||
return await settleIntegrationQueries(ctx.integrations, async (integration) => {
|
return await settleIntegrationQueries(ctx.integrations, async (integration) => {
|
||||||
const { data, timestamp } = await systemInfoRequestHandler.handler(integration, {}).getDataAsync();
|
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
|
getClusterHealthStatus: publicProcedure
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ export const mediaServerRouter = createTRPCRouter({
|
|||||||
.input(z.object({ showOnlyPlaying: z.boolean() }))
|
.input(z.object({ showOnlyPlaying: z.boolean() }))
|
||||||
.query(async ({ ctx, input }) => {
|
.query(async ({ ctx, input }) => {
|
||||||
return await settleIntegrationQueries(ctx.integrations, async (integration) => {
|
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 };
|
return { integrationId: integration.id, integrationKind: integration.kind, sessions: data };
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -30,9 +30,15 @@ export default function FirewallWidget({ integrationIds, width, itemId }: Widget
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const { data: firewallsCpuData = [] } = clientApi.widget.firewall.getFirewallCpuStatus.useQuery({ integrationIds });
|
const { data: firewallsCpuData = [] } = clientApi.widget.firewall.getFirewallCpuStatus.useQuery({ integrationIds });
|
||||||
const { data: firewallsMemoryData = [] } = clientApi.widget.firewall.getFirewallMemoryStatus.useQuery({ integrationIds });
|
const { data: firewallsMemoryData = [] } = clientApi.widget.firewall.getFirewallMemoryStatus.useQuery({
|
||||||
const { data: firewallsVersionData = [] } = clientApi.widget.firewall.getFirewallVersionStatus.useQuery({ integrationIds });
|
integrationIds,
|
||||||
const { data: firewallsInterfacesData = [] } = clientApi.widget.firewall.getFirewallInterfacesStatus.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 initialSelectedFirewall = firewallsVersionData[0] ? firewallsVersionData[0].integration.id : "undefined";
|
||||||
const isTiny = width < 256;
|
const isTiny = width < 256;
|
||||||
|
|||||||
Reference in new issue
Block a user