import { Tag } from 'antd'; import clsx from 'clsx'; import React from 'react'; import { HealthBar } from '../components/HealthBar'; interface MonitorInfo { name: string; dayOnlineRate: number; monthOnlineRate: number; certificateExpiredTo: string; detectFrequency: number; // second response: number; avgResponse: number; // 24hour tags: { label: string; color: string }[]; } const demoMonitors = [ { name: 'Tianji', dayOnlineRate: 1, monthOnlineRate: 0.8, certificateExpiredTo: '2023-9-2 15:49:56', detectFrequency: 300, response: 592, avgResponse: 846, tags: [{ label: 'Core', color: 'red' }], }, ]; export const Monitor: React.FC = React.memo(() => { return (
InfoInfo
); }); Monitor.displayName = 'Monitor'; const MonitorList: React.FC = React.memo(() => { const selectedMonitorName = 'Tianji1'; return (
{demoMonitors.map((monitor) => (
{monitor.monthOnlineRate * 100}%
{monitor.name}
{monitor.tags.map((tag) => ( {tag.label} ))}
({ status: 'health', }))} />
))}
); }); MonitorList.displayName = 'MonitorList';