import { ComponentProps } from 'react'; import { HeartPulse, Server } from 'lucide-react'; import { Health } from 'docker-types/generated/1.44'; import { TableContainer, TableTitle } from '@@/datatables'; import { DetailsTable } from '@@/DetailsTable'; import { Icon } from '@@/Icon'; const StatusMode: Record< Exclude, ComponentProps['mode'] > = { healthy: 'success', unhealthy: 'danger', starting: 'warning', }; interface Props { health: Health; } export function HealthStatus({ health }: Props) { return ( {health.Status && health.Status !== 'none' ? (
{health.Status}
) : (
No health status
)}
{health.FailingStreak}
{!!health.Log?.length && ( {health.Log[health.Log.length - 1].Output} )}
); }