- improved ui for dashboard
- added refetch fn
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
import type { SystemHealthStatus } from "../../../types/types";
|
||||
import Badge from "../../../ui/Badge";
|
||||
import { useGetSystemHealth } from "../hooks/useGetSystemHealth";
|
||||
|
||||
const SystemHealth = () => {
|
||||
const { query } = useGetSystemHealth();
|
||||
type SystemHealthProps = {
|
||||
startTime: string;
|
||||
uptime: string;
|
||||
statuses: SystemHealthStatus[];
|
||||
isLoading: boolean;
|
||||
};
|
||||
|
||||
const startTime = query?.data?.StartTimeHumane;
|
||||
const uptime = query?.data?.UptimeHumane;
|
||||
const statuses = query?.data?.Status;
|
||||
const SystemHealth = ({ startTime, uptime, statuses, isLoading }: SystemHealthProps) => {
|
||||
if (isLoading) {
|
||||
return <span className="text-slate-500">Loading system health…</span>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="h-100 md:h-70">
|
||||
|
||||
Reference in New Issue
Block a user