diff --git a/CHANGELOG b/CHANGELOG index 4fe306b2c..a8c6c0b9c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,14 @@ # Change Log +## 2.2.45 12/01/2024 + +* Add missing console_type values in appliance_v8.json. Ref https://github.com/GNS3/gns3-registry/issues/849 +* Handle moved project notifications on controller stream +* Add debug for PATH env variable +* Add custom executable paths on Windows +* Add --suppressApplicationTitle for Windows terminal. Fixes https://github.com/GNS3/gns3-gui/issues/3544 +* Upgrade sentry-sdk and aiohttp + ## 2.2.44.1 07/11/2023 * No changes diff --git a/gns3/controller.py b/gns3/controller.py index 2daa6f653..a70557c44 100644 --- a/gns3/controller.py +++ b/gns3/controller.py @@ -479,6 +479,16 @@ def _event_received(self, result, *args, **kwargs): elif result["action"] == "compute.created" or result["action"] == "compute.updated": from .compute_manager import ComputeManager ComputeManager.instance().computeDataReceivedCallback(result["event"]) + elif result["action"] == "project.closed": + from .topology import Topology + project = Topology.instance().project() + if project and project.id() == result["event"]["project_id"]: + Topology.instance().setProject(None) + elif result["action"] == "project.updated": + from .topology import Topology + project = Topology.instance().project() + if project and project.id() == result["event"]["project_id"]: + project.projectUpdatedCallback(result["event"]) elif result["action"] == "log.error": log.error(result["event"]["message"]) elif result["action"] == "log.warning": diff --git a/gns3/crash_report.py b/gns3/crash_report.py index 0c12cef85..8759d5ac2 100644 --- a/gns3/crash_report.py +++ b/gns3/crash_report.py @@ -50,7 +50,7 @@ class CrashReport: Report crash to a third party service """ - DSN = "https://7163314dc7e72cc6528f3e200a9224ec@o19455.ingest.sentry.io/38506" + DSN = "https://85829ec3496883de83c445deb55eecc8@o19455.ingest.sentry.io/38506" _instance = None def __init__(self): diff --git a/gns3/main.py b/gns3/main.py index 80ff45578..8d5847c9f 100644 --- a/gns3/main.py +++ b/gns3/main.py @@ -142,6 +142,7 @@ def main(): frozen_dirs = [ frozen_dir, os.path.normpath(os.path.join(frozen_dir, 'dynamips')), + os.path.normpath(os.path.join(frozen_dir, 'ubridge')), os.path.normpath(os.path.join(frozen_dir, 'vpcs')), os.path.normpath(os.path.join(frozen_dir, 'traceng')) ] @@ -151,6 +152,7 @@ def main(): if options.project: os.chdir(frozen_dir) + def exceptionHook(exception, value, tb): if exception == KeyboardInterrupt: @@ -260,6 +262,7 @@ def exceptionHook(exception, value, tb): log.info("GNS3 GUI version {}".format(__version__)) log.info("Copyright (c) 2007-{} GNS3 Technologies Inc.".format(current_year)) log.info("Application started with {}".format(" ".join(sys.argv))) + log.debug("PATH={}".format(os.environ["PATH"])) # update the exception file path to have it in the same directory as the settings file. exception_file_path = os.path.join(LocalConfig.instance().configDirectory(), exception_file_path) diff --git a/gns3/project.py b/gns3/project.py index 7b38fdbb4..cab47dd3b 100644 --- a/gns3/project.py +++ b/gns3/project.py @@ -475,9 +475,9 @@ def update(self): "variables": self._variables, "supplier": self._supplier } - self.put("", self._projectUpdatedCallback, body=body) + self.put("", self.projectUpdatedCallback, body=body) - def _projectUpdatedCallback(self, result, error=False, **kwargs): + def projectUpdatedCallback(self, result, error=False, **kwargs): if error: self.project_creation_error_signal.emit(result["message"]) return @@ -712,10 +712,13 @@ def _event_received(self, result, *args, **kwargs): drawing = Topology.instance().getDrawingFromUuid(result["event"]["drawing_id"]) if drawing is not None: drawing.delete(skip_controller=True) + # project.closed and project.updated notifications have been moved to the controller + # because they are not project specific, keeping it there for backward compatibility + # when connected to an older controller version elif result["action"] == "project.closed": Topology.instance().setProject(None) elif result["action"] == "project.updated": - self._projectUpdatedCallback(result["event"]) + self.projectUpdatedCallback(result["event"]) elif result["action"] == "snapshot.restored": Topology.instance().restoreSnapshot(result["event"]["project_id"]) elif result["action"] == "log.error": diff --git a/gns3/schemas/appliance_v8.json b/gns3/schemas/appliance_v8.json index 55c245b57..043ef26ec 100644 --- a/gns3/schemas/appliance_v8.json +++ b/gns3/schemas/appliance_v8.json @@ -57,7 +57,8 @@ "telnet", "vnc", "http", - "https" + "https", + "none" ], "title": "Type of console" }, @@ -502,7 +503,8 @@ "telnet", "vnc", "spice", - "spice+agent" + "spice+agent", + "none" ], "title": "Type of console connection for the administration of the appliance" }, diff --git a/gns3/settings.py b/gns3/settings.py index 42e655019..47fecb3d2 100644 --- a/gns3/settings.py +++ b/gns3/settings.py @@ -65,7 +65,7 @@ 'SecureCRT (personal profile)': r'"{}\AppData\Local\VanDyke Software\SecureCRT\SecureCRT.exe" /T /N "{{name}}" /TELNET {{host}} {{port}}'.format(userprofile), 'TeraTerm Pro': r'"{}\teraterm\ttermpro.exe" /W="{{name}}" /M="ttstart.macro" /T=1 {{host}} {{port}}'.format(program_files_x86), 'Telnet': 'telnet {host} {port}', - 'Windows Terminal': 'wt.exe -w 1 new-tab --title {name} telnet {host} {port}', + 'Windows Terminal': 'wt.exe -w 1 new-tab --suppressApplicationTitle --title {name} telnet {host} {port}', 'Xshell 4': r'"{}\NetSarang\Xshell 4\xshell.exe" -url telnet://{{host}}:{{port}}'.format(program_files_x86), 'Xshell 5': r'"{}\NetSarang\Xshell 5\xshell.exe" -url telnet://{{host}}:{{port}} -newtab {{name}}'.format(program_files_x86), 'ZOC 6': r'"{}\ZOC6\zoc.exe" "/TELNET:{{host}}:{{port}}" /TABBED "/TITLE:{{name}}"'.format(program_files_x86)} diff --git a/gns3/version.py b/gns3/version.py index fb116b59b..49cad6f42 100644 --- a/gns3/version.py +++ b/gns3/version.py @@ -23,8 +23,8 @@ # or negative for a release candidate or beta (after the base version # number has been incremented) -__version__ = "2.2.44.1" -__version_info__ = (2, 2, 44, -99) +__version__ = "2.2.45" +__version_info__ = (2, 2, 45, 0) if "dev" in __version__: try: diff --git a/requirements.txt b/requirements.txt index c9cd5f20c..770a04e08 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ jsonschema>=4.17.3,<4.18; python_version >= '3.7' # v4.17.3 is the last version to support Python 3.7 jsonschema==3.2.0; python_version < '3.7' # v3.2.0 is the last version to support Python 3.6 -sentry-sdk==1.34.0,<1.35 +sentry-sdk==1.36.0,<1.37 psutil==5.9.6 distro>=1.8.0 truststore>=0.8.0; python_version >= '3.10'