Files
Checkmate/client/src/Pages/Logs/TabDiagnostics.tsx
T

24 lines
684 B
TypeScript
Raw Normal View History

2026-02-06 18:20:26 +00:00
import Stack from "@mui/material/Stack";
2026-02-06 18:56:10 +00:00
import { Stats } from "@/Pages/Logs/components/Stats";
import { StatGauges } from "@/Pages/Logs/components/StatGauges";
2026-02-06 18:20:26 +00:00
import { useTheme } from "@mui/material";
import { useGet } from "@/Hooks/UseApi";
import type { Diagnostics } from "@/Types/Diagnostics";
2026-02-05 20:23:04 +00:00
export const TabDiagnostics = () => {
2026-02-06 18:20:26 +00:00
const theme = useTheme();
const {
data: diagnostics,
2026-02-06 18:46:06 +00:00
isLoading: _isLoading,
error: _error,
refetch: _refetch,
} = useGet<Diagnostics>("/diagnostic/system", {}, { refreshInterval: 5000 });
2026-02-06 18:20:26 +00:00
return (
<Stack gap={theme.spacing(8)}>
<Stats diagnostics={diagnostics} />
2026-02-06 18:46:06 +00:00
<StatGauges diagnostics={diagnostics} />
2026-02-06 18:20:26 +00:00
</Stack>
);
2026-02-05 20:23:04 +00:00
};