Compare commits

...

49 Commits

Author SHA1 Message Date
grossmj
882fa76550 Release v2.2.19 2021-03-05 14:51:03 +10:30
grossmj
1490a1ad8f Development on 2.2.19dev1 2021-02-16 20:44:58 +10:30
grossmj
aab0c99cc6 Release v2.2.18 2021-02-16 19:09:46 +10:30
grossmj
a6a987d74c Fix bug with SSL connection on projet websocket stream. 2021-02-16 17:42:18 +10:30
grossmj
9c58b18c20 Merge remote-tracking branch 'origin/2.2' into 2.2 2021-02-16 16:42:45 +10:30
grossmj
8bc499c68f Bump version to 2.2.18dev2 2021-02-16 16:35:26 +10:30
Jeremy Grossmann
bd5eb288b7 Merge pull request #3130 from GNS3/ssl-support
SSL support.
2021-02-16 16:16:32 +10:30
grossmj
465a289568 SSL support. 2021-02-16 16:08:27 +10:30
grossmj
d240ba3056 Merge remote-tracking branch 'origin/2.2' into 2.2 2021-01-26 23:11:11 +10:30
grossmj
3cedfd3649 Remove the useless file "zoom-in (copy).svg". Fixes #3114 2021-01-26 23:10:34 +10:30
Jeremy Grossmann
276d7abdd9 Merge pull request #3104 from b-ehlers/QemuConfig
Add Qemu config disk
2020-12-14 14:23:09 +10:30
grossmj
927e38bd6d Development on 2.2.18dev1 2020-12-04 18:10:11 +10:30
grossmj
376cc29995 Release v2.2.17 2020-12-04 16:26:56 +10:30
grossmj
1f8ebeb084 Merge branch 'master' into 2.2 2020-12-04 16:21:42 +10:30
grossmj
0212755c78 Remove "-nographic" option by default for Qemu VM. Fixes #3094 2020-12-02 18:44:18 +10:30
Jeremy Grossmann
2f7d75eae9 Fix app cannot start on macOS Big Sur. Ref #3037 2020-11-30 20:02:52 +10:30
Jeremy Grossmann
fc1c060922 Merge pull request #3097 from SpikefishSolutions/master
Add yes/no prompts to gui for global project level buttons start/stop/reload/suspend to prevent bad day.
2020-11-21 18:32:45 +10:30
John
0ea72ce782 one more spacing update 2020-11-20 21:33:44 -05:00
John
3de2d2eda2 spacing updates 2020-11-20 21:32:26 -05:00
John
c08262f8af Correct stop/start/reload/suspend button names 2020-11-20 21:26:08 -05:00
John
9ae70bf2fe Add yes/no prompts to all major buttons 2020-11-20 21:11:15 -05:00
John
fa6d250602 oops.. need to build after commit. 2020-11-20 20:27:43 -05:00
John
0668840a2b i don't get it. 2020-11-20 20:26:19 -05:00
John
8b25d1b06c can't fix indent? 2020-11-20 20:25:06 -05:00
John
58c3ba0755 update indent 2020-11-20 20:23:46 -05:00
John
5a91c9aaf8 Create a message box for stopping all devives instead of blindly making someone's day terrible. 2020-11-20 18:28:30 -05:00
grossmj
0fc3f4ef16 Development on 2.2.17dev1 2020-11-05 16:59:58 +10:30
grossmj
f0e5cd2ba2 Release v2.2.16 2020-11-05 15:38:19 +10:30
grossmj
f59ef6378a Fix broken security link (replaced by email). Fixes #3085 2020-11-05 15:00:04 +10:30
grossmj
61ef08d1b7 Fix packets capture stops after some time. Fixes #3067 2020-11-05 14:21:22 +10:30
grossmj
e812c000fd Option to allocate or not the vCPUs and RAM settings for the GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/3069 2020-11-05 11:13:57 +10:30
Bernhard Ehlers
d3d9e1e8ae Use HDD disk image as startup QEMU config disk 2020-10-19 03:45:27 +02:00
Bernhard Ehlers
05f8df345a Fix HDD configuration layout
(cherry picked from commit 4f631669e5)
2020-10-16 10:22:32 +02:00
grossmj
4b0cc11cab Development on 2.2.16dev1 2020-10-07 16:30:03 +10:30
grossmj
b5285cd142 Release v2.2.15 2020-10-07 15:29:52 +10:30
grossmj
69482343ba Fix custom symbol not sent to remote controller when installing appliance 2020-10-07 15:09:08 +10:30
grossmj
d4639c2e61 Development on 2.2.15dev1 2020-09-15 06:49:11 +09:30
grossmj
b85ade9dd7 Release v2.2.14 2020-09-15 05:52:48 +09:30
grossmj
e191cb8aa3 Fix tests. Ref #3002 2020-09-14 00:10:11 +09:30
grossmj
e6bc75ce26 Improvements to add a new version of an appliance from wizard. Fixes #3002. 2020-09-14 00:04:58 +09:30
grossmj
bc1df346f2 Development on 2.2.14dev1 2020-09-05 04:26:16 +09:30
grossmj
27c35321f0 Release v2.2.13 2020-09-04 23:13:28 +09:30
Bernhard Ehlers
3e212fc629 Edit only text mode config files
(cherry picked from commit 880ac5e8c3)
2020-08-18 02:27:31 +02:00
Bernhard Ehlers
25e41dc0f1 Hide config import/export when configFiles attribute is empty
(cherry picked from commit fd7b915e96)
2020-08-17 13:09:59 +02:00
grossmj
c58c7774c4 Qemu disk interfaces must be set to "none" by default. Ref #3035
(cherry picked from commit 5fbb6cbf61)
2020-08-17 12:49:21 +09:30
grossmj
bd2bc8265c Do not allow image to be configured on Qemu VM secondary slave disk if create config disk option is enabled.
(cherry picked from commit 04f9a1cf8c)
2020-08-15 16:05:43 +09:30
grossmj
f2209a2780 Add explicit option to automatically create or not the config disk. Off by default.
(cherry picked from commit af79471afd)
2020-08-14 17:57:24 +09:30
grossmj
7b99ba325b Development on 2.2.13dev1 2020-08-07 21:12:46 +09:30
Bernhard Ehlers
5dc2c77806 QEMU config disk - enable QEMU config import/export
(cherry picked from commit d01f15c4df)
2020-04-06 13:42:00 +02:00
34 changed files with 566 additions and 244 deletions

View File

@@ -1,5 +1,44 @@
# Change Log
## 2.2.19 05/03/2021
* No changes
## 2.2.18 16/02/2021
* SSL support.
* Remove the useless file "zoom-in (copy).svg". Fixes #3114
* Use HDD disk image as startup QEMU config disk
* Edit only text mode config files
* Hide config import/export when configFiles attribute is empty
* Qemu disk interfaces must be set to "none" by default. Ref #3035
* Do not allow image to be configured on Qemu VM secondary slave disk if create config disk option is enabled.
* Add explicit option to automatically create or not the config disk. Off by default.
* QEMU config disk support
## 2.2.17 04/12/2020
* Remove "-nographic" option by default for Qemu VM. Fixes #3094
* Fix app cannot start on macOS Big Sur. Ref #3037
* Require confirmation before stopping all devices.
## 2.2.16 05/11/2020
* Fix packets capture stops after some time. Fixes #3067
* Option to allocate or not the vCPUs and RAM settings for the GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/3069
## 2.2.15 07/10/2020
* Fix custom symbol not sent to remote controller when installing appliance
## 2.2.14 14/09/2020
* Improvements to add a new version of an appliance from wizard. Fixes #3002.
## 2.2.13 04/09/2020
* No changes
## 2.2.12 07/08/2020
* Downgrade psutil to version 5.6.7

View File

@@ -54,6 +54,7 @@ https://github.com/Kozea/wdb
Security issues
----------------
Please contact us using contact informations available here:
http://docs.gns3.com/1ON9JBXSeR7Nt2-Qum2o3ZX0GU86BZwlmNSUgvmqNWGY/index.html
Please contact us at security@gns3.net

View File

@@ -130,7 +130,7 @@ class Controller(QtCore.QObject):
self._connected = False
self._connecting = True
self.get('/version', self._versionGetSlot)
self.httpClient().getSynchronous('/version', self._versionGetSlot, timeout=60)
def _httpClientDisconnectedSlot(self):
if self._connected:
@@ -423,6 +423,7 @@ class Controller(QtCore.QObject):
self._notification_stream = self._http_client.connectWebSocket(self._websocket, "/notifications/ws")
self._notification_stream.textMessageReceived.connect(self._websocket_event_received)
self._notification_stream.error.connect(self._websocket_error)
self._notification_stream.sslErrors.connect(self._sslErrorsSlot)
def stopListenNotifications(self):
if self._notification_stream:
@@ -447,6 +448,11 @@ class Controller(QtCore.QObject):
self._notification_stream = None
self._startListenNotifications()
@qslot
def _sslErrorsSlot(self, ssl_errors):
self._http_client.handleSslError(self._notification_stream, ssl_errors)
@qslot
def _websocket_event_received(self, event):
try:

View File

@@ -51,7 +51,7 @@ class CrashReport:
Report crash to a third party service
"""
DSN = "https://19d5ca7c4cfe447b92ea140f78b01c35:fd234a69afcc490bb7ca37bbb3eefefd@o19455.ingest.sentry.io/38506"
DSN = "https://7ff21b87760a4bae84c753e3774bb950:b061d45015d748faab5a820a36e38b93@o19455.ingest.sentry.io/38506"
_instance = None
def __init__(self):

View File

@@ -475,8 +475,24 @@ class ApplianceWizard(QtWidgets.QWizard, Ui_ApplianceWizard):
Allow user to create a new version of an appliance
"""
new_version, ok = QtWidgets.QInputDialog.getText(self, "Creating a new version", "Create a new version for this appliance.\nPlease share your experience on the GNS3 community if this version works.\n\nVersion name:", QtWidgets.QLineEdit.Normal)
current = self.uiApplianceVersionTreeWidget.currentItem()
if current is None:
QtWidgets.QMessageBox.critical(self.parent(), "Base version", "Please select a base version")
return
base_version = current.data(0, QtCore.Qt.UserRole)
new_version_name, ok = QtWidgets.QInputDialog.getText(self, "Creating a new version", "Create a new version for this appliance.\nPlease share your experience on the GNS3 community if this version works.\n\nVersion name:", QtWidgets.QLineEdit.Normal, base_version.get("name"))
if ok:
new_version = {"name": new_version_name}
new_version["images"] = {}
for disk_type in base_version["images"]:
base_filename = base_version["images"][disk_type]["filename"]
filename, ok = QtWidgets.QInputDialog.getText(self, "Image", "Disk image filename for {}".format(disk_type), QtWidgets.QLineEdit.Normal, base_filename)
if not ok:
filename = base_filename
new_version["images"][disk_type] = {"filename": filename, "version": new_version_name}
try:
self._appliance.create_new_version(new_version)
except ApplianceError as e:

View File

@@ -41,6 +41,9 @@ class EditComputeDialog(QtWidgets.QDialog, Ui_EditComputeDialog):
self.uiServerHostLineEdit.setText(self._compute.host())
self.uiServerPortSpinBox.setValue(self._compute.port())
index = self.uiServerProtocolComboBox.findText(self._compute.protocol().upper())
self.uiServerProtocolComboBox.setCurrentIndex(index)
if self._compute.user():
self.uiEnableAuthenticationCheckBox.setChecked(True)
self.uiServerUserLineEdit.setText(self._compute.user())
@@ -78,7 +81,7 @@ class EditComputeDialog(QtWidgets.QDialog, Ui_EditComputeDialog):
host = self.uiServerHostLineEdit.text().strip()
name = self.uiServerNameLineEdit.text().strip()
protocol = "http"
protocol = self.uiServerProtocolComboBox.currentText().lower()
port = self.uiServerPortSpinBox.value()
user = self.uiServerUserLineEdit.text().strip()
password = self.uiServerPasswordLineEdit.text().strip()

View File

@@ -50,6 +50,7 @@ class SetupWizard(QtWidgets.QWizard, Ui_SetupWizard):
"headless": False,
"when_exit": "stop",
"engine": "vmware",
"allocate_vcpus_ram": True,
"vcpus": 1,
"ram": 2048,
"vmname": "GNS3 VM",

View File

@@ -861,19 +861,19 @@ class GraphicsView(QtWidgets.QGraphicsView):
bring_to_front_action.triggered.connect(self.bringToFrontSlot)
menu.addAction(bring_to_front_action)
if True in list(map(lambda item: isinstance(item, NodeItem) and hasattr(item.node(), "configFiles"), items)):
if True in list(map(lambda item: isinstance(item, NodeItem) and bool(item.node().configFiles()), items)):
import_config_action = QtWidgets.QAction("Import config", menu)
import_config_action.setIcon(get_icon("import.svg"))
import_config_action.triggered.connect(self.importConfigActionSlot)
menu.addAction(import_config_action)
if True in list(map(lambda item: isinstance(item, NodeItem) and hasattr(item.node(), "configFiles"), items)):
if True in list(map(lambda item: isinstance(item, NodeItem) and bool(item.node().configFiles()), items)):
export_config_action = QtWidgets.QAction("Export config", menu)
export_config_action.setIcon(get_icon("export.svg"))
export_config_action.triggered.connect(self.exportConfigActionSlot)
menu.addAction(export_config_action)
if True in list(map(lambda item: isinstance(item, NodeItem) and hasattr(item.node(), "configFiles"), items)):
if True in list(map(lambda item: isinstance(item, NodeItem) and bool(item.node().configTextFiles()), items)):
export_config_action = QtWidgets.QAction("Edit config", menu)
export_config_action.setIcon(get_icon("edit.svg"))
export_config_action.triggered.connect(self.editConfigActionSlot)
@@ -1226,7 +1226,7 @@ class GraphicsView(QtWidgets.QGraphicsView):
items = []
for item in self.scene().selectedItems():
if isinstance(item, NodeItem) and hasattr(item.node(), "configFiles") and item.node().initialized():
if isinstance(item, NodeItem) and item.node().configFiles() and item.node().initialized():
items.append(item)
if not items:
@@ -1257,17 +1257,17 @@ class GraphicsView(QtWidgets.QGraphicsView):
items = []
for item in self.scene().selectedItems():
if isinstance(item, NodeItem) and hasattr(item.node(), "configFiles") and item.node().initialized():
if isinstance(item, NodeItem) and item.node().configTextFiles() and item.node().initialized():
items.append(item)
if not items:
return
for item in items:
if len(item.node().configFiles()) == 1:
config_file = item.node().configFiles()[0]
if len(item.node().configTextFiles()) == 1:
config_file = item.node().configTextFiles()[0]
else:
config_file, ok = QtWidgets.QInputDialog.getItem(self, "Edit file", "File to edit?", item.node().configFiles(), 0, False)
config_file, ok = QtWidgets.QInputDialog.getItem(self, "Edit file", "File to edit?", item.node().configTextFiles(), 0, False)
if not ok:
continue
dialog = FileEditorDialog(item.node(), config_file, parent=self)
@@ -1282,7 +1282,7 @@ class GraphicsView(QtWidgets.QGraphicsView):
items = []
for item in self.scene().selectedItems():
if isinstance(item, NodeItem) and hasattr(item.node(), "configFiles") and item.node().initialized():
if isinstance(item, NodeItem) and item.node().configFiles() and item.node().initialized():
items.append(item)
if not items:

View File

@@ -18,18 +18,15 @@
from .qt import sip
import json
import copy
import http
import uuid
import pathlib
import base64
import datetime
import ipaddress
import urllib.request
import urllib.parse
from .version import __version__, __version_info__
from .qt import QtCore, QtNetwork, qpartial, sip_is_deleted
from .qt import QtCore, QtNetwork, QtWidgets, qpartial, sip_is_deleted
from .utils import parse_version
import logging
@@ -79,6 +76,18 @@ class HTTPClient(QtCore.QObject):
self._shutdown = False # Shutdown in progress
self._accept_insecure_certificate = settings.get("accept_insecure_certificate", None)
# Add custom CA
# ssl_config = QtNetwork.QSslConfiguration.defaultConfiguration()
# if ssl_config.addCaCertificates("/path/to/rootCA.crt"):
# log.debug("CA certificate added")
# QtNetwork.QSslConfiguration.setDefaultConfiguration(ssl_config)
if self._protocol == "https":
if not QtNetwork.QSslSocket.supportsSsl():
log.error("SSL is not supported")
else:
log.debug(f"SSL is supported, version: {QtNetwork.QSslSocket().sslLibraryBuildVersionString()}")
# In order to detect computer hibernation we detect the date of the last
# query and disconnect if time is too long between two query
self._last_query_timestamp = None
@@ -93,6 +102,12 @@ class HTTPClient(QtCore.QObject):
# List of query waiting for the connection
self._query_waiting_connections = []
# To catch SSL errors
self._network_manager.sslErrors.connect(self._sslErrorsSlot)
# Store SSL error exceptions
self._ssl_exceptions = {}
def setMaxTimeDifferenceBetweenQueries(self, value):
self._max_time_difference_between_queries = value
@@ -470,7 +485,14 @@ class HTTPClient(QtCore.QObject):
"""
host = self._getHostForQuery()
request = websocket.request()
ws_url = "ws://{host}:{port}{prefix}{path}".format(host=host, port=self._port, path=path, prefix=prefix)
ws_protocol = "ws"
if self._protocol == "https":
ws_protocol = "wss"
ws_url = "{protocol}://{host}:{port}{prefix}{path}".format(protocol=ws_protocol,
host=host,
port=self._port,
path=path,
prefix=prefix)
log.debug("Connecting to WebSocket endpoint: {}".format(ws_url))
request.setUrl(QtCore.QUrl(ws_url))
self._addAuth(request)
@@ -776,6 +798,55 @@ class HTTPClient(QtCore.QObject):
return status, json_data
return status, None
def _sslErrorsSlot(self, response, ssl_errors):
self.handleSslError(response, ssl_errors)
def handleSslError(self, response, ssl_errors):
if self._accept_insecure_certificate:
response.ignoreSslErrors()
return
url = response.request().url()
host_port_key = f"{url.host()}:{url.port()}"
# get the certificate digest
ssl_config = response.sslConfiguration()
peer_cert = ssl_config.peerCertificate()
digest = peer_cert.digest()
if host_port_key in self._ssl_exceptions:
if self._ssl_exceptions[host_port_key] == digest:
response.ignoreSslErrors()
return
from gns3.main_window import MainWindow
main_window = MainWindow.instance()
msgbox = QtWidgets.QMessageBox(main_window)
msgbox.setWindowTitle("SSL error detected")
msgbox.setText(f"This server could not prove that it is {url.host()}:{url.port()}. Please carefully examine the certificate to make sure the server can be trusted.")
msgbox.setInformativeText(f"{ssl_errors[0].errorString()}")
msgbox.setDetailedText(peer_cert.toText())
msgbox.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
connect_button = QtWidgets.QPushButton(f"&Connect to {url.host()}:{url.port()}", msgbox)
msgbox.addButton(connect_button, QtWidgets.QMessageBox.YesRole)
abort_button = QtWidgets.QPushButton("&Abort", msgbox)
msgbox.addButton(abort_button, QtWidgets.QMessageBox.RejectRole)
msgbox.setDefaultButton(abort_button)
msgbox.setIcon(QtWidgets.QMessageBox.Critical)
msgbox.exec_()
if msgbox.clickedButton() == connect_button:
self._ssl_exceptions[host_port_key] = digest
response.ignoreSslErrors()
else:
for error in ssl_errors:
log.error(f"SSL error detected: {error.errorString()}")
main_window.close()
@classmethod
def fromUrl(cls, url, network_manager=None, base_settings=None):
"""

View File

@@ -19,7 +19,6 @@
Manages and stores everything needed for a connection between 2 devices.
"""
import os
import re
from .qt import sip
import uuid
@@ -79,6 +78,7 @@ class Link(QtCore.QObject):
self._deleting = False
self._capture_file_path = None
self._capture_file = None
self._response_stream = None
self._capture_compute_id = None
self._initialized = False
self._filters = {}
@@ -119,13 +119,15 @@ class Link(QtCore.QObject):
else:
self._capture_file = QtCore.QFile(self._capture_file_path)
self._capture_file.open(QtCore.QFile.WriteOnly)
Controller.instance().get("/projects/{project_id}/links/{link_id}/pcap".format(project_id=self.project().id(), link_id=self._link_id),
None,
showProgress=False,
downloadProgressCallback=self._downloadPcapProgress,
ignoreErrors=True, # If something is wrong avoid disconnect us from server
timeout=None)
log.debug("Capturing packets to '{}'".format(self._capture_file_path))
self._response_stream = Controller.instance().get("/projects/{project_id}/links/{link_id}/pcap".format(project_id=self.project().id(), link_id=self._link_id),
None,
showProgress=False,
downloadProgressCallback=self._downloadPcapProgress,
ignoreErrors=True, # If something is wrong avoid disconnect us from server
timeout=None)
log.debug("Has successfully started capturing packets on link {} to '{}'".format(self._link_id, self._capture_file_path))
else:
self._response_stream = None
if "nodes" in result:
self._nodes = result["nodes"]
@@ -356,9 +358,8 @@ class Link(QtCore.QObject):
def _startCaptureCallback(self, result, error=False, **kwargs):
if error:
log.error("Error while starting capture on link: {}".format(result["message"]))
log.error("Error while starting capture on link {}: {}".format(self._link_id, result["message"]))
return
#self._parseResponse(result)
def _downloadPcapProgress(self, content, server=None, context={}, **kwargs):
"""
@@ -386,11 +387,12 @@ class Link(QtCore.QObject):
link_id=self._link_id),
self._stopCaptureCallback)
def _stopCaptureCallback(self, result, error=False, **kwargs):
if error:
log.error("Error while stopping capture on link: {}".format(result["message"]))
log.error("Error while stopping capture on link {}: {}".format(self._link_id, result["message"]))
return
#self._parseResponse(result)
log.debug("Has successfully stopped capturing packets on link {}".format(self._link_id))
def get(self, path, callback, **kwargs):
"""

View File

@@ -118,6 +118,9 @@ def main():
# an extra argument starting with -psn_. We filter it
if sys.platform.startswith("darwin"):
sys.argv = [a for a in sys.argv if not a.startswith("-psn_")]
if parse_version(QtCore.QT_VERSION_STR) < parse_version("5.15.2"):
# Fixes issue on macOS Big Sur: https://github.com/GNS3/gns3-gui/issues/3037
os.environ["QT_MAC_WANTS_LAYER"] = "1"
parser = argparse.ArgumentParser()
parser.add_argument("project", help="load a GNS3 project (.gns3)", metavar="path", nargs="?")

View File

@@ -810,6 +810,13 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
"""
Slot called when starting all the nodes.
"""
reply = QtWidgets.QMessageBox.question(self, "Confirm Start All", "Are you sure you want to start all devices?",
QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
if reply == QtWidgets.QMessageBox.No:
return
project = Topology.instance().project()
if project is not None:
project.start_all_nodes()
@@ -819,6 +826,12 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
Slot called when suspending all the nodes.
"""
reply = QtWidgets.QMessageBox.question(self, "Confirm Suspend All", "Are you sure you want to suspend all devices?",
QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
if reply == QtWidgets.QMessageBox.No:
return
project = Topology.instance().project()
if project is not None:
project.suspend_all_nodes()
@@ -828,6 +841,12 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
Slot called when stopping all the nodes.
"""
reply = QtWidgets.QMessageBox.question(self, "Confirm Stop All", "Are you sure you want to stop all devices?",
QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
if reply == QtWidgets.QMessageBox.No:
return
project = Topology.instance().project()
if project is not None:
project.stop_all_nodes()
@@ -837,6 +856,12 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
Slot called when reloading all the nodes.
"""
reply = QtWidgets.QMessageBox.question(self, "Confirm Reload All", "Are you sure you want to reload all devices?",
QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
if reply == QtWidgets.QMessageBox.No:
return
project = Topology.instance().project()
if project is not None:
project.reload_all_nodes()

View File

@@ -177,8 +177,6 @@ class QemuVMWizard(VMWithImagesWizard, Ui_QemuVMWizard):
(sys.platform.startswith("darwin") and "GNS3.app" in qemu_path):
settings["options"] += " -vga none -vnc none"
settings["legacy_networking"] = True
else:
settings["options"] += " -nographic"
settings["options"] = settings["options"].strip()
return settings

View File

@@ -90,6 +90,7 @@ class QemuVMConfigurationPage(QtWidgets.QWidget, Ui_QemuVMConfigPageWidget):
self.uiActivateCPUThrottlingCheckBox.stateChanged.connect(self._cpuThrottlingChangedSlot)
self.uiLegacyNetworkingCheckBox.stateChanged.connect(self._legacyNetworkingChangedSlot)
self.uiCustomAdaptersConfigurationPushButton.clicked.connect(self._customAdaptersConfigurationSlot)
self.uiCreateConfigDiskCheckBox.stateChanged.connect(self._createConfigDiskChangedSlot)
# add the categories
for name, category in Node.defaultCategories().items():
@@ -366,6 +367,19 @@ class QemuVMConfigurationPage(QtWidgets.QWidget, Ui_QemuVMConfigPageWidget):
else:
self._refreshQemuNetworkDevices()
def _createConfigDiskChangedSlot(self, state):
"""
Slot to allow or not HDD disk to be configured based on the state of the config disk option.
"""
_translate = QtCore.QCoreApplication.translate
if state:
self.uiHddDiskImageLabel.setText(_translate("QemuVMConfigPageWidget", "Startup-cfg:"))
else:
self.uiHddDiskImageLabel.setText(_translate("QemuVMConfigPageWidget", "Disk image:"))
self.uiHddDiskImageCreateToolButton.setEnabled(not state)
self.uiHddDiskImageResizeToolButton.setEnabled(not state)
def _customAdaptersConfigurationSlot(self):
"""
Slot to open the custom adapters configuration dialog
@@ -453,6 +467,7 @@ class QemuVMConfigurationPage(QtWidgets.QWidget, Ui_QemuVMConfigPageWidget):
self.uiHdbDiskInterfaceComboBox.setCurrentIndex(self.uiHdbDiskInterfaceComboBox.findText(settings["hdb_disk_interface"]))
self.uiHdcDiskInterfaceComboBox.setCurrentIndex(self.uiHdcDiskInterfaceComboBox.findText(settings["hdc_disk_interface"]))
self.uiHddDiskInterfaceComboBox.setCurrentIndex(self.uiHddDiskInterfaceComboBox.findText(settings["hdd_disk_interface"]))
self.uiCreateConfigDiskCheckBox.setChecked(settings["create_config_disk"])
self.uiCdromImageLineEdit.setText(settings["cdrom_image"])
self.uiBiosImageLineEdit.setText(settings["bios_image"])
self.uiInitrdLineEdit.setText(settings["initrd"])
@@ -588,6 +603,7 @@ class QemuVMConfigurationPage(QtWidgets.QWidget, Ui_QemuVMConfigPageWidget):
settings["hdb_disk_interface"] = self.uiHdbDiskInterfaceComboBox.currentText()
settings["hdc_disk_interface"] = self.uiHdcDiskInterfaceComboBox.currentText()
settings["hdd_disk_interface"] = self.uiHddDiskInterfaceComboBox.currentText()
settings["create_config_disk"] = self.uiCreateConfigDiskCheckBox.isChecked()
settings["cdrom_image"] = self.uiCdromImageLineEdit.text().strip()
settings["bios_image"] = self.uiBiosImageLineEdit.text().strip()
settings["initrd"] = self.uiInitrdLineEdit.text().strip()

View File

@@ -72,6 +72,7 @@ class QemuVM(Node):
"mac_address": QEMU_VM_SETTINGS["mac_address"],
"legacy_networking": QEMU_VM_SETTINGS["legacy_networking"],
"replicate_network_connection_state": QEMU_VM_SETTINGS["replicate_network_connection_state"],
"create_config_disk": QEMU_VM_SETTINGS["create_config_disk"],
"platform": QEMU_VM_SETTINGS["platform"],
"on_close": QEMU_VM_SETTINGS["on_close"],
"cpu_throttling": QEMU_VM_SETTINGS["cpu_throttling"],
@@ -134,6 +135,24 @@ class QemuVM(Node):
usage = "\n" + self._settings.get("usage")
return info + port_info + usage
def configFiles(self):
"""
Name of the configuration files
"""
if self._settings.get("create_config_disk"):
return ["config.zip"]
return None
def configTextFiles(self):
"""
Name of the configuration files, which are plain text files
:returns: List of configuration files, False if no files
"""
return None
def configPage(self):
"""
Returns the configuration page widget to be used by the node properties dialog.

View File

@@ -41,10 +41,10 @@ QEMU_VM_SETTINGS = {
"hdb_disk_image": "",
"hdc_disk_image": "",
"hdd_disk_image": "",
"hda_disk_interface": "ide",
"hdb_disk_interface": "ide",
"hdc_disk_interface": "ide",
"hdd_disk_interface": "ide",
"hda_disk_interface": "none",
"hdb_disk_interface": "none",
"hdc_disk_interface": "none",
"hdd_disk_interface": "none",
"cdrom_image": "",
"bios_image": "",
"boot_priority": "c",
@@ -57,6 +57,7 @@ QEMU_VM_SETTINGS = {
"mac_address": "",
"legacy_networking": False,
"replicate_network_connection_state": True,
"create_config_disk": False,
"on_close": "power_off",
"platform": "",
"cpu_throttling": 0,

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>941</width>
<height>877</height>
<height>939</height>
</rect>
</property>
<property name="windowTitle">
@@ -399,14 +399,21 @@
<string>HDD (Secondary Slave)</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="uiCreateConfigDiskCheckBox">
<property name="text">
<string>Automatically create a config disk on HDD</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="uiHddDiskImageLabel">
<property name="text">
<string>Disk image:</string>
</property>
</widget>
</item>
<item row="0" column="1" rowspan="2">
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLineEdit" name="uiHddDiskImageLineEdit"/>
@@ -437,7 +444,7 @@
</item>
</layout>
</item>
<item row="1" column="0" rowspan="2">
<item row="2" column="0">
<widget class="QLabel" name="uiHddDiskInterfaceLabel">
<property name="text">
<string>Disk interface:</string>
@@ -470,7 +477,16 @@
<string>CD/DVD</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="margin">
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item>

View File

@@ -13,7 +13,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_QemuVMConfigPageWidget(object):
def setupUi(self, QemuVMConfigPageWidget):
QemuVMConfigPageWidget.setObjectName("QemuVMConfigPageWidget")
QemuVMConfigPageWidget.resize(941, 877)
QemuVMConfigPageWidget.resize(941, 939)
self.verticalLayout = QtWidgets.QVBoxLayout(QemuVMConfigPageWidget)
self.verticalLayout.setObjectName("verticalLayout")
self.uiQemutabWidget = QtWidgets.QTabWidget(QemuVMConfigPageWidget)
@@ -211,9 +211,12 @@ class Ui_QemuVMConfigPageWidget(object):
self.uiHddGroupBox.setObjectName("uiHddGroupBox")
self.gridLayout_9 = QtWidgets.QGridLayout(self.uiHddGroupBox)
self.gridLayout_9.setObjectName("gridLayout_9")
self.uiCreateConfigDiskCheckBox = QtWidgets.QCheckBox(self.uiHddGroupBox)
self.uiCreateConfigDiskCheckBox.setObjectName("uiCreateConfigDiskCheckBox")
self.gridLayout_9.addWidget(self.uiCreateConfigDiskCheckBox, 0, 0, 1, 2)
self.uiHddDiskImageLabel = QtWidgets.QLabel(self.uiHddGroupBox)
self.uiHddDiskImageLabel.setObjectName("uiHddDiskImageLabel")
self.gridLayout_9.addWidget(self.uiHddDiskImageLabel, 0, 0, 1, 1)
self.gridLayout_9.addWidget(self.uiHddDiskImageLabel, 1, 0, 1, 1)
self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
self.horizontalLayout_10.setObjectName("horizontalLayout_10")
self.uiHddDiskImageLineEdit = QtWidgets.QLineEdit(self.uiHddGroupBox)
@@ -229,10 +232,10 @@ class Ui_QemuVMConfigPageWidget(object):
self.uiHddDiskImageResizeToolButton = QtWidgets.QToolButton(self.uiHddGroupBox)
self.uiHddDiskImageResizeToolButton.setObjectName("uiHddDiskImageResizeToolButton")
self.horizontalLayout_10.addWidget(self.uiHddDiskImageResizeToolButton)
self.gridLayout_9.addLayout(self.horizontalLayout_10, 0, 1, 2, 1)
self.gridLayout_9.addLayout(self.horizontalLayout_10, 1, 1, 1, 1)
self.uiHddDiskInterfaceLabel = QtWidgets.QLabel(self.uiHddGroupBox)
self.uiHddDiskInterfaceLabel.setObjectName("uiHddDiskInterfaceLabel")
self.gridLayout_9.addWidget(self.uiHddDiskInterfaceLabel, 1, 0, 2, 1)
self.gridLayout_9.addWidget(self.uiHddDiskInterfaceLabel, 2, 0, 1, 1)
self.uiHddDiskInterfaceComboBox = QtWidgets.QComboBox(self.uiHddGroupBox)
self.uiHddDiskInterfaceComboBox.setObjectName("uiHddDiskInterfaceComboBox")
self.gridLayout_9.addWidget(self.uiHddDiskInterfaceComboBox, 2, 1, 1, 1)
@@ -497,6 +500,7 @@ class Ui_QemuVMConfigPageWidget(object):
self.uiHdcDiskImageResizeToolButton.setText(_translate("QemuVMConfigPageWidget", "Resize..."))
self.uiHdcDiskInterfaceLabel.setText(_translate("QemuVMConfigPageWidget", "Disk interface:"))
self.uiHddGroupBox.setTitle(_translate("QemuVMConfigPageWidget", "HDD (Secondary Slave)"))
self.uiCreateConfigDiskCheckBox.setText(_translate("QemuVMConfigPageWidget", "Automatically create a config disk on HDD"))
self.uiHddDiskImageLabel.setText(_translate("QemuVMConfigPageWidget", "Disk image:"))
self.uiHddDiskImageToolButton.setText(_translate("QemuVMConfigPageWidget", "&Browse..."))
self.uiHddDiskImageCreateToolButton.setText(_translate("QemuVMConfigPageWidget", "Create..."))

View File

@@ -199,6 +199,26 @@ class Node(BaseNode):
return self._always_on
def configFiles(self):
"""
Name of the configuration files
This method should be overridden in derived classes
:returns: List of configuration files, False if no files
"""
return None
def configTextFiles(self):
"""
Name of the configuration files, which are plain text files
:returns: List of configuration files, False if no files
"""
return self.configFiles()
def get(self, path, *args, **kwargs):
"""
GET on current server / project
@@ -774,7 +794,7 @@ class Node(BaseNode):
:param directory: destination directory path
"""
if not hasattr(self, "configFiles"):
if not self.configFiles():
return False
for file in self.configFiles():
self.get("/files/{file}".format(file=file),
@@ -813,7 +833,7 @@ class Node(BaseNode):
:param directory: source directory path
"""
if not hasattr(self, "configFiles"):
if not self.configFiles():
return
try:

View File

@@ -90,12 +90,11 @@ class PacketCapture:
def _updatedLinkSlot(self, link_id):
link = self.topology().getLink(link_id)
if link:
if link.capturing():
if self._autostart.get(link) and link not in self._tail_process:
log.debug("Starting packet capture reader for link {}".format(link.link_id()))
self.startPacketCaptureReader(link)
log.debug("Has successfully started capturing packets on {} to {}".format(link.id(), link.capture_file_path()))
else:
self.stopPacketCaptureReader(link)
@@ -108,7 +107,6 @@ class PacketCapture:
"""
link.stopCapture()
log.debug("Has successfully stopped capturing packets on {}".format(link.id()))
def startPacketCaptureReader(self, link):
"""
@@ -121,6 +119,7 @@ class PacketCapture:
Stop the packet capture reader
"""
if link in self._tail_process and self._tail_process[link].poll() is None:
log.debug("Stopping packet capture reader for link {}".format(link.link_id()))
self._tail_process[link].kill()
del self._tail_process[link]

View File

@@ -42,6 +42,7 @@ class GNS3VMPreferencesPage(QtWidgets.QWidget, Ui_GNS3VMPreferencesPageWidget):
self._initialized = False
self.uiRefreshPushButton.clicked.connect(self._refreshVMSlot)
self.uiGNS3VMEngineComboBox.currentIndexChanged.connect(self._engineChangedSlot)
self.uiAllocatevCPUsRAMCheckBox.stateChanged.connect(self._allocatevCPUsRAMSlot)
Controller.instance().connected_signal.connect(self.loadPreferences)
def pageInitialized(self):
@@ -74,6 +75,18 @@ class GNS3VMPreferencesPage(QtWidgets.QWidget, Ui_GNS3VMPreferencesPageWidget):
self.uiPortSpinBox.setVisible(True)
self._refreshVMSlot(ignore_error=True)
def _allocatevCPUsRAMSlot(self, state):
"""
Slot to enable or not the vCPUS and RAM spin boxes.
"""
if state:
self.uiRamSpinBox.setEnabled(True)
self.uiCpuSpinBox.setEnabled(True)
else:
self.uiRamSpinBox.setEnabled(False)
self.uiCpuSpinBox.setEnabled(False)
def loadPreferences(self):
"""
Loads the preference from controller.
@@ -95,6 +108,7 @@ class GNS3VMPreferencesPage(QtWidgets.QWidget, Ui_GNS3VMPreferencesPageWidget):
return
self._old_settings = copy.copy(result)
self._settings = result
self.uiAllocatevCPUsRAMCheckBox.setChecked(self._settings["allocate_vcpus_ram"])
self.uiRamSpinBox.setValue(self._settings["ram"])
self.uiCpuSpinBox.setValue(self._settings["vcpus"])
self.uiPortSpinBox.setValue(self._settings.get("port", 3080))
@@ -174,6 +188,7 @@ class GNS3VMPreferencesPage(QtWidgets.QWidget, Ui_GNS3VMPreferencesPageWidget):
"headless": self.uiHeadlessCheckBox.isChecked(),
"when_exit": when_exit,
"engine": self.uiGNS3VMEngineComboBox.currentData(),
"allocate_vcpus_ram": self.uiAllocatevCPUsRAMCheckBox.isChecked(),
"ram": self.uiRamSpinBox.value(),
"vcpus": self.uiCpuSpinBox.value(),
"port": self.uiPortSpinBox.value()

View File

@@ -191,6 +191,7 @@ class ServerPreferencesPage(QtWidgets.QWidget, Ui_ServerPreferencesPageWidget):
self.uiRemoteMainServerHostLineEdit.setText(servers_settings["host"])
self.uiRemoteMainServerPortSpinBox.setValue(servers_settings["port"])
self.uiRemoteMainServerProtocolComboBox.setCurrentText(servers_settings["protocol"].upper())
self.uiRemoteMainServerUserLineEdit.setText(servers_settings["user"])
self.uiRemoteMainServerPasswordLineEdit.setText(servers_settings["password"])
self.uiRemoteMainServerAuthCheckBox.setChecked(servers_settings["auth"])
@@ -285,7 +286,7 @@ class ServerPreferencesPage(QtWidgets.QWidget, Ui_ServerPreferencesPageWidget):
else:
new_local_server_settings["host"] = self.uiRemoteMainServerHostLineEdit.text()
new_local_server_settings["port"] = self.uiRemoteMainServerPortSpinBox.value()
new_local_server_settings["protocol"] = "http"
new_local_server_settings["protocol"] = self.uiRemoteMainServerProtocolComboBox.currentText().lower()
new_local_server_settings["user"] = self.uiRemoteMainServerUserLineEdit.text()
new_local_server_settings["password"] = self.uiRemoteMainServerPasswordLineEdit.text()
new_local_server_settings["auth"] = self.uiRemoteMainServerAuthCheckBox.isChecked()

View File

@@ -632,6 +632,7 @@ class Project(QtCore.QObject):
self._notification_stream = Controller.instance().httpClient().connectWebSocket(self._websocket, path)
self._notification_stream.textMessageReceived.connect(self._websocket_event_received)
self._notification_stream.error.connect(self._websocket_error)
self._notification_stream.sslErrors.connect(self._sslErrorsSlot)
def _endListenNotificationCallback(self, result, error=False, **kwargs):
"""
@@ -648,6 +649,11 @@ class Project(QtCore.QObject):
self._notification_stream = None
self._startListenNotifications()
@qslot
def _sslErrorsSlot(self, ssl_errors):
Controller.instance().httpClient().handleSslError(self._notification_stream, ssl_errors)
@qslot
def _websocket_event_received(self, event):
try:

View File

@@ -115,22 +115,14 @@ class Appliance(collections.abc.Mapping):
if not found:
raise ApplianceError("Broken appliance missing file {} for version {}".format(filename, version["name"]))
def create_new_version(self, version_name):
def create_new_version(self, new_version):
"""
Duplicate a version in order to create a new version
"""
if 'versions' not in self._appliance.keys() or not self._appliance["versions"]:
if "versions" not in self._appliance.keys() or not self._appliance["versions"]:
raise ApplianceError("Your appliance file doesn't contain any versions")
ref = self._appliance["versions"][0]
new_version = {'name': version_name}
new_version['images'] = {}
for disk_type in ref['images']:
filename = ref['images'][disk_type]['filename']
filename = filename.replace(ref['images'][disk_type]['version'], version_name)
new_version['images'][disk_type] = {'filename': filename, 'version': version_name}
self._appliance['versions'].append(new_version)
self._appliance["versions"].append(new_version)
def search_images_for_version(self, version_name):
"""

View File

@@ -178,8 +178,9 @@ class ApplianceToTemplate:
if symbol_id.startswith(":/symbols/"):
return symbol_id
controller = Controller.instance()
path = os.path.join(Config().symbols_dir, symbol_id)
if os.path.exists(path):
if not controller.isRemote() and os.path.exists(path):
return os.path.basename(path)
if controller_symbols:
@@ -197,7 +198,6 @@ class ApplianceToTemplate:
url = "https://raw.githubusercontent.com/GNS3/gns3-registry/master/symbols/{}".format(symbol_id)
try:
self._downloadApplianceSymbol(url, path)
controller = Controller.instance()
controller.clearStaticCache()
if controller.isRemote():
controller.uploadSymbol(symbol_id, path)

View File

@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>579</width>
<height>374</height>
<width>585</width>
<height>353</height>
</rect>
</property>
<property name="windowTitle">
@@ -23,10 +23,31 @@
<string>Server settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="0">
<widget class="QLabel" name="uiServerPortLabel">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="uiServerNameLineEdit"/>
</item>
<item row="2" column="1" colspan="2">
<widget class="QLineEdit" name="uiServerHostLineEdit">
<property name="text">
<string>192.168.56.101</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="uiServerHostLabel">
<property name="text">
<string>Host:</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QSpinBox" name="uiServerPortSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -52,25 +73,25 @@
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLineEdit" name="uiServerHostLineEdit">
<property name="text">
<string>192.168.56.101</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="uiServerHostLabel">
<widget class="QLabel" name="uiServerProtocolLabel">
<property name="text">
<string>Host:</string>
<string>Protocol:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="uiServerPortLabel">
<property name="text">
<string>Port:</string>
</property>
<item row="1" column="1">
<widget class="QComboBox" name="uiServerProtocolComboBox">
<item>
<property name="text">
<string>HTTP</string>
</property>
</item>
<item>
<property name="text">
<string>HTTPS</string>
</property>
</item>
</widget>
</item>
</layout>

View File

@@ -1,29 +1,39 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/Users/noplay/code/gns3/gns3-gui/gns3/ui/edit_compute_dialog.ui'
# Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/ui/edit_compute_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.8
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING! All changes made in this file will be lost!
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_EditComputeDialog(object):
def setupUi(self, EditComputeDialog):
EditComputeDialog.setObjectName("EditComputeDialog")
EditComputeDialog.setWindowModality(QtCore.Qt.WindowModal)
EditComputeDialog.resize(579, 374)
EditComputeDialog.resize(585, 353)
self.verticalLayout = QtWidgets.QVBoxLayout(EditComputeDialog)
self.verticalLayout.setObjectName("verticalLayout")
self.groupBox = QtWidgets.QGroupBox(EditComputeDialog)
self.groupBox.setObjectName("groupBox")
self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
self.gridLayout.setObjectName("gridLayout")
self.uiServerPortLabel = QtWidgets.QLabel(self.groupBox)
self.uiServerPortLabel.setObjectName("uiServerPortLabel")
self.gridLayout.addWidget(self.uiServerPortLabel, 3, 0, 1, 1)
self.uiServerNameLineEdit = QtWidgets.QLineEdit(self.groupBox)
self.uiServerNameLineEdit.setObjectName("uiServerNameLineEdit")
self.gridLayout.addWidget(self.uiServerNameLineEdit, 0, 1, 1, 1)
self.uiServerHostLineEdit = QtWidgets.QLineEdit(self.groupBox)
self.uiServerHostLineEdit.setObjectName("uiServerHostLineEdit")
self.gridLayout.addWidget(self.uiServerHostLineEdit, 2, 1, 1, 2)
self.uiServerHostLabel = QtWidgets.QLabel(self.groupBox)
self.uiServerHostLabel.setObjectName("uiServerHostLabel")
self.gridLayout.addWidget(self.uiServerHostLabel, 2, 0, 1, 1)
self.uiServerPortSpinBox = QtWidgets.QSpinBox(self.groupBox)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@@ -34,19 +44,18 @@ class Ui_EditComputeDialog(object):
self.uiServerPortSpinBox.setMaximum(65535)
self.uiServerPortSpinBox.setProperty("value", 3080)
self.uiServerPortSpinBox.setObjectName("uiServerPortSpinBox")
self.gridLayout.addWidget(self.uiServerPortSpinBox, 2, 1, 1, 2)
self.gridLayout.addWidget(self.uiServerPortSpinBox, 3, 1, 1, 2)
self.label = QtWidgets.QLabel(self.groupBox)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.uiServerHostLineEdit = QtWidgets.QLineEdit(self.groupBox)
self.uiServerHostLineEdit.setObjectName("uiServerHostLineEdit")
self.gridLayout.addWidget(self.uiServerHostLineEdit, 1, 1, 1, 2)
self.uiServerHostLabel = QtWidgets.QLabel(self.groupBox)
self.uiServerHostLabel.setObjectName("uiServerHostLabel")
self.gridLayout.addWidget(self.uiServerHostLabel, 1, 0, 1, 1)
self.uiServerPortLabel = QtWidgets.QLabel(self.groupBox)
self.uiServerPortLabel.setObjectName("uiServerPortLabel")
self.gridLayout.addWidget(self.uiServerPortLabel, 2, 0, 1, 1)
self.uiServerProtocolLabel = QtWidgets.QLabel(self.groupBox)
self.uiServerProtocolLabel.setObjectName("uiServerProtocolLabel")
self.gridLayout.addWidget(self.uiServerProtocolLabel, 1, 0, 1, 1)
self.uiServerProtocolComboBox = QtWidgets.QComboBox(self.groupBox)
self.uiServerProtocolComboBox.setObjectName("uiServerProtocolComboBox")
self.uiServerProtocolComboBox.addItem("")
self.uiServerProtocolComboBox.addItem("")
self.gridLayout.addWidget(self.uiServerProtocolComboBox, 1, 1, 1, 1)
self.verticalLayout.addWidget(self.groupBox)
self.uiEnableAuthenticationCheckBox = QtWidgets.QGroupBox(EditComputeDialog)
self.uiEnableAuthenticationCheckBox.setCheckable(True)
@@ -67,7 +76,7 @@ class Ui_EditComputeDialog(object):
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.uiServerPasswordLabel)
self.uiServerPasswordLineEdit = QtWidgets.QLineEdit(self.uiEnableAuthenticationCheckBox)
self.uiServerPasswordLineEdit.setEnabled(True)
self.uiServerPasswordLineEdit.setInputMethodHints(QtCore.Qt.ImhHiddenText | QtCore.Qt.ImhNoAutoUppercase | QtCore.Qt.ImhNoPredictiveText | QtCore.Qt.ImhSensitiveData)
self.uiServerPasswordLineEdit.setInputMethodHints(QtCore.Qt.ImhHiddenText|QtCore.Qt.ImhNoAutoUppercase|QtCore.Qt.ImhNoPredictiveText|QtCore.Qt.ImhSensitiveData)
self.uiServerPasswordLineEdit.setEchoMode(QtWidgets.QLineEdit.Password)
self.uiServerPasswordLineEdit.setObjectName("uiServerPasswordLineEdit")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.uiServerPasswordLineEdit)
@@ -80,7 +89,7 @@ class Ui_EditComputeDialog(object):
self.verticalLayout.addItem(spacerItem)
self.buttonBox = QtWidgets.QDialogButtonBox(EditComputeDialog)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
@@ -98,10 +107,13 @@ class Ui_EditComputeDialog(object):
_translate = QtCore.QCoreApplication.translate
EditComputeDialog.setWindowTitle(_translate("EditComputeDialog", "Edit server settings"))
self.groupBox.setTitle(_translate("EditComputeDialog", "Server settings"))
self.label.setText(_translate("EditComputeDialog", "Name:"))
self.uiServerPortLabel.setText(_translate("EditComputeDialog", "Port:"))
self.uiServerHostLineEdit.setText(_translate("EditComputeDialog", "192.168.56.101"))
self.uiServerHostLabel.setText(_translate("EditComputeDialog", "Host:"))
self.uiServerPortLabel.setText(_translate("EditComputeDialog", "Port:"))
self.label.setText(_translate("EditComputeDialog", "Name:"))
self.uiServerProtocolLabel.setText(_translate("EditComputeDialog", "Protocol:"))
self.uiServerProtocolComboBox.setItemText(0, _translate("EditComputeDialog", "HTTP"))
self.uiServerProtocolComboBox.setItemText(1, _translate("EditComputeDialog", "HTTPS"))
self.uiEnableAuthenticationCheckBox.setTitle(_translate("EditComputeDialog", "Enable authentication"))
self.uiServerUserLabel.setText(_translate("EditComputeDialog", "User:"))
self.uiServerPasswordLabel.setText(_translate("EditComputeDialog", "Password:"))

View File

@@ -85,28 +85,28 @@
<string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="8" column="0" colspan="2">
<widget class="QLabel" name="uiActionCloseLabel">
<property name="text">
<string>Action when closing GNS3:</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="uiHeadlessCheckBox">
<property name="text">
<string>Run the VM in headless mode</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<item row="11" column="0" colspan="2">
<widget class="QLabel" name="uiActionCloseLabel">
<property name="text">
<string>Action when closing GNS3:</string>
</property>
</widget>
</item>
<item row="12" column="0" colspan="2">
<widget class="QRadioButton" name="uiWhenExitKeepRadioButton">
<property name="text">
<string>keep the GNS3 VM running</string>
</property>
</widget>
</item>
<item row="10" column="0" colspan="2">
<item row="13" column="0" colspan="2">
<widget class="QRadioButton" name="uiWhenExitSuspendRadioButton">
<property name="text">
<string>suspend the GNS3 VM</string>
@@ -141,22 +141,25 @@
</item>
</layout>
</item>
<item row="11" column="0" colspan="2">
<item row="14" column="0" colspan="2">
<widget class="QRadioButton" name="uiWhenExitStopRadioButton">
<property name="text">
<string>stop the GNS3 VM</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="6" column="0">
<widget class="QLabel" name="uiRamLabel">
<property name="text">
<string>RAM:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="6" column="1">
<widget class="QSpinBox" name="uiRamSpinBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="suffix">
<string> MB</string>
</property>
@@ -174,23 +177,6 @@
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="uiCpuSpinBox">
<property name="minimum">
<number>1</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="uiCpuLabel">
<property name="text">
<string>vCPUs:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="uiPortLabel">
<property name="text">
@@ -211,6 +197,33 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="uiAllocatevCPUsRAMCheckBox">
<property name="text">
<string>Allocate vCPUs and RAM</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="uiCpuLabel">
<property name="text">
<string>vCPUs:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="uiCpuSpinBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -234,9 +247,7 @@
<tabstop>uiGNS3VMEngineComboBox</tabstop>
<tabstop>uiVMListComboBox</tabstop>
<tabstop>uiRefreshPushButton</tabstop>
<tabstop>uiHeadlessCheckBox</tabstop>
<tabstop>uiRamSpinBox</tabstop>
<tabstop>uiCpuSpinBox</tabstop>
<tabstop>uiWhenExitKeepRadioButton</tabstop>
<tabstop>uiWhenExitSuspendRadioButton</tabstop>
<tabstop>uiWhenExitStopRadioButton</tabstop>

View File

@@ -2,9 +2,10 @@
# Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/ui/gns3_vm_preferences_page.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING! All changes made in this file will be lost!
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
@@ -54,18 +55,18 @@ class Ui_GNS3VMPreferencesPageWidget(object):
self.uiGNS3VMSettingsGroupBox.setObjectName("uiGNS3VMSettingsGroupBox")
self.gridLayout = QtWidgets.QGridLayout(self.uiGNS3VMSettingsGroupBox)
self.gridLayout.setObjectName("gridLayout")
self.uiActionCloseLabel = QtWidgets.QLabel(self.uiGNS3VMSettingsGroupBox)
self.uiActionCloseLabel.setObjectName("uiActionCloseLabel")
self.gridLayout.addWidget(self.uiActionCloseLabel, 8, 0, 1, 2)
self.uiHeadlessCheckBox = QtWidgets.QCheckBox(self.uiGNS3VMSettingsGroupBox)
self.uiHeadlessCheckBox.setObjectName("uiHeadlessCheckBox")
self.gridLayout.addWidget(self.uiHeadlessCheckBox, 1, 0, 1, 2)
self.gridLayout.addWidget(self.uiHeadlessCheckBox, 3, 0, 1, 2)
self.uiActionCloseLabel = QtWidgets.QLabel(self.uiGNS3VMSettingsGroupBox)
self.uiActionCloseLabel.setObjectName("uiActionCloseLabel")
self.gridLayout.addWidget(self.uiActionCloseLabel, 11, 0, 1, 2)
self.uiWhenExitKeepRadioButton = QtWidgets.QRadioButton(self.uiGNS3VMSettingsGroupBox)
self.uiWhenExitKeepRadioButton.setObjectName("uiWhenExitKeepRadioButton")
self.gridLayout.addWidget(self.uiWhenExitKeepRadioButton, 9, 0, 1, 2)
self.gridLayout.addWidget(self.uiWhenExitKeepRadioButton, 12, 0, 1, 2)
self.uiWhenExitSuspendRadioButton = QtWidgets.QRadioButton(self.uiGNS3VMSettingsGroupBox)
self.uiWhenExitSuspendRadioButton.setObjectName("uiWhenExitSuspendRadioButton")
self.gridLayout.addWidget(self.uiWhenExitSuspendRadioButton, 10, 0, 1, 2)
self.gridLayout.addWidget(self.uiWhenExitSuspendRadioButton, 13, 0, 1, 2)
self.uiVMNameLabel = QtWidgets.QLabel(self.uiGNS3VMSettingsGroupBox)
self.uiVMNameLabel.setObjectName("uiVMNameLabel")
self.gridLayout.addWidget(self.uiVMNameLabel, 0, 0, 1, 1)
@@ -85,25 +86,18 @@ class Ui_GNS3VMPreferencesPageWidget(object):
self.gridLayout.addLayout(self.horizontalLayout, 0, 1, 1, 1)
self.uiWhenExitStopRadioButton = QtWidgets.QRadioButton(self.uiGNS3VMSettingsGroupBox)
self.uiWhenExitStopRadioButton.setObjectName("uiWhenExitStopRadioButton")
self.gridLayout.addWidget(self.uiWhenExitStopRadioButton, 11, 0, 1, 2)
self.gridLayout.addWidget(self.uiWhenExitStopRadioButton, 14, 0, 1, 2)
self.uiRamLabel = QtWidgets.QLabel(self.uiGNS3VMSettingsGroupBox)
self.uiRamLabel.setObjectName("uiRamLabel")
self.gridLayout.addWidget(self.uiRamLabel, 4, 0, 1, 1)
self.gridLayout.addWidget(self.uiRamLabel, 6, 0, 1, 1)
self.uiRamSpinBox = QtWidgets.QSpinBox(self.uiGNS3VMSettingsGroupBox)
self.uiRamSpinBox.setEnabled(False)
self.uiRamSpinBox.setMinimum(512)
self.uiRamSpinBox.setMaximum(1000000)
self.uiRamSpinBox.setSingleStep(512)
self.uiRamSpinBox.setProperty("value", 2048)
self.uiRamSpinBox.setObjectName("uiRamSpinBox")
self.gridLayout.addWidget(self.uiRamSpinBox, 4, 1, 1, 1)
self.uiCpuSpinBox = QtWidgets.QSpinBox(self.uiGNS3VMSettingsGroupBox)
self.uiCpuSpinBox.setMinimum(1)
self.uiCpuSpinBox.setProperty("value", 1)
self.uiCpuSpinBox.setObjectName("uiCpuSpinBox")
self.gridLayout.addWidget(self.uiCpuSpinBox, 5, 1, 1, 1)
self.uiCpuLabel = QtWidgets.QLabel(self.uiGNS3VMSettingsGroupBox)
self.uiCpuLabel.setObjectName("uiCpuLabel")
self.gridLayout.addWidget(self.uiCpuLabel, 5, 0, 1, 1)
self.gridLayout.addWidget(self.uiRamSpinBox, 6, 1, 1, 1)
self.uiPortLabel = QtWidgets.QLabel(self.uiGNS3VMSettingsGroupBox)
self.uiPortLabel.setObjectName("uiPortLabel")
self.gridLayout.addWidget(self.uiPortLabel, 2, 0, 1, 1)
@@ -113,6 +107,18 @@ class Ui_GNS3VMPreferencesPageWidget(object):
self.uiPortSpinBox.setProperty("value", 80)
self.uiPortSpinBox.setObjectName("uiPortSpinBox")
self.gridLayout.addWidget(self.uiPortSpinBox, 2, 1, 1, 1)
self.uiAllocatevCPUsRAMCheckBox = QtWidgets.QCheckBox(self.uiGNS3VMSettingsGroupBox)
self.uiAllocatevCPUsRAMCheckBox.setObjectName("uiAllocatevCPUsRAMCheckBox")
self.gridLayout.addWidget(self.uiAllocatevCPUsRAMCheckBox, 4, 0, 1, 2)
self.uiCpuLabel = QtWidgets.QLabel(self.uiGNS3VMSettingsGroupBox)
self.uiCpuLabel.setObjectName("uiCpuLabel")
self.gridLayout.addWidget(self.uiCpuLabel, 5, 0, 1, 1)
self.uiCpuSpinBox = QtWidgets.QSpinBox(self.uiGNS3VMSettingsGroupBox)
self.uiCpuSpinBox.setEnabled(False)
self.uiCpuSpinBox.setMinimum(1)
self.uiCpuSpinBox.setProperty("value", 1)
self.uiCpuSpinBox.setObjectName("uiCpuSpinBox")
self.gridLayout.addWidget(self.uiCpuSpinBox, 5, 1, 1, 1)
self.verticalLayout.addWidget(self.uiGNS3VMSettingsGroupBox)
spacerItem = QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
@@ -122,10 +128,8 @@ class Ui_GNS3VMPreferencesPageWidget(object):
GNS3VMPreferencesPageWidget.setTabOrder(self.uiEnableVMCheckBox, self.uiGNS3VMEngineComboBox)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiGNS3VMEngineComboBox, self.uiVMListComboBox)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiVMListComboBox, self.uiRefreshPushButton)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiRefreshPushButton, self.uiHeadlessCheckBox)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiHeadlessCheckBox, self.uiRamSpinBox)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiRamSpinBox, self.uiCpuSpinBox)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiCpuSpinBox, self.uiWhenExitKeepRadioButton)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiRefreshPushButton, self.uiRamSpinBox)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiRamSpinBox, self.uiWhenExitKeepRadioButton)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiWhenExitKeepRadioButton, self.uiWhenExitSuspendRadioButton)
GNS3VMPreferencesPageWidget.setTabOrder(self.uiWhenExitSuspendRadioButton, self.uiWhenExitStopRadioButton)
@@ -136,8 +140,8 @@ class Ui_GNS3VMPreferencesPageWidget(object):
self.uiVirtualizationGroupBox.setTitle(_translate("GNS3VMPreferencesPageWidget", "Virtualization engine"))
self.uiEngineDescriptionLabel.setText(_translate("GNS3VMPreferencesPageWidget", "Description"))
self.uiGNS3VMSettingsGroupBox.setTitle(_translate("GNS3VMPreferencesPageWidget", "Settings"))
self.uiActionCloseLabel.setText(_translate("GNS3VMPreferencesPageWidget", "Action when closing GNS3:"))
self.uiHeadlessCheckBox.setText(_translate("GNS3VMPreferencesPageWidget", "Run the VM in headless mode"))
self.uiActionCloseLabel.setText(_translate("GNS3VMPreferencesPageWidget", "Action when closing GNS3:"))
self.uiWhenExitKeepRadioButton.setText(_translate("GNS3VMPreferencesPageWidget", "keep the GNS3 VM running"))
self.uiWhenExitSuspendRadioButton.setText(_translate("GNS3VMPreferencesPageWidget", "suspend the GNS3 VM"))
self.uiVMNameLabel.setText(_translate("GNS3VMPreferencesPageWidget", "VM name:"))
@@ -145,5 +149,6 @@ class Ui_GNS3VMPreferencesPageWidget(object):
self.uiWhenExitStopRadioButton.setText(_translate("GNS3VMPreferencesPageWidget", "stop the GNS3 VM"))
self.uiRamLabel.setText(_translate("GNS3VMPreferencesPageWidget", "RAM:"))
self.uiRamSpinBox.setSuffix(_translate("GNS3VMPreferencesPageWidget", " MB"))
self.uiCpuLabel.setText(_translate("GNS3VMPreferencesPageWidget", "vCPUs:"))
self.uiPortLabel.setText(_translate("GNS3VMPreferencesPageWidget", "Port:"))
self.uiAllocatevCPUsRAMCheckBox.setText(_translate("GNS3VMPreferencesPageWidget", "Allocate vCPUs and RAM"))
self.uiCpuLabel.setText(_translate("GNS3VMPreferencesPageWidget", "vCPUs:"))

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1273</width>
<height>1097</height>
<width>681</width>
<height>843</height>
</rect>
</property>
<property name="sizePolicy">
@@ -295,24 +295,14 @@
<string>Remote main server</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Host:</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="uiRemoteMainServerHostLineEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<item row="2" column="1" colspan="2">
<widget class="QSpinBox" name="uiRemoteMainServerPortSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@@ -331,44 +321,75 @@
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Auth:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="uiRemoteMainServerAuthCheckBox">
<property name="text">
<string/>
</property>
</widget>
<item row="4" column="2">
<widget class="QLineEdit" name="uiRemoteMainServerUserLineEdit"/>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>User:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="uiRemoteMainServerUserLineEdit"/>
<item row="5" column="2">
<widget class="QLineEdit" name="uiRemoteMainServerPasswordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLineEdit" name="uiRemoteMainServerHostLineEdit"/>
</item>
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Password:</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLineEdit" name="uiRemoteMainServerPasswordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
<item row="3" column="2">
<widget class="QCheckBox" name="uiRemoteMainServerAuthCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="uiRemoteMainServerProtocolLabel">
<property name="text">
<string>Protocol:</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="uiRemoteMainServerProtocolComboBox">
<item>
<property name="text">
<string>HTTP</string>
</property>
</item>
<item>
<property name="text">
<string>HTTPS</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
@@ -404,7 +425,16 @@
<string>Remote servers</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<property name="margin">
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item row="0" column="0" colspan="2">

View File

@@ -2,16 +2,19 @@
# Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/ui/server_preferences_page.ui'
#
# Created by: PyQt5 UI code generator 5.9
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING! All changes made in this file will be lost!
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_ServerPreferencesPageWidget(object):
def setupUi(self, ServerPreferencesPageWidget):
ServerPreferencesPageWidget.setObjectName("ServerPreferencesPageWidget")
ServerPreferencesPageWidget.resize(1273, 1097)
ServerPreferencesPageWidget.resize(681, 843)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
@@ -149,13 +152,7 @@ class Ui_ServerPreferencesPageWidget(object):
self.gridLayout_4.setObjectName("gridLayout_4")
self.label_2 = QtWidgets.QLabel(self.uiRemoteMainServerGroupBox)
self.label_2.setObjectName("label_2")
self.gridLayout_4.addWidget(self.label_2, 0, 0, 1, 1)
self.uiRemoteMainServerHostLineEdit = QtWidgets.QLineEdit(self.uiRemoteMainServerGroupBox)
self.uiRemoteMainServerHostLineEdit.setObjectName("uiRemoteMainServerHostLineEdit")
self.gridLayout_4.addWidget(self.uiRemoteMainServerHostLineEdit, 0, 1, 1, 2)
self.label_3 = QtWidgets.QLabel(self.uiRemoteMainServerGroupBox)
self.label_3.setObjectName("label_3")
self.gridLayout_4.addWidget(self.label_3, 1, 0, 1, 1)
self.gridLayout_4.addWidget(self.label_2, 1, 0, 1, 1)
self.uiRemoteMainServerPortSpinBox = QtWidgets.QSpinBox(self.uiRemoteMainServerGroupBox)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
@@ -165,27 +162,41 @@ class Ui_ServerPreferencesPageWidget(object):
self.uiRemoteMainServerPortSpinBox.setMaximum(65535)
self.uiRemoteMainServerPortSpinBox.setProperty("value", 3080)
self.uiRemoteMainServerPortSpinBox.setObjectName("uiRemoteMainServerPortSpinBox")
self.gridLayout_4.addWidget(self.uiRemoteMainServerPortSpinBox, 1, 1, 1, 2)
self.gridLayout_4.addWidget(self.uiRemoteMainServerPortSpinBox, 2, 1, 1, 2)
self.label = QtWidgets.QLabel(self.uiRemoteMainServerGroupBox)
self.label.setObjectName("label")
self.gridLayout_4.addWidget(self.label, 2, 0, 1, 1)
self.uiRemoteMainServerAuthCheckBox = QtWidgets.QCheckBox(self.uiRemoteMainServerGroupBox)
self.uiRemoteMainServerAuthCheckBox.setText("")
self.uiRemoteMainServerAuthCheckBox.setObjectName("uiRemoteMainServerAuthCheckBox")
self.gridLayout_4.addWidget(self.uiRemoteMainServerAuthCheckBox, 2, 2, 1, 1)
self.label_4 = QtWidgets.QLabel(self.uiRemoteMainServerGroupBox)
self.label_4.setObjectName("label_4")
self.gridLayout_4.addWidget(self.label_4, 3, 0, 1, 1)
self.gridLayout_4.addWidget(self.label, 3, 0, 1, 1)
self.uiRemoteMainServerUserLineEdit = QtWidgets.QLineEdit(self.uiRemoteMainServerGroupBox)
self.uiRemoteMainServerUserLineEdit.setObjectName("uiRemoteMainServerUserLineEdit")
self.gridLayout_4.addWidget(self.uiRemoteMainServerUserLineEdit, 3, 2, 1, 1)
self.label_5 = QtWidgets.QLabel(self.uiRemoteMainServerGroupBox)
self.label_5.setObjectName("label_5")
self.gridLayout_4.addWidget(self.label_5, 4, 0, 1, 2)
self.gridLayout_4.addWidget(self.uiRemoteMainServerUserLineEdit, 4, 2, 1, 1)
self.label_4 = QtWidgets.QLabel(self.uiRemoteMainServerGroupBox)
self.label_4.setObjectName("label_4")
self.gridLayout_4.addWidget(self.label_4, 4, 0, 1, 1)
self.uiRemoteMainServerPasswordLineEdit = QtWidgets.QLineEdit(self.uiRemoteMainServerGroupBox)
self.uiRemoteMainServerPasswordLineEdit.setEchoMode(QtWidgets.QLineEdit.Password)
self.uiRemoteMainServerPasswordLineEdit.setObjectName("uiRemoteMainServerPasswordLineEdit")
self.gridLayout_4.addWidget(self.uiRemoteMainServerPasswordLineEdit, 4, 2, 1, 1)
self.gridLayout_4.addWidget(self.uiRemoteMainServerPasswordLineEdit, 5, 2, 1, 1)
self.label_3 = QtWidgets.QLabel(self.uiRemoteMainServerGroupBox)
self.label_3.setObjectName("label_3")
self.gridLayout_4.addWidget(self.label_3, 2, 0, 1, 1)
self.uiRemoteMainServerHostLineEdit = QtWidgets.QLineEdit(self.uiRemoteMainServerGroupBox)
self.uiRemoteMainServerHostLineEdit.setObjectName("uiRemoteMainServerHostLineEdit")
self.gridLayout_4.addWidget(self.uiRemoteMainServerHostLineEdit, 1, 1, 1, 2)
self.label_5 = QtWidgets.QLabel(self.uiRemoteMainServerGroupBox)
self.label_5.setObjectName("label_5")
self.gridLayout_4.addWidget(self.label_5, 5, 0, 1, 2)
self.uiRemoteMainServerAuthCheckBox = QtWidgets.QCheckBox(self.uiRemoteMainServerGroupBox)
self.uiRemoteMainServerAuthCheckBox.setText("")
self.uiRemoteMainServerAuthCheckBox.setObjectName("uiRemoteMainServerAuthCheckBox")
self.gridLayout_4.addWidget(self.uiRemoteMainServerAuthCheckBox, 3, 2, 1, 1)
self.uiRemoteMainServerProtocolLabel = QtWidgets.QLabel(self.uiRemoteMainServerGroupBox)
self.uiRemoteMainServerProtocolLabel.setObjectName("uiRemoteMainServerProtocolLabel")
self.gridLayout_4.addWidget(self.uiRemoteMainServerProtocolLabel, 0, 0, 1, 1)
self.uiRemoteMainServerProtocolComboBox = QtWidgets.QComboBox(self.uiRemoteMainServerGroupBox)
self.uiRemoteMainServerProtocolComboBox.setObjectName("uiRemoteMainServerProtocolComboBox")
self.uiRemoteMainServerProtocolComboBox.addItem("")
self.uiRemoteMainServerProtocolComboBox.addItem("")
self.gridLayout_4.addWidget(self.uiRemoteMainServerProtocolComboBox, 0, 1, 1, 2)
self.verticalLayout.addWidget(self.uiRemoteMainServerGroupBox)
spacerItem2 = QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem2)
@@ -290,11 +301,14 @@ class Ui_ServerPreferencesPageWidget(object):
self.uiUDPPortRangeLabel.setText(_translate("ServerPreferencesPageWidget", "to"))
self.uiRemoteMainServerGroupBox.setTitle(_translate("ServerPreferencesPageWidget", "Remote main server"))
self.label_2.setText(_translate("ServerPreferencesPageWidget", "Host:"))
self.label_3.setText(_translate("ServerPreferencesPageWidget", "Port:"))
self.uiRemoteMainServerPortSpinBox.setSuffix(_translate("ServerPreferencesPageWidget", " TCP"))
self.label.setText(_translate("ServerPreferencesPageWidget", "Auth:"))
self.label_4.setText(_translate("ServerPreferencesPageWidget", "User:"))
self.label_3.setText(_translate("ServerPreferencesPageWidget", "Port:"))
self.label_5.setText(_translate("ServerPreferencesPageWidget", "Password:"))
self.uiRemoteMainServerProtocolLabel.setText(_translate("ServerPreferencesPageWidget", "Protocol:"))
self.uiRemoteMainServerProtocolComboBox.setItemText(0, _translate("ServerPreferencesPageWidget", "HTTP"))
self.uiRemoteMainServerProtocolComboBox.setItemText(1, _translate("ServerPreferencesPageWidget", "HTTPS"))
self.uiServerPreferenceTabWidget.setTabText(self.uiServerPreferenceTabWidget.indexOf(self.uiLocalTabWidget), _translate("ServerPreferencesPageWidget", "Main server"))
self.uiRemoteServersTreeWidget.headerItem().setText(0, _translate("ServerPreferencesPageWidget", "Name"))
self.uiRemoteServersTreeWidget.headerItem().setText(4, _translate("ServerPreferencesPageWidget", "User"))
@@ -304,4 +318,3 @@ class Ui_ServerPreferencesPageWidget(object):
self.label_7.setText(_translate("ServerPreferencesPageWidget", "Note: Changes are not visible in other part of the settings or application until you apply them."))
self.uiServerPreferenceTabWidget.setTabText(self.uiServerPreferenceTabWidget.indexOf(self.uiRemoteTabWidget), _translate("ServerPreferencesPageWidget", "Remote servers"))
self.uiRestoreDefaultsPushButton.setText(_translate("ServerPreferencesPageWidget", "Restore defaults"))

View File

@@ -23,9 +23,9 @@
# or negative for a release candidate or beta (after the base version
# number has been incremented)
__version__ = "2.2.12"
__version_info__ = (2, 2, 12, 0)
# If it's a git checkout try to add the commit
__version__ = "2.2.19"
__version_info__ = (2, 2, 19, 0)
if "dev" in __version__:
try:
import os

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1"
id="svg7631" xmlns:cc="http://creativecommons.org/ns#" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" sodipodi:docname="camera-photo.svg" sodipodi:version="0.32" inkscape:version="0.48.3.1 r9886" inkscape:output_extension="org.inkscape.output.svg.inkscape"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 48 48"
enable-background="new 0 0 48 48" xml:space="preserve">
<g>
<g>
<path fill="#231F20" d="M42.8,38.4l-7.4-9c1.6-2.6,2.5-5.6,2.5-8.8c0-9.3-7.5-16.8-16.8-16.8S4.3,11.3,4.3,20.6
c0,9.3,7.5,16.8,16.8,16.8c3.7,0,7.1-1.2,9.9-3.2l6.8,8.3c0.6,0.7,1.5,0.8,2.2,0.2l2.5-2.1C43.2,40.1,43.3,39.1,42.8,38.4z
M9,20.6c0-6.7,5.4-12.1,12.1-12.1s12.1,5.4,12.1,12.1c0,6.7-5.4,12.1-12.1,12.1S9,27.3,9,20.6z"/>
<polygon fill="#231F20" points="27.6,19 23.2,19 23.2,14.4 19,14.4 19,19 14.5,19 14.5,23.2 19,23.2 19,27.8 23.2,27.8 23.2,23.2
27.6,23.2 "/>
</g>
<g>
<path fill="#CDCDCD" d="M42.6,40l-7.4-9c1.6-2.6,2.5-5.6,2.5-8.8C37.7,13,30.2,5.4,21,5.4S4.2,13,4.2,22.2C4.2,31.5,11.7,39,21,39
c3.7,0,7.1-1.2,9.9-3.2l6.8,8.3c0.6,0.7,1.5,0.8,2.2,0.2l2.5-2.1C43.1,41.7,43.2,40.7,42.6,40z M8.9,22.2
c0-6.7,5.4-12.1,12.1-12.1S33,15.6,33,22.2c0,6.7-5.4,12.1-12.1,12.1S8.9,28.9,8.9,22.2z"/>
<polygon fill="#CDCDCD" points="27.8,20.6 23.2,20.6 23.2,16 18.9,16 18.9,20.6 14.4,20.6 14.4,24.9 18.9,24.9 18.9,29.4
23.2,29.4 23.2,24.9 27.8,24.9 "/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -171,8 +171,8 @@ def test_create_new_version():
os.path.dirname(__file__), "appliances", "microcore-linux.gns3a")
a = Appliance(registry, appliance_path)
a.create_new_version("42.0")
new_version = {'images': {'hda_disk_image': {'filename': 'linux-microcore-42.0.img', 'version': '42.0'}}, 'name': '42.0'}
a.create_new_version(new_version)
v = a['versions'][-1:][0]
assert v == {
'images':