2025-11-24 20:32:52 +00:00
|
|
|
import { faArrowsRotate } from "@fortawesome/free-solid-svg-icons";
|
2025-11-24 14:54:05 +00:00
|
|
|
import Card from "../../../ui/Card";
|
|
|
|
|
import CardHeader from "../../../ui/CardHeader";
|
2025-11-24 20:32:52 +00:00
|
|
|
import { useGetSystemHealth } from "../hooks/useGetSystemHealth";
|
2025-11-24 16:17:27 +00:00
|
|
|
import SystemHealth from "./SystemHealth";
|
2025-11-24 14:54:05 +00:00
|
|
|
|
|
|
|
|
const SystemOverview = () => {
|
2025-11-24 20:32:52 +00:00
|
|
|
const { query } = useGetSystemHealth();
|
|
|
|
|
|
|
|
|
|
const startTime = query?.data?.StartTimeHumane;
|
|
|
|
|
const uptime = query?.data?.UptimeHumane;
|
|
|
|
|
const statuses = query?.data?.Status;
|
|
|
|
|
const isLoading = query?.isLoading;
|
2025-11-24 14:54:05 +00:00
|
|
|
return (
|
|
|
|
|
<Card className="p-4">
|
2025-11-24 20:32:52 +00:00
|
|
|
<CardHeader title="System Health" refetch={query?.refetch} icon={faArrowsRotate} />
|
|
|
|
|
<SystemHealth startTime={startTime} uptime={uptime} statuses={statuses} isLoading={isLoading} />
|
2025-11-24 14:54:05 +00:00
|
|
|
</Card>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default SystemOverview;
|