feat: 新增设备巡检模块实现完整的巡检告警功能

新增设备巡检模块核心功能,包括:
- 巡检数据存储与调度系统
- 华为/H3C交换机及Linux服务器采集器
- 设备扩展配置与告警规则管理
- 主机详情页巡检配置入口
- 产品名称自定义设置功能
- 网络设备SSH exec通道兼容处理
This commit is contained in:
2026-10-09 10:37:48 +08:00
parent 9202506c46
commit c64e00d835
75 changed files with 12087 additions and 446 deletions

View File

@@ -50,6 +50,11 @@ export interface ServerStats {
latencyMs: number | null; // TCP connection establishment latency to the SSH endpoint
netInterfaces: NetInterfaceInfo[]; // Per-interface network stats
lastUpdated: number | null; // Timestamp of last successful update
// Network-device extended fields (H3C / Huawei / Cisco PTY-shell collector).
// POSIX / Windows collectors never populate these.
networkDevicePorts?: { name: string; phy: string }[];
networkDevicePortUp?: number;
networkDevicePortDown?: number;
}
interface UseServerStatsOptions {
@@ -217,6 +222,10 @@ function normalizeServerStats(stats: Partial<ServerStats>): ServerStats {
latencyMs: Number.isFinite(stats.latencyMs) ? Number(stats.latencyMs) : null,
netInterfaces: stats.netInterfaces || [],
lastUpdated: Date.now(),
// Network-device extended fields — passthrough from backend PTY-shell collector
networkDevicePorts: Array.isArray(stats.networkDevicePorts) ? stats.networkDevicePorts : undefined,
networkDevicePortUp: stats.networkDevicePortUp,
networkDevicePortDown: stats.networkDevicePortDown,
};
}