diff --git a/frontend/src/components/VirtualDeviceList.jsx b/frontend/src/components/VirtualDeviceList.jsx index 054e9a3..92dc7b2 100644 --- a/frontend/src/components/VirtualDeviceList.jsx +++ b/frontend/src/components/VirtualDeviceList.jsx @@ -2,6 +2,7 @@ import React, { useState, useEffect, useRef, useCallback } from 'react'; import { Button, Empty, Spin, Badge, Typography, Space, Checkbox, Tooltip } from 'antd'; import { DownOutlined, UpOutlined, EyeOutlined, EyeInvisibleOutlined, PlusOutlined, CloudServerOutlined } from '@ant-design/icons'; import ServerBackplanePanel from './ServerBackplanePanel'; +import PortPanel from './PortPanel'; const { Text } = Typography; @@ -298,14 +299,28 @@ const VirtualDeviceList = ({ {/* 面板内容 - 可折叠 */} {isExpanded && (
- onManageNetworkCards && onManageNetworkCards(device)} - /> + {device.type === 'switch' ? ( + // 交换机使用普通端口面板 + + ) : ( + // 服务器使用背板布局 + onManageNetworkCards && onManageNetworkCards(device)} + /> + )}
)}