mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
Harden topology editor save/discover flow and edge editing.
Guard unsaved changes, cancel discovery, block invalid links, preserve discovered_at on PUT, and normalize interface names for discovery keys. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
99fce837f0
commit
2382cb8269
11 changed files with 416 additions and 128 deletions
|
|
@ -34,6 +34,7 @@ class TopologyNodeIn(BaseModel):
|
|||
label: str = ""
|
||||
x: float = 0.0
|
||||
y: float = 0.0
|
||||
created_at: datetime | None = None
|
||||
|
||||
|
||||
class TopologyEdgeIn(BaseModel):
|
||||
|
|
@ -46,6 +47,8 @@ class TopologyEdgeIn(BaseModel):
|
|||
stroke_color: str = Field(default="", max_length=32)
|
||||
stroke_width: int = Field(default=0, ge=0, le=12)
|
||||
line_style: str = Field(default="", max_length=16)
|
||||
discovered_at: datetime | None = None
|
||||
created_at: datetime | None = None
|
||||
|
||||
|
||||
class TopologyNodeOut(BaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue