mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Link style support. Fixes https://github.com/GNS3/gns3-gui/issues/2461
This commit is contained in:
1 parent
8825831106
commit
4e34ab8e4f
4 files changed
+37
No files matched your search
@@ -124,6 +124,7 @@ class Link:
|
||||
self._link_type = "ethernet"
|
||||
self._suspended = False
|
||||
self._filters = {}
|
||||
self._link_style = {}
|
||||
|
||||
@property
|
||||
def filters(self):
|
||||
@@ -209,6 +210,13 @@ class Link:
|
||||
self._project.emit_notification("link.updated", self.__json__())
|
||||
self._project.dump()
|
||||
|
||||
async def update_link_style(self, link_style):
|
||||
if link_style != self._link_style:
|
||||
self._link_style = link_style
|
||||
await self.update()
|
||||
self._project.emit_notification("link.updated", self.__json__())
|
||||
self._project.dump()
|
||||
|
||||
@property
|
||||
def created(self):
|
||||
"""
|
||||
@@ -454,6 +462,7 @@ class Link:
|
||||
"nodes": res,
|
||||
"link_id": self._id,
|
||||
"filters": self._filters,
|
||||
"link_style": self._link_style,
|
||||
"suspend": self._suspended
|
||||
}
|
||||
return {
|
||||
@@ -466,5 +475,6 @@ class Link:
|
||||
"capture_compute_id": self.capture_compute_id,
|
||||
"link_type": self._link_type,
|
||||
"filters": self._filters,
|
||||
"link_style": self._link_style,
|
||||
"suspend": self._suspended
|
||||
}
|
||||
Reference in new issue
Block a user