- added new dashboard items
- added camera module statuses
This commit is contained in:
@@ -1,22 +1,32 @@
|
||||
import { faArrowsRotate } from "@fortawesome/free-solid-svg-icons";
|
||||
import Card from "../../../ui/Card";
|
||||
import CardHeader from "../../../ui/CardHeader";
|
||||
import { useGetSystemHealth } from "../hooks/useGetSystemHealth";
|
||||
|
||||
import SystemHealth from "./SystemHealth";
|
||||
import type { SystemHealthStatus } from "../../../types/types";
|
||||
|
||||
const SystemOverview = () => {
|
||||
const { query } = useGetSystemHealth();
|
||||
|
||||
const startTime = query?.data?.StartTimeHumane;
|
||||
const uptime = query?.data?.UptimeHumane;
|
||||
const statuses = query?.data?.Status;
|
||||
const isLoading = query?.isLoading;
|
||||
const isError = query?.isError;
|
||||
const dateUpdatedAt = query?.dataUpdatedAt;
|
||||
type SystemOverviewProps = {
|
||||
startTime: string;
|
||||
uptime: string;
|
||||
statuses: SystemHealthStatus[];
|
||||
isLoading: boolean;
|
||||
isError: boolean;
|
||||
dateUpdatedAt: number;
|
||||
refetch: () => void;
|
||||
};
|
||||
|
||||
const SystemOverview = ({
|
||||
startTime,
|
||||
uptime,
|
||||
statuses,
|
||||
isLoading,
|
||||
isError,
|
||||
dateUpdatedAt,
|
||||
refetch,
|
||||
}: SystemOverviewProps) => {
|
||||
return (
|
||||
<Card className="p-4">
|
||||
<CardHeader title="System Health" refetch={query?.refetch} icon={faArrowsRotate} />
|
||||
<CardHeader title="System Health" refetch={refetch} icon={faArrowsRotate} />
|
||||
<SystemHealth
|
||||
startTime={startTime}
|
||||
uptime={uptime}
|
||||
|
||||
Reference in New Issue
Block a user