mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01: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
@@ -464,6 +464,7 @@ async def create_marker(
|
||||
bpf=marker_data.bpf,
|
||||
tag=marker_data.tag,
|
||||
color=marker_data.color,
|
||||
highlight_duration=marker_data.highlight_duration,
|
||||
)
|
||||
return link.markers.get(name, {})
|
||||
|
||||
@@ -507,6 +508,7 @@ async def update_marker(
|
||||
tag=marker_data.tag,
|
||||
color=marker_data.color,
|
||||
enabled=marker_data.enabled,
|
||||
highlight_duration=marker_data.highlight_duration,
|
||||
)
|
||||
return link.markers.get(marker_name, {})
|
||||
|
||||
|
||||
@@ -266,6 +266,7 @@ async def create_marker_definition(
|
||||
bpf=def_data.bpf,
|
||||
tag=def_data.tag,
|
||||
color=def_data.color,
|
||||
highlight_duration=def_data.highlight_duration,
|
||||
)
|
||||
return project.marker_definitions.get(name, {})
|
||||
|
||||
@@ -290,6 +291,7 @@ async def update_marker_definition(
|
||||
bpf=def_data.bpf if def_data.bpf else None,
|
||||
tag=def_data.tag,
|
||||
color=def_data.color,
|
||||
highlight_duration=def_data.highlight_duration,
|
||||
)
|
||||
return project.marker_definitions.get(def_name, {})
|
||||
|
||||
|
||||
Reference in new issue
Block a user