端口选择
{targetPorts.filter(p => p.status === 'free').length} 个空闲端口
{targetPorts.length === 0 ? (
) : (
<>
端口总数: {targetPorts.length} | 空闲端口: {targetPorts.filter(p => p.status === 'free').length}
端口状态分布: {targetPorts.map(p => p.status).filter((v, i, a) => a.indexOf(v) === i).join(', ')}
{targetPort && (
✓ 已选择端口: {targetPort.portName}
{targetPort.portType && (
端口类型: {targetPort.portType}
)}
{targetPort.portSpeed && (
端口速率: {targetPort.portSpeed}
)}
)}
>
)}
{conflicts.length > 0 && (
⚠️ 端口冲突检测
{conflicts.map((conflict, index) => (
{conflict.type === 'source' ? '源端口' : '目标端口'}
{conflict.port}
已被 {conflict.existingCable?.sourceDevice?.name} →{' '}
{conflict.existingCable?.targetDevice?.name} 占用
))}
)}