|
|
@ -1,5 +1,5 @@ |
|
|
|
Author: Pekka Helenius <pekka.helenius@fjordtek.com> |
|
|
|
Date: Sun, 6 Jun 2021 15:16:28 +0200 |
|
|
|
Date: Sun, 22 Aug 2021 17:12:44 +0200 |
|
|
|
Subject: [PATCH] GNS3 Server: Link colors. |
|
|
|
|
|
|
|
Add link color support for GNS3 Server. |
|
|
@ -67,7 +67,7 @@ Add link color support for GNS3 Server. |
|
|
|
port = node.get_port(node_link["adapter_number"], node_link["port_number"]) |
|
|
|
--- a/gns3server/controller/link.py
|
|
|
|
+++ b/gns3server/controller/link.py
|
|
|
|
@@ -125,6 +125,8 @@
|
|
|
|
@@ -125,6 +125,8 @@ class Link:
|
|
|
|
self._suspended = False |
|
|
|
self._filters = {} |
|
|
|
|
|
|
@ -76,21 +76,20 @@ Add link color support for GNS3 Server. |
|
|
|
@property |
|
|
|
def filters(self): |
|
|
|
""" |
|
|
|
@@ -209,6 +211,13 @@
|
|
|
|
@@ -209,6 +211,12 @@ 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): |
|
|
|
""" |
|
|
|
@@ -446,6 +455,7 @@
|
|
|
|
@@ -446,6 +454,7 @@ class Link:
|
|
|
|
"nodes": res, |
|
|
|
"link_id": self._id, |
|
|
|
"filters": self._filters, |
|
|
@ -98,7 +97,7 @@ Add link color support for GNS3 Server. |
|
|
|
"suspend": self._suspended |
|
|
|
} |
|
|
|
return { |
|
|
|
@@ -457,5 +467,6 @@
|
|
|
|
@@ -457,5 +466,6 @@ class Link:
|
|
|
|
"capture_file_path": self.capture_file_path, |
|
|
|
"link_type": self._link_type, |
|
|
|
"filters": self._filters, |
|
|
|