Add topology maps with LLDP discovery and React Flow canvas.

Includes map CRUD, graph save, neighbor discover, and UI controls for labels, sidebar, and edge flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-07-29 23:53:06 +08:00
parent 3b8342acfb
commit dc805c2086
18 changed files with 3084 additions and 4 deletions

View file

@ -343,3 +343,68 @@ export type UmeTokenStatus = {
error_kind?: string;
error?: string;
};
export type TopologyMapItem = {
id: string;
name: string;
remark: string;
node_count: number;
edge_count: number;
created_at?: string | null;
updated_at?: string | null;
};
export type TopologyNodeItem = {
id: string;
map_id: string;
managed_ne_id: string;
ume_ne_id: string;
label: string;
x: number;
y: number;
ne_name: string;
ne_ip: string;
vendor: string;
protocol: string;
connect_status: string;
};
export type TopologyEdgeItem = {
id: string;
map_id: string;
source_node_id: string;
target_node_id: string;
source_port: string;
target_port: string;
source: string;
discovered_at?: string | null;
};
export type TopologyGraph = {
map: TopologyMapItem;
nodes: TopologyNodeItem[];
edges: TopologyEdgeItem[];
};
export type TopologyDiscoverNeResult = {
ne_id: string;
ne_name: string;
ne_ip: string;
ok: boolean;
command: string;
neighbors: number;
edges_added: number;
edges_updated: number;
error: string;
raw_preview: string;
};
export type TopologyDiscoverOut = {
map_id: string;
protocol: string;
scanned: number;
edges_added: number;
edges_updated: number;
results: TopologyDiscoverNeResult[];
graph: TopologyGraph | null;
};