v1.0.1: 多拓扑管理、Web SSH终端、扫描进度修复、拓扑连线优化

- 修复扫描进度条不动的问题(分4阶段更新进度)
- 新增Web SSH远程终端(xterm.js + WebSocket)
- 新增多拓扑管理(创建/切换拓扑、全局设备池)
- 简化新建拓扑流程(仅需名称,创建后选择设备)
- 修复拓扑Builder设备去重(按IP去重)
- 修复启动时拓扑设备不加载到Builder的问题
- 优化MAC前缀匹配(避免歧义前缀导致错误连线)
- 拓扑连线改为无向(去除箭头)
- 设备详情面板加宽到600px
Этот коммит содержится в:
Your Name
2026-04-26 13:25:19 +08:00
родитель 6e1b010c17
Коммит 44f7fef1f8
17 изменённых файлов: 1940 добавлений и 54 удалений
+22 -9
Просмотреть файл
@@ -59,15 +59,15 @@ type Neighbor struct {
// ScanTask 扫描任务
type ScanTask struct {
ID string `json:"id"`
Status string `json:"status"` // running, completed, failed
Progress int `json:"progress"`
TotalDevices int `json:"total_devices"`
ScannedDevices int `json:"scanned_devices"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Devices []Device `json:"devices"`
ErrorMessage string `json:"error_message,omitempty"`
ID string `json:"id"`
Status string `json:"status"` // running, completed, failed
Progress int `json:"progress"`
TotalDevices int `json:"total_devices"`
ScannedDevices int `json:"scanned_devices"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Devices []Device `json:"devices"`
ErrorMessage string `json:"error_message,omitempty"`
}
// TopologyGraph 拓扑图数据
@@ -94,3 +94,16 @@ type TopologyEdge struct {
TargetInterface string `json:"target_interface"`
Protocol string `json:"protocol"`
}
// Topology 网络拓扑(一个拓扑包含多个设备)
type Topology struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ScanRange string `json:"scan_range"`
SSHPort int `json:"ssh_port"`
Username string `json:"username"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeviceCount int `json:"device_count"`
}