mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
feat(marker): add highlight_duration render hint
Per-marker UI hint (milliseconds, ge=1) for how long the Web UI keeps a marker highlighted after a match. Mirrors color: stored on the link, persisted in the topology, inherited via project-level definitions, and never sent to uBridge. Omitted = null = frontend uses its own default. The default is intentionally NOT set in the schema: MarkerCreate also backs PUT updates, so a schema default would make every partial update silently reset the value. None means "not provided" (keep existing on update / frontend decides on create).
This commit is contained in:
6 files changed
+40
-8
No files matched your search
@@ -162,6 +162,15 @@ class MarkerCreate(BaseModel):
|
||||
None,
|
||||
description="User-chosen hex color for this marker in the Web UI, e.g. '#ff5722'",
|
||||
)
|
||||
highlight_duration: Optional[int] = Field(
|
||||
None,
|
||||
ge=1,
|
||||
description=(
|
||||
"How long (milliseconds) the Web UI keeps this marker highlighted "
|
||||
"after a match. Omitted = use the UI default. Pure render hint — "
|
||||
"stored on the link, never sent to uBridge."
|
||||
),
|
||||
)
|
||||
enabled: Optional[bool] = Field(
|
||||
None,
|
||||
description="Whether the marker is active. Defaults to true on creation.",
|
||||
@@ -196,6 +205,15 @@ class MarkerDefinitionCreate(BaseModel):
|
||||
None,
|
||||
description="User-chosen hex color for the marker in the Web UI, e.g. '#ff5722'",
|
||||
)
|
||||
highlight_duration: Optional[int] = Field(
|
||||
None,
|
||||
ge=1,
|
||||
description=(
|
||||
"How long (milliseconds) the Web UI keeps this marker highlighted "
|
||||
"after a match. Omitted = use the UI default. Pure render hint — "
|
||||
"stored with the definition, never sent to uBridge."
|
||||
),
|
||||
)
|
||||
|
||||
@field_validator("name")
|
||||
@classmethod
|
||||
|
||||
Reference in new issue
Block a user