mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 06:40:45 +08:00
Add topology situational overlays and harden live sync.
Show connect/alarm/level on the canvas with display toggles, refresh overlay fields even on dirty edits, fix connect-test dots and create-place messaging, and deep-link node alarms into the network alarms page. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
56569e49d1
commit
497a5e048e
19 changed files with 814 additions and 66 deletions
|
|
@ -291,6 +291,9 @@ class ViewNodeOut(BaseModel):
|
|||
device_type: str = ""
|
||||
connect_status: str = ""
|
||||
managed_source: str = "" # manual | ume_sync | lldp | topology | webcrt | …
|
||||
# Fabric classify: smaller level = closer to external/WAN; role synced from floor(level).
|
||||
level: float | None = None
|
||||
role: str = ""
|
||||
# ne | region — region nodes drill into child UME canvases
|
||||
kind: str = "ne"
|
||||
folder_id: str = ""
|
||||
|
|
|
|||
|
|
@ -197,6 +197,8 @@ def get_view_graph(db: Session, view_id: str) -> TopologyViewGraphOut:
|
|||
label = (fn.name or fn.ip or vn.fabric_node_id)[:256]
|
||||
connect_status = ""
|
||||
managed_source = ""
|
||||
level: float | None = None
|
||||
role = ""
|
||||
if fn is not None:
|
||||
mid = str(fn.managed_ne_id or "").strip()
|
||||
uid = str(fn.ume_ne_id or "").strip()
|
||||
|
|
@ -206,6 +208,8 @@ def get_view_graph(db: Session, view_id: str) -> TopologyViewGraphOut:
|
|||
managed_source = str(mne.source or "").strip()
|
||||
elif uid and uid in ume_by_id:
|
||||
connect_status = ume_by_id[uid].connection_status or ""
|
||||
level = fn.level
|
||||
role = str(fn.role or "").strip()
|
||||
nodes_out.append(
|
||||
ViewNodeOut(
|
||||
fabric_node_id=vn.fabric_node_id,
|
||||
|
|
@ -221,6 +225,8 @@ def get_view_graph(db: Session, view_id: str) -> TopologyViewGraphOut:
|
|||
device_type=(fn.device_type if fn else "") or "",
|
||||
connect_status=connect_status,
|
||||
managed_source=managed_source,
|
||||
level=level,
|
||||
role=role,
|
||||
)
|
||||
)
|
||||
# Child regions without a placement row still appear (legacy / missed create).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue