2022-11-28 02:00:28 +00:00
|
|
|
import { Heart, Power } from 'lucide-react';
|
2022-08-05 02:17:31 +00:00
|
|
|
|
|
|
|
import { Icon } from '@/react/components/Icon';
|
|
|
|
|
2022-07-06 08:23:53 +00:00
|
|
|
interface Props {
|
2024-05-20 06:34:51 +00:00
|
|
|
stats: {
|
|
|
|
running: number;
|
|
|
|
stopped: number;
|
|
|
|
healthy: number;
|
|
|
|
unhealthy: number;
|
|
|
|
};
|
2022-07-06 08:23:53 +00:00
|
|
|
}
|
|
|
|
|
2024-05-20 06:34:51 +00:00
|
|
|
export function ContainerStatus({ stats }: Props) {
|
2022-07-06 08:23:53 +00:00
|
|
|
return (
|
2022-08-05 02:17:31 +00:00
|
|
|
<div className="pull-right">
|
|
|
|
<div>
|
|
|
|
<div className="vertical-center space-right pr-5">
|
2022-11-28 02:00:28 +00:00
|
|
|
<Icon icon={Power} mode="success" size="sm" />
|
2024-05-20 06:34:51 +00:00
|
|
|
{stats.running} running
|
2022-07-06 08:23:53 +00:00
|
|
|
</div>
|
2022-08-05 02:17:31 +00:00
|
|
|
<div className="vertical-center space-right">
|
2022-11-28 02:00:28 +00:00
|
|
|
<Icon icon={Power} mode="danger" size="sm" />
|
2024-05-20 06:34:51 +00:00
|
|
|
{stats.stopped} stopped
|
2022-07-06 08:23:53 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-05 02:17:31 +00:00
|
|
|
<div>
|
|
|
|
<div className="vertical-center space-right pr-5">
|
2022-11-28 02:00:28 +00:00
|
|
|
<Icon icon={Heart} mode="success" size="sm" />
|
2024-05-20 06:34:51 +00:00
|
|
|
{stats.healthy} healthy
|
2022-07-06 08:23:53 +00:00
|
|
|
</div>
|
2022-08-05 02:17:31 +00:00
|
|
|
<div className="vertical-center space-right">
|
2022-11-28 02:00:28 +00:00
|
|
|
<Icon icon={Heart} mode="danger" size="sm" />
|
2024-05-20 06:34:51 +00:00
|
|
|
{stats.unhealthy} unhealthy
|
2022-07-06 08:23:53 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-05 02:17:31 +00:00
|
|
|
</div>
|
2022-07-06 08:23:53 +00:00
|
|
|
);
|
|
|
|
}
|