mirror of
https://github.com/GNS3/gns3-gui.git
synced 2026-05-17 00:46:01 +03:00
Auto pep8
This commit is contained in:
@@ -29,6 +29,7 @@ from .pycutext import PyCutExt
|
||||
from .modules import MODULES
|
||||
from .local_config import LocalConfig
|
||||
|
||||
|
||||
class ConsoleView(PyCutExt, ConsoleCmd):
|
||||
|
||||
def __init__(self, parent):
|
||||
|
||||
@@ -33,6 +33,7 @@ from ..gns3_vm import GNS3VM
|
||||
|
||||
|
||||
class ApplianceWizard(QtWidgets.QWizard, Ui_ApplianceWizard):
|
||||
|
||||
def __init__(self, parent, path):
|
||||
super().__init__(parent)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ Processus:
|
||||
memory=psutil.virtual_memory(),
|
||||
cpu=psutil.cpu_times(),
|
||||
connections=connections,
|
||||
addrs="\n".join(["* {}: {}".format(key, val) for key,val in psutil.net_if_addrs().items()])
|
||||
addrs="\n".join(["* {}: {}".format(key, val) for key, val in psutil.net_if_addrs().items()])
|
||||
)
|
||||
for proc in psutil.process_iter():
|
||||
try:
|
||||
|
||||
@@ -65,7 +65,6 @@ class NodePropertiesDialog(QtWidgets.QDialog, Ui_NodePropertiesDialog):
|
||||
if not node_item.node().initialized():
|
||||
continue
|
||||
|
||||
|
||||
# If something of one of the displayed nodes we reload everything
|
||||
node_item.node().updated_signal.connect(self.resetSettings)
|
||||
|
||||
|
||||
@@ -170,15 +170,14 @@ class PreferencesDialog(QtWidgets.QDialog, Ui_PreferencesDialog):
|
||||
|
||||
if self._modified:
|
||||
reply = QtWidgets.QMessageBox.warning(self,
|
||||
"Preferences",
|
||||
"You have unsaved preferences.\n\nContinue without saving?",
|
||||
QtWidgets.QMessageBox.Yes,
|
||||
QtWidgets.QMessageBox.No)
|
||||
"Preferences",
|
||||
"You have unsaved preferences.\n\nContinue without saving?",
|
||||
QtWidgets.QMessageBox.Yes,
|
||||
QtWidgets.QMessageBox.No)
|
||||
if reply == QtWidgets.QMessageBox.No:
|
||||
return
|
||||
QtWidgets.QDialog.reject(self)
|
||||
|
||||
|
||||
def accept(self):
|
||||
"""
|
||||
Saves the preferences and closes this dialog.
|
||||
|
||||
@@ -168,4 +168,3 @@ class VMWithImagesWizard(VMWizard):
|
||||
QtWidgets.QMessageBox.critical(self, "Images", "Please upgrade the gns3 server to a version >= 1.4.0b4")
|
||||
return
|
||||
combo_box.addItem(vm["path"], vm)
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ class VMWizard(QtWidgets.QWizard):
|
||||
if hasattr(self, "uiLoadBalanceCheckBox"):
|
||||
self.uiLoadBalanceCheckBox.toggled.connect(self._loadBalanceToggledSlot)
|
||||
|
||||
|
||||
# By default we use the local server
|
||||
self._server = Servers.instance().localServer()
|
||||
self.uiLocalRadioButton.setChecked(True)
|
||||
@@ -61,7 +60,6 @@ class VMWizard(QtWidgets.QWizard):
|
||||
# skip the server page if we use the local server
|
||||
self.setStartId(1)
|
||||
|
||||
|
||||
def _vmToggledSlot(self, checked):
|
||||
"""
|
||||
Slot for when the VM radio button is toggled.
|
||||
|
||||
@@ -972,7 +972,7 @@ class GraphicsView(QtWidgets.QGraphicsView):
|
||||
break
|
||||
|
||||
if os.path.exists(vm_dir):
|
||||
log.debug("Open %s in file manage" )
|
||||
log.debug("Open %s in file manage")
|
||||
if QtGui.QDesktopServices.openUrl(QtCore.QUrl.fromLocalFile(vm_dir)) is False:
|
||||
QtWidgets.QMessageBox.critical(self, "Show in file manager", "Failed to open {}".format(vm_dir))
|
||||
break
|
||||
|
||||
@@ -151,7 +151,7 @@ class ImageManager:
|
||||
img_directory = self.getDirectoryForType(vm_type)
|
||||
path = os.path.abspath(path)
|
||||
if os.path.commonprefix([img_directory, path]) == img_directory:
|
||||
return os.path.relpath(path, img_directory)
|
||||
return os.path.relpath(path, img_directory)
|
||||
return path
|
||||
|
||||
def getDirectory(self):
|
||||
|
||||
@@ -37,7 +37,9 @@ from gns3.version import __version__
|
||||
from gns3.local_config import LocalConfig
|
||||
from gns3.ui.iouvm_converter_wizard_ui import Ui_IOUVMConverterWizard
|
||||
|
||||
|
||||
class IOUVMConverterWizard(QtWidgets.QWizard, Ui_IOUVMConverterWizard):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
||||
@@ -47,7 +49,7 @@ class IOUVMConverterWizard(QtWidgets.QWizard, Ui_IOUVMConverterWizard):
|
||||
self.setOptions(QtWidgets.QWizard.NoDefaultButton)
|
||||
|
||||
# set the window icon
|
||||
self.setWindowIcon(QtGui.QIcon(":/images/gns3.ico"))# this info is necessary for QSettings
|
||||
self.setWindowIcon(QtGui.QIcon(":/images/gns3.ico")) # this info is necessary for QSettings
|
||||
|
||||
config = self._loadConfig()
|
||||
self.uiPushButtonBrowse.clicked.connect(self._browseTopologiesSlot)
|
||||
@@ -148,7 +150,8 @@ class IOUVMConverterWizard(QtWidgets.QWizard, Ui_IOUVMConverterWizard):
|
||||
else:
|
||||
filename = "gns3_gui.conf"
|
||||
directory = LocalConfig.configDirectory()
|
||||
return os.path.join(directory, filename)
|
||||
return os.path.join(directory, filename)
|
||||
|
||||
|
||||
def main():
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
@@ -51,8 +51,8 @@ class NodeItem():
|
||||
effect.setColor(QtGui.QColor("black"))
|
||||
effect.setStrength(0.8)
|
||||
#effect = QtWidgets.QGraphicsDropShadowEffect()
|
||||
#effect.setColor(QtGui.QColor("darkGray"))
|
||||
#effect.setBlurRadius(0)
|
||||
# effect.setColor(QtGui.QColor("darkGray"))
|
||||
# effect.setBlurRadius(0)
|
||||
#effect.setOffset(3, 3)
|
||||
self.setGraphicsEffect(effect)
|
||||
self.graphicsEffect().setEnabled(False)
|
||||
|
||||
@@ -268,7 +268,6 @@ class LocalConfig(QtCore.QObject):
|
||||
|
||||
return copy.deepcopy(settings)
|
||||
|
||||
|
||||
def saveSectionSettings(self, section, settings):
|
||||
"""
|
||||
Save all the settings in a given section.
|
||||
|
||||
@@ -231,7 +231,6 @@ def main():
|
||||
global app
|
||||
app = Application(sys.argv)
|
||||
|
||||
|
||||
# save client logging info to a file
|
||||
logfile = os.path.join(LocalConfig.configDirectory(), "gns3_gui.log")
|
||||
|
||||
|
||||
@@ -1202,7 +1202,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
running_nodes.append(node.name())
|
||||
return running_nodes
|
||||
|
||||
|
||||
def saveProjectAs(self):
|
||||
"""
|
||||
Saves a project to another location/name.
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_cloudConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, cloudConfigPageWidget):
|
||||
cloudConfigPageWidget.setObjectName("cloudConfigPageWidget")
|
||||
cloudConfigPageWidget.resize(653, 478)
|
||||
@@ -455,4 +457,3 @@ class Ui_cloudConfigPageWidget(object):
|
||||
self.uiNIOsTabWidget.setTabText(self.uiNIOsTabWidget.indexOf(self.NIONullTab), _translate("cloudConfigPageWidget", "NULL"))
|
||||
self.uiNameLabel.setText(_translate("cloudConfigPageWidget", "Name:"))
|
||||
self.uiNIOsTabWidget.setTabText(self.uiNIOsTabWidget.indexOf(self.MiscTab), _translate("cloudConfigPageWidget", "Misc."))
|
||||
|
||||
|
||||
@@ -238,7 +238,6 @@ class Docker(Module):
|
||||
from .pages.docker_preferences_page import DockerPreferencesPage
|
||||
from .pages.docker_vm_preferences_page import DockerVMPreferencesPage
|
||||
|
||||
|
||||
from gns3.local_config import LocalConfig
|
||||
if not LocalConfig.instance().experimental():
|
||||
return []
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_DockerPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, DockerPreferencesPageWidget):
|
||||
DockerPreferencesPageWidget.setObjectName("DockerPreferencesPageWidget")
|
||||
DockerPreferencesPageWidget.resize(200, 200)
|
||||
@@ -48,4 +50,3 @@ class Ui_DockerPreferencesPageWidget(object):
|
||||
self.uiUseLocalServercheckBox.setText(_translate("DockerPreferencesPageWidget", "Use the local server"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.uiServerSettingsTabWidget), _translate("DockerPreferencesPageWidget", "General settings"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("DockerPreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_dockerVMConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, dockerVMConfigPageWidget):
|
||||
dockerVMConfigPageWidget.setObjectName("dockerVMConfigPageWidget")
|
||||
dockerVMConfigPageWidget.resize(509, 346)
|
||||
@@ -57,4 +59,3 @@ class Ui_dockerVMConfigPageWidget(object):
|
||||
self.uiCMDLabel.setText(_translate("dockerVMConfigPageWidget", "CMD:"))
|
||||
self.uiImageListLabel.setText(_translate("dockerVMConfigPageWidget", "Image name:"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.tab), _translate("dockerVMConfigPageWidget", "General settings"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_DockerVMPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, DockerVMPreferencesPageWidget):
|
||||
DockerVMPreferencesPageWidget.setObjectName("DockerVMPreferencesPageWidget")
|
||||
DockerVMPreferencesPageWidget.resize(505, 350)
|
||||
@@ -73,4 +75,3 @@ class Ui_DockerVMPreferencesPageWidget(object):
|
||||
self.uiDeleteDockerVMPushButton.setText(_translate("DockerVMPreferencesPageWidget", "&Delete"))
|
||||
self.uiDockerVMInfoTreeWidget.headerItem().setText(0, _translate("DockerVMPreferencesPageWidget", "1"))
|
||||
self.uiDockerVMInfoTreeWidget.headerItem().setText(1, _translate("DockerVMPreferencesPageWidget", "2"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_DockerVMWizard(object):
|
||||
|
||||
def setupUi(self, DockerVMWizard):
|
||||
DockerVMWizard.setObjectName("DockerVMWizard")
|
||||
DockerVMWizard.resize(585, 424)
|
||||
@@ -91,4 +93,3 @@ class Ui_DockerVMWizard(object):
|
||||
self.uiImageWizardPage.setTitle(_translate("DockerVMWizard", "Docker Virtual Machine"))
|
||||
self.uiImageWizardPage.setSubTitle(_translate("DockerVMWizard", "Please choose a Docker virtual machine from the list."))
|
||||
self.uiImageListLabel.setText(_translate("DockerVMWizard", "Image list:"))
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class EthernetSwitch(Device):
|
||||
self._ports.append(port)
|
||||
self._settings["ports"][port.portNumber()] = {"type": initial_port["type"],
|
||||
"vlan": initial_port["vlan"],
|
||||
"ethertype": initial_port.get("ethertype","")}
|
||||
"ethertype": initial_port.get("ethertype", "")}
|
||||
|
||||
params = {"name": name,
|
||||
"device_type": "ethernet_switch"}
|
||||
@@ -231,9 +231,9 @@ class EthernetSwitch(Device):
|
||||
port_ethertype_info = "({})".format(port_ethertype)
|
||||
|
||||
port_info += " Port {name} is in {port_type} {port_ethertype_info} mode, with {port_vlan_info},\n".format(name=port.name(),
|
||||
port_type=port_type,
|
||||
port_ethertype_info=port_ethertype_info,
|
||||
port_vlan_info=port_vlan_info)
|
||||
port_type=port_type,
|
||||
port_ethertype_info=port_ethertype_info,
|
||||
port_vlan_info=port_vlan_info)
|
||||
port_info += " {port_description}\n".format(port_description=port.description())
|
||||
|
||||
return info + port_info
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_atmBridgeConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, atmBridgeConfigPageWidget):
|
||||
atmBridgeConfigPageWidget.setObjectName("atmBridgeConfigPageWidget")
|
||||
atmBridgeConfigPageWidget.resize(432, 358)
|
||||
@@ -150,4 +152,3 @@ class Ui_atmBridgeConfigPageWidget(object):
|
||||
self.uiDeletePushButton.setText(_translate("atmBridgeConfigPageWidget", "&Delete"))
|
||||
self.uiGeneralGroupBox.setTitle(_translate("atmBridgeConfigPageWidget", "General"))
|
||||
self.uiNameLabel.setText(_translate("atmBridgeConfigPageWidget", "Name:"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_atmSwitchConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, atmSwitchConfigPageWidget):
|
||||
atmSwitchConfigPageWidget.setObjectName("atmSwitchConfigPageWidget")
|
||||
atmSwitchConfigPageWidget.resize(459, 419)
|
||||
@@ -184,4 +186,3 @@ class Ui_atmSwitchConfigPageWidget(object):
|
||||
self.uiDestinationPortLabel.setText(_translate("atmSwitchConfigPageWidget", "Port:"))
|
||||
self.uiDestinationVPILabel.setText(_translate("atmSwitchConfigPageWidget", "VPI:"))
|
||||
self.uiDestinationVCILabel.setText(_translate("atmSwitchConfigPageWidget", "VCI:"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_DynamipsPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, DynamipsPreferencesPageWidget):
|
||||
DynamipsPreferencesPageWidget.setObjectName("DynamipsPreferencesPageWidget")
|
||||
DynamipsPreferencesPageWidget.resize(435, 200)
|
||||
@@ -107,4 +109,3 @@ class Ui_DynamipsPreferencesPageWidget(object):
|
||||
self.uiSparseMemorySupportCheckBox.setText(_translate("DynamipsPreferencesPageWidget", "Enable sparse memory support"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.uiAdvancedSettingsTabWidget), _translate("DynamipsPreferencesPageWidget", "Advanced settings"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("DynamipsPreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_ethernetHubConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, ethernetHubConfigPageWidget):
|
||||
ethernetHubConfigPageWidget.setObjectName("ethernetHubConfigPageWidget")
|
||||
ethernetHubConfigPageWidget.resize(381, 270)
|
||||
@@ -56,4 +58,3 @@ class Ui_ethernetHubConfigPageWidget(object):
|
||||
self.uiSettingsGroupBox.setTitle(_translate("ethernetHubConfigPageWidget", "Settings"))
|
||||
self.uiNameLabel.setText(_translate("ethernetHubConfigPageWidget", "Name:"))
|
||||
self.uiPortsLabel.setText(_translate("ethernetHubConfigPageWidget", "Number of ports:"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_ethernetSwitchConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, ethernetSwitchConfigPageWidget):
|
||||
ethernetSwitchConfigPageWidget.setObjectName("ethernetSwitchConfigPageWidget")
|
||||
ethernetSwitchConfigPageWidget.resize(397, 315)
|
||||
@@ -141,4 +143,3 @@ class Ui_ethernetSwitchConfigPageWidget(object):
|
||||
self.uiPortEtherTypeComboBox.setItemText(3, _translate("ethernetSwitchConfigPageWidget", "0x9200"))
|
||||
self.uiAddPushButton.setText(_translate("ethernetSwitchConfigPageWidget", "&Add"))
|
||||
self.uiDeletePushButton.setText(_translate("ethernetSwitchConfigPageWidget", "&Delete"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_frameRelaySwitchConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, frameRelaySwitchConfigPageWidget):
|
||||
frameRelaySwitchConfigPageWidget.setObjectName("frameRelaySwitchConfigPageWidget")
|
||||
frameRelaySwitchConfigPageWidget.resize(499, 405)
|
||||
@@ -147,4 +149,3 @@ class Ui_frameRelaySwitchConfigPageWidget(object):
|
||||
self.uiDestinationDLCILabel.setText(_translate("frameRelaySwitchConfigPageWidget", "DLCI:"))
|
||||
self.uiAddPushButton.setText(_translate("frameRelaySwitchConfigPageWidget", "&Add"))
|
||||
self.uiDeletePushButton.setText(_translate("frameRelaySwitchConfigPageWidget", "&Delete"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_iosRouterConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, iosRouterConfigPageWidget):
|
||||
iosRouterConfigPageWidget.setObjectName("iosRouterConfigPageWidget")
|
||||
iosRouterConfigPageWidget.resize(476, 510)
|
||||
@@ -617,4 +619,3 @@ class Ui_iosRouterConfigPageWidget(object):
|
||||
self.uiSensor4Label.setText(_translate("iosRouterConfigPageWidget", "NPE outlet:"))
|
||||
self.uiSensor4SpinBox.setSuffix(_translate("iosRouterConfigPageWidget", " C"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.uiEnvironmentPageWidget), _translate("iosRouterConfigPageWidget", "Environment"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_IOSRouterPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, IOSRouterPreferencesPageWidget):
|
||||
IOSRouterPreferencesPageWidget.setObjectName("IOSRouterPreferencesPageWidget")
|
||||
IOSRouterPreferencesPageWidget.resize(505, 350)
|
||||
@@ -76,4 +78,3 @@ class Ui_IOSRouterPreferencesPageWidget(object):
|
||||
self.uiDecompressIOSPushButton.setText(_translate("IOSRouterPreferencesPageWidget", "&Decompress"))
|
||||
self.uiEditIOSRouterPushButton.setText(_translate("IOSRouterPreferencesPageWidget", "&Edit"))
|
||||
self.uiDeleteIOSRouterPushButton.setText(_translate("IOSRouterPreferencesPageWidget", "&Delete"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_IOSRouterWizard(object):
|
||||
|
||||
def setupUi(self, IOSRouterWizard):
|
||||
IOSRouterWizard.setObjectName("IOSRouterWizard")
|
||||
IOSRouterWizard.resize(585, 398)
|
||||
@@ -336,4 +338,3 @@ class Ui_IOSRouterWizard(object):
|
||||
self.uiIdlePCWizardPage.setSubTitle(_translate("IOSRouterWizard", "An idle-pc value is necessary to prevent IOS to use 100% of your processor or one of its core."))
|
||||
self.uiIdlepcLabel.setText(_translate("IOSRouterWizard", "Idle-PC:"))
|
||||
self.uiIdlePCFinderPushButton.setText(_translate("IOSRouterWizard", "Idle-PC finder"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_iouDeviceConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, iouDeviceConfigPageWidget):
|
||||
iouDeviceConfigPageWidget.setObjectName("iouDeviceConfigPageWidget")
|
||||
iouDeviceConfigPageWidget.resize(461, 520)
|
||||
@@ -219,4 +221,3 @@ class Ui_iouDeviceConfigPageWidget(object):
|
||||
self.uiSerialAdaptersLabel.setText(_translate("iouDeviceConfigPageWidget", "Serial adapters:"))
|
||||
self.uiSerialAdaptersSpinBox.setToolTip(_translate("iouDeviceConfigPageWidget", "1 adapter equals 4 serial interfaces"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.tab_2), _translate("iouDeviceConfigPageWidget", "Network"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_IOUDevicePreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, IOUDevicePreferencesPageWidget):
|
||||
IOUDevicePreferencesPageWidget.setObjectName("IOUDevicePreferencesPageWidget")
|
||||
IOUDevicePreferencesPageWidget.resize(505, 350)
|
||||
@@ -73,4 +75,3 @@ class Ui_IOUDevicePreferencesPageWidget(object):
|
||||
self.uiDeleteIOUDevicePushButton.setText(_translate("IOUDevicePreferencesPageWidget", "&Delete"))
|
||||
self.uiIOUDeviceInfoTreeWidget.headerItem().setText(0, _translate("IOUDevicePreferencesPageWidget", "1"))
|
||||
self.uiIOUDeviceInfoTreeWidget.headerItem().setText(1, _translate("IOUDevicePreferencesPageWidget", "2"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_IOUDeviceWizard(object):
|
||||
|
||||
def setupUi(self, IOUDeviceWizard):
|
||||
IOUDeviceWizard.setObjectName("IOUDeviceWizard")
|
||||
IOUDeviceWizard.resize(585, 423)
|
||||
@@ -142,4 +144,3 @@ class Ui_IOUDeviceWizard(object):
|
||||
self.uiTypeLabel.setText(_translate("IOUDeviceWizard", "Type:"))
|
||||
self.uiIOUImageLabel.setText(_translate("IOUDeviceWizard", "IOU image:"))
|
||||
self.uiIOUImageToolButton.setText(_translate("IOUDeviceWizard", "&Browse..."))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_IOUPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, IOUPreferencesPageWidget):
|
||||
IOUPreferencesPageWidget.setObjectName("IOUPreferencesPageWidget")
|
||||
IOUPreferencesPageWidget.resize(400, 300)
|
||||
@@ -104,4 +106,3 @@ class Ui_IOUPreferencesPageWidget(object):
|
||||
self.uiIOURCPathToolButton.setText(_translate("IOUPreferencesPageWidget", "&Browse..."))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.uiGeneralSettingsTabWidget), _translate("IOUPreferencesPageWidget", "General settings"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("IOUPreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ from ..ui.qemu_vm_wizard_ui import Ui_QemuVMWizard
|
||||
from ..pages.qemu_vm_configuration_page import QemuVMConfigurationPage
|
||||
from .qemu_image_wizard import QemuImageWizard
|
||||
|
||||
|
||||
class QemuVMWizard(VMWithImagesWizard, Ui_QemuVMWizard):
|
||||
|
||||
"""
|
||||
|
||||
@@ -271,7 +271,6 @@ class QemuVMConfigurationPage(QtWidgets.QWidget, Ui_QemuVMConfigPageWidget):
|
||||
if qemu_path and "/" not in qemu_path and "\\" not in qemu_path:
|
||||
self.uiQemuListComboBox.addItem("{path}".format(path=qemu_path), qemu_path)
|
||||
|
||||
|
||||
index = self.uiQemuListComboBox.findData("{path}".format(path=qemu_path))
|
||||
if index != -1:
|
||||
self.uiQemuListComboBox.setCurrentIndex(index)
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_QemuImageWizard(object):
|
||||
|
||||
def setupUi(self, QemuImageWizard):
|
||||
QemuImageWizard.setObjectName("QemuImageWizard")
|
||||
QemuImageWizard.resize(535, 369)
|
||||
@@ -317,11 +319,11 @@ class Ui_QemuImageWizard(object):
|
||||
self.uiFormatQcow2Radio.setToolTip(_translate("QemuImageWizard", "Qcow2 is the current Qemu format, supporting many special features."))
|
||||
self.uiFormatQcowRadio.setToolTip(_translate("QemuImageWizard", "Qcow is a legacy Qemu format that is also supported by VirtualBox."))
|
||||
self.uiFormatVhdRadio.setToolTip(_translate("QemuImageWizard", "VHD is the format used by Microsoft VirtualPC, and is also supported by Qemu and VirtualBox.\n"
|
||||
"On Windows 7 and above, it can be mounted on the host PC."))
|
||||
"On Windows 7 and above, it can be mounted on the host PC."))
|
||||
self.uiFormatVdiRadio.setToolTip(_translate("QemuImageWizard", "VDI is the native format of VirtualBox"))
|
||||
self.uiFormatVmdkRadio.setToolTip(_translate("QemuImageWizard", "VMDK is the native format for VMware and is also supported by Qemu and VirtualBox."))
|
||||
self.uiFormatRawRadio.setToolTip(_translate("QemuImageWizard", "Raw image files represent the actual data on the image, with zero special features.\n"
|
||||
"It can easily be converted to various other formats by various utilities, making it the most portable format."))
|
||||
"It can easily be converted to various other formats by various utilities, making it the most portable format."))
|
||||
self.uiFormatRawRadio.setText(_translate("QemuImageWizard", "Raw"))
|
||||
self.uiQcow2OptionsWizardPage.setTitle(_translate("QemuImageWizard", "Qcow2 options"))
|
||||
self.uiSizeOptionsGroupBox.setTitle(_translate("QemuImageWizard", "Size options"))
|
||||
@@ -329,12 +331,12 @@ class Ui_QemuImageWizard(object):
|
||||
self.uiQcow2PreallocationOffRadio.setToolTip(_translate("QemuImageWizard", "The file only takes as much space from the host as needed. The VM will still see the full capacity you specify."))
|
||||
self.uiQcow2PreallocationOffRadio.setText(_translate("QemuImageWizard", "off"))
|
||||
self.uiQcow2PreallocationMetadataRadio.setToolTip(_translate("QemuImageWizard", "Same as \"off\", but preallocates enough space to hold any potenial metadata for the HDD.\n"
|
||||
"This improves performance when the image file needs to grow."))
|
||||
"This improves performance when the image file needs to grow."))
|
||||
self.uiQcow2PreallocationMetadataRadio.setText(_translate("QemuImageWizard", "metadata"))
|
||||
self.uiQcow2PreallocationFallocRadio.setToolTip(_translate("QemuImageWizard", "Same as \"full\", but uses C\'s posix_fallocate() if available on the host, instead of zero filling the file."))
|
||||
self.uiQcow2PreallocationFallocRadio.setText(_translate("QemuImageWizard", "falloc"))
|
||||
self.uiQcow2PreallocationFullRadio.setToolTip(_translate("QemuImageWizard", "The file will start off at the full size you specify.\n"
|
||||
"Free space will be zero filled."))
|
||||
"Free space will be zero filled."))
|
||||
self.uiQcow2PreallocationFullRadio.setText(_translate("QemuImageWizard", "full"))
|
||||
self.uiClusterSizeLabel.setText(_translate("QemuImageWizard", "Cluster size:"))
|
||||
self.uiQcow2ClusterSizeComboBox.setItemText(0, _translate("QemuImageWizard", "<default>"))
|
||||
@@ -394,4 +396,3 @@ class Ui_QemuImageWizard(object):
|
||||
self.uiLocationBrowseToolButton.setText(_translate("QemuImageWizard", "Browse"))
|
||||
self.uiSizeLabel.setText(_translate("QemuImageWizard", "Disk size:"))
|
||||
self.uiSizeSpinBox.setSuffix(_translate("QemuImageWizard", " MiB"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_QemuPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, QemuPreferencesPageWidget):
|
||||
QemuPreferencesPageWidget.setObjectName("QemuPreferencesPageWidget")
|
||||
QemuPreferencesPageWidget.resize(366, 336)
|
||||
@@ -52,4 +54,3 @@ class Ui_QemuPreferencesPageWidget(object):
|
||||
self.uiKVMAccelerationCheckBox.setText(_translate("QemuPreferencesPageWidget", "Enable KVM acceleration"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.uiServerSettingsTabWidget), _translate("QemuPreferencesPageWidget", "General settings"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("QemuPreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_QemuVMConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, QemuVMConfigPageWidget):
|
||||
QemuVMConfigPageWidget.setObjectName("QemuVMConfigPageWidget")
|
||||
QemuVMConfigPageWidget.resize(611, 524)
|
||||
@@ -469,4 +471,3 @@ class Ui_QemuVMConfigPageWidget(object):
|
||||
self.uiBaseVMCheckBox.setText(_translate("QemuVMConfigPageWidget", "Use as a linked base VM"))
|
||||
self.uiACPIShutdownCheckBox.setText(_translate("QemuVMConfigPageWidget", "Enable ACPI shutdown (experimental)"))
|
||||
self.uiQemutabWidget.setTabText(self.uiQemutabWidget.indexOf(self.uiAdvancedSettingsTab), _translate("QemuVMConfigPageWidget", "Advanced settings"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_QemuVMPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, QemuVMPreferencesPageWidget):
|
||||
QemuVMPreferencesPageWidget.setObjectName("QemuVMPreferencesPageWidget")
|
||||
QemuVMPreferencesPageWidget.resize(505, 350)
|
||||
@@ -73,4 +75,3 @@ class Ui_QemuVMPreferencesPageWidget(object):
|
||||
self.uiDeleteQemuVMPushButton.setText(_translate("QemuVMPreferencesPageWidget", "&Delete"))
|
||||
self.uiQemuVMInfoTreeWidget.headerItem().setText(0, _translate("QemuVMPreferencesPageWidget", "1"))
|
||||
self.uiQemuVMInfoTreeWidget.headerItem().setText(1, _translate("QemuVMPreferencesPageWidget", "2"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_QemuVMWizard(object):
|
||||
|
||||
def setupUi(self, QemuVMWizard):
|
||||
QemuVMWizard.setObjectName("QemuVMWizard")
|
||||
QemuVMWizard.resize(623, 417)
|
||||
@@ -62,7 +64,7 @@ class Ui_QemuVMWizard(object):
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.uiOSDeprecatedWarningLabel = QtWidgets.QLabel(self.uiTypeWizardPage)
|
||||
self.uiOSDeprecatedWarningLabel.setStyleSheet("color: red;\n"
|
||||
"font: 18pt;")
|
||||
"font: 18pt;")
|
||||
self.uiOSDeprecatedWarningLabel.setWordWrap(True)
|
||||
self.uiOSDeprecatedWarningLabel.setObjectName("uiOSDeprecatedWarningLabel")
|
||||
self.verticalLayout.addWidget(self.uiOSDeprecatedWarningLabel)
|
||||
@@ -312,4 +314,3 @@ class Ui_QemuVMWizard(object):
|
||||
self.uiHdbDiskImageLabel.setText(_translate("QemuVMWizard", "Disk image (hdb):"))
|
||||
self.uiHdbDiskImageToolButton.setText(_translate("QemuVMWizard", "&Browse..."))
|
||||
self.uiHdbDiskImageCreateToolButton.setText(_translate("QemuVMWizard", "Create"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_VirtualBoxPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, VirtualBoxPreferencesPageWidget):
|
||||
VirtualBoxPreferencesPageWidget.setObjectName("VirtualBoxPreferencesPageWidget")
|
||||
VirtualBoxPreferencesPageWidget.resize(450, 250)
|
||||
@@ -68,4 +70,3 @@ class Ui_VirtualBoxPreferencesPageWidget(object):
|
||||
self.uiVboxManagePathToolButton.setText(_translate("VirtualBoxPreferencesPageWidget", "&Browse..."))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.uiGeneralSettingsTabWidget), _translate("VirtualBoxPreferencesPageWidget", "General settings"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("VirtualBoxPreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_virtualBoxVMConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, virtualBoxVMConfigPageWidget):
|
||||
virtualBoxVMConfigPageWidget.setObjectName("virtualBoxVMConfigPageWidget")
|
||||
virtualBoxVMConfigPageWidget.resize(510, 463)
|
||||
@@ -171,4 +173,3 @@ class Ui_virtualBoxVMConfigPageWidget(object):
|
||||
self.uiPortNameFormatLabel.setText(_translate("virtualBoxVMConfigPageWidget", "Name format:"))
|
||||
self.uiFirstPortNameLabel.setText(_translate("virtualBoxVMConfigPageWidget", "First port name:"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.tab_2), _translate("virtualBoxVMConfigPageWidget", "Network"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_VirtualBoxVMPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, VirtualBoxVMPreferencesPageWidget):
|
||||
VirtualBoxVMPreferencesPageWidget.setObjectName("VirtualBoxVMPreferencesPageWidget")
|
||||
VirtualBoxVMPreferencesPageWidget.resize(505, 350)
|
||||
@@ -73,4 +75,3 @@ class Ui_VirtualBoxVMPreferencesPageWidget(object):
|
||||
self.uiDeleteVirtualBoxVMPushButton.setText(_translate("VirtualBoxVMPreferencesPageWidget", "&Delete"))
|
||||
self.uiVirtualBoxVMInfoTreeWidget.headerItem().setText(0, _translate("VirtualBoxVMPreferencesPageWidget", "1"))
|
||||
self.uiVirtualBoxVMInfoTreeWidget.headerItem().setText(1, _translate("VirtualBoxVMPreferencesPageWidget", "2"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_VirtualBoxVMWizard(object):
|
||||
|
||||
def setupUi(self, VirtualBoxVMWizard):
|
||||
VirtualBoxVMWizard.setObjectName("VirtualBoxVMWizard")
|
||||
VirtualBoxVMWizard.resize(514, 367)
|
||||
@@ -87,4 +89,3 @@ class Ui_VirtualBoxVMWizard(object):
|
||||
self.uiVirtualBoxWizardPage.setSubTitle(_translate("VirtualBoxVMWizard", "Please choose a VirtualBox virtual machine from the list."))
|
||||
self.uiVMListLabel.setText(_translate("VirtualBoxVMWizard", "VM list:"))
|
||||
self.uiBaseVMCheckBox.setText(_translate("VirtualBoxVMWizard", "Use as a linked base VM (experimental)"))
|
||||
|
||||
|
||||
@@ -102,8 +102,8 @@ class VMwareVMConfigurationPage(QtWidgets.QWidget, Ui_VMwareVMConfigPageWidget):
|
||||
self.uiNameLineEdit.hide()
|
||||
self.uiConsolePortLabel.hide()
|
||||
self.uiConsolePortSpinBox.hide()
|
||||
#self.uiVMListLabel.hide()
|
||||
#self.uiVMListComboBox.hide()
|
||||
# self.uiVMListLabel.hide()
|
||||
# self.uiVMListComboBox.hide()
|
||||
|
||||
if not node:
|
||||
# load the symbol
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_VMwarePreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, VMwarePreferencesPageWidget):
|
||||
VMwarePreferencesPageWidget.setObjectName("VMwarePreferencesPageWidget")
|
||||
VMwarePreferencesPageWidget.resize(462, 532)
|
||||
@@ -125,4 +127,3 @@ class Ui_VMwarePreferencesPageWidget(object):
|
||||
self.uiResetVmnetPushButton.setText(_translate("VMwarePreferencesPageWidget", "&Reset"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.uiNetworkTab), _translate("VMwarePreferencesPageWidget", "Network"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("VMwarePreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_VMwareVMConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, VMwareVMConfigPageWidget):
|
||||
VMwareVMConfigPageWidget.setObjectName("VMwareVMConfigPageWidget")
|
||||
VMwareVMConfigPageWidget.resize(494, 381)
|
||||
@@ -149,4 +151,3 @@ class Ui_VMwareVMConfigPageWidget(object):
|
||||
self.uiFirstPortNameLabel.setText(_translate("VMwareVMConfigPageWidget", "First port name:"))
|
||||
self.uiUseUbridgeCheckBox.setText(_translate("VMwareVMConfigPageWidget", "Use uBridge for network connections"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.tab_2), _translate("VMwareVMConfigPageWidget", "Network"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_VMwareVMPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, VMwareVMPreferencesPageWidget):
|
||||
VMwareVMPreferencesPageWidget.setObjectName("VMwareVMPreferencesPageWidget")
|
||||
VMwareVMPreferencesPageWidget.resize(505, 350)
|
||||
@@ -73,4 +75,3 @@ class Ui_VMwareVMPreferencesPageWidget(object):
|
||||
self.uiDeleteVMwareVMPushButton.setText(_translate("VMwareVMPreferencesPageWidget", "&Delete"))
|
||||
self.uiVMwareVMInfoTreeWidget.headerItem().setText(0, _translate("VMwareVMPreferencesPageWidget", "1"))
|
||||
self.uiVMwareVMInfoTreeWidget.headerItem().setText(1, _translate("VMwareVMPreferencesPageWidget", "2"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_VMwareVMWizard(object):
|
||||
|
||||
def setupUi(self, VMwareVMWizard):
|
||||
VMwareVMWizard.setObjectName("VMwareVMWizard")
|
||||
VMwareVMWizard.resize(514, 367)
|
||||
@@ -87,4 +89,3 @@ class Ui_VMwareVMWizard(object):
|
||||
self.uiVirtualBoxWizardPage.setSubTitle(_translate("VMwareVMWizard", "Please choose a VMware virtual machine from the list."))
|
||||
self.uiVMListLabel.setText(_translate("VMwareVMWizard", "VM list:"))
|
||||
self.uiBaseVMCheckBox.setText(_translate("VMwareVMWizard", "Use as a linked base VM (experimental)"))
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ class VPCS(Module):
|
||||
|
||||
self._loadSettings()
|
||||
|
||||
|
||||
def configChangedSlot(self):
|
||||
# load the settings
|
||||
self._loadSettings()
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_VPCSDeviceConfigPageWidget(object):
|
||||
|
||||
def setupUi(self, VPCSDeviceConfigPageWidget):
|
||||
VPCSDeviceConfigPageWidget.setObjectName("VPCSDeviceConfigPageWidget")
|
||||
VPCSDeviceConfigPageWidget.resize(391, 246)
|
||||
@@ -38,4 +40,3 @@ class Ui_VPCSDeviceConfigPageWidget(object):
|
||||
VPCSDeviceConfigPageWidget.setWindowTitle(_translate("VPCSDeviceConfigPageWidget", "VPCS device configuration"))
|
||||
self.uiConsolePortLabel.setText(_translate("VPCSDeviceConfigPageWidget", "Console port:"))
|
||||
self.uiNameLabel.setText(_translate("VPCSDeviceConfigPageWidget", "Name:"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_VPCSPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, VPCSPreferencesPageWidget):
|
||||
VPCSPreferencesPageWidget.setObjectName("VPCSPreferencesPageWidget")
|
||||
VPCSPreferencesPageWidget.resize(469, 392)
|
||||
@@ -118,4 +120,3 @@ class Ui_VPCSPreferencesPageWidget(object):
|
||||
self.uiScriptFileLabel.setText(_translate("VPCSPreferencesPageWidget", "Base script file:"))
|
||||
self.uiTabWidget.setTabText(self.uiTabWidget.indexOf(self.uiVPCSTabWidget), _translate("VPCSPreferencesPageWidget", "VPCS VM settings"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("VPCSPreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class NodesView(QtWidgets.QTreeWidget):
|
||||
if svg_renderer.isValid():
|
||||
svg_renderer.render(QtGui.QPainter(image))
|
||||
else:
|
||||
#FIXME: Cannot read file '...', because: Encountered incorrectly encoded content. (line 1)
|
||||
# FIXME: Cannot read file '...', because: Encountered incorrectly encoded content. (line 1)
|
||||
image.load(node["symbol"])
|
||||
if image.isNull():
|
||||
continue
|
||||
|
||||
@@ -543,7 +543,7 @@ class Port:
|
||||
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
info.wShowWindow = subprocess.SW_HIDE
|
||||
if hasattr(sys, "frozen"):
|
||||
tail_path = os.path.dirname(os.path.abspath(sys.executable)) # for Popen to find tail.exe
|
||||
tail_path = os.path.dirname(os.path.abspath(sys.executable)) # for Popen to find tail.exe
|
||||
else:
|
||||
# We suppose a developer will have tail the standard GNS3 location
|
||||
tail_path = "C:\\Program Files\\GNS3"
|
||||
|
||||
@@ -106,11 +106,11 @@ class QFileDialog(OldFileDialog):
|
||||
QtWidgets.QFileDialog = QFileDialog
|
||||
|
||||
|
||||
|
||||
class StatsQtWidgetsQDialog(QtWidgets.QDialog):
|
||||
"""
|
||||
Send stats from all the QWizard
|
||||
"""
|
||||
|
||||
def __init__(self, *args):
|
||||
super().__init__(*args)
|
||||
|
||||
@@ -127,6 +127,7 @@ class StatsQtWidgetsQWizard(QtWidgets.QWizard):
|
||||
"""
|
||||
Send stats from all the QWizard
|
||||
"""
|
||||
|
||||
def __init__(self, *args):
|
||||
super().__init__(*args)
|
||||
|
||||
@@ -139,11 +140,11 @@ class StatsQtWidgetsQWizard(QtWidgets.QWizard):
|
||||
QtWidgets.QWizard = StatsQtWidgetsQWizard
|
||||
|
||||
|
||||
|
||||
class StatsQtWidgetsQMainWindow(QtWidgets.QMainWindow):
|
||||
"""
|
||||
Send stats from all the QMainWindow
|
||||
"""
|
||||
|
||||
def __init__(self, *args):
|
||||
super().__init__(*args)
|
||||
|
||||
@@ -204,4 +205,3 @@ def qpartial(func, *args, **kwargs):
|
||||
return functools.partial(partial, *args, **kwargs)
|
||||
|
||||
return functools.partial(func, *args, **kwargs)
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ class ApplianceError(Exception):
|
||||
|
||||
|
||||
class Appliance(collections.Mapping):
|
||||
|
||||
def __init__(self, registry, path):
|
||||
"""
|
||||
:params registry: Instance of the registry where images are located
|
||||
@@ -42,7 +43,6 @@ class Appliance(collections.Mapping):
|
||||
self._check_config()
|
||||
self._resolve_version()
|
||||
|
||||
|
||||
def _check_config(self):
|
||||
"""
|
||||
:param appliance: Sanity check on the appliance configuration
|
||||
@@ -89,7 +89,6 @@ class Appliance(collections.Mapping):
|
||||
if not found:
|
||||
raise ApplianceError("Broken appliance missing file {} for version {}".format(filename, version["name"]))
|
||||
|
||||
|
||||
def search_images_for_version(self, version_name):
|
||||
"""
|
||||
Search on disk the images required by this version.
|
||||
@@ -134,4 +133,3 @@ class Appliance(collections.Mapping):
|
||||
return True
|
||||
except ApplianceError:
|
||||
return False
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ from .image import Image
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ConfigException(Exception):
|
||||
pass
|
||||
|
||||
@@ -151,7 +152,6 @@ class Config:
|
||||
new_config["kernel_command_line"] = appliance_config["qemu"].get("kernel_command_line", "")
|
||||
new_config["kernel_image"] = appliance_config["qemu"].get("kernel_image", "")
|
||||
|
||||
|
||||
new_config["qemu_path"] = "qemu-system-{}".format(appliance_config["qemu"]["arch"])
|
||||
|
||||
if "symbol" in appliance_config:
|
||||
|
||||
@@ -30,6 +30,7 @@ class RegistryError(Exception):
|
||||
|
||||
|
||||
class Registry:
|
||||
|
||||
def __init__(self, images_dirs):
|
||||
self._images_dirs = images_dirs
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ class Servers():
|
||||
local_server_settings["password"] = self._passwordGenerate()
|
||||
changed = True
|
||||
|
||||
#For 1.3 compatibity old LocalServer section
|
||||
# For 1.3 compatibity old LocalServer section
|
||||
local_server = LocalConfig.instance().loadSectionSettings("LocalServer", {})
|
||||
if "auth" in local_server:
|
||||
local_server["auth"] = local_server_settings["auth"]
|
||||
@@ -248,7 +248,7 @@ class Servers():
|
||||
LocalConfig.instance().saveSectionSettings("LocalServer", local_server)
|
||||
changed = True
|
||||
|
||||
#WARNING: This operation should be a the end of the method otherwise you save a partial config
|
||||
# WARNING: This operation should be a the end of the method otherwise you save a partial config
|
||||
if changed:
|
||||
self._saveSettings()
|
||||
|
||||
|
||||
@@ -163,10 +163,10 @@ elif sys.platform.startswith("darwin"):
|
||||
# Mac OS X
|
||||
PRECONFIGURED_VNC_CONSOLE_COMMANDS = {
|
||||
'OSX builtin screen sharing': "osascript"
|
||||
" -e 'tell application \"Screen Sharing\"'"
|
||||
" -e ' display dialog \"WARNING OSX VNC support is limited if you have trouble connecting to a device please use an alternative client like Chicken of the VNC.\" buttons {\"OK\"} default button 1 with icon caution with title \"GNS3\"'"
|
||||
" -e ' open location \"vnc://%h:%p\"'"
|
||||
" -e 'end tell'",
|
||||
" -e 'tell application \"Screen Sharing\"'"
|
||||
" -e ' display dialog \"WARNING OSX VNC support is limited if you have trouble connecting to a device please use an alternative client like Chicken of the VNC.\" buttons {\"OK\"} default button 1 with icon caution with title \"GNS3\"'"
|
||||
" -e ' open location \"vnc://%h:%p\"'"
|
||||
" -e 'end tell'",
|
||||
'Chicken of the VNC': "/Applications/Chicken\ of\ the\ VNC.app/Contents/MacOS/Chicken\ of\ the\ VNC %h:%p"
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ GENERAL_SETTINGS = {
|
||||
"check_for_update": True,
|
||||
"experimental_features": False,
|
||||
"send_stats": True,
|
||||
"stats_visitor_id": str(uuid.uuid4()), # An anonymous id for stats
|
||||
"stats_visitor_id": str(uuid.uuid4()), # An anonymous id for stats
|
||||
"last_check_for_update": 0,
|
||||
"slow_device_start_all": 0,
|
||||
"link_manual_mode": True,
|
||||
|
||||
@@ -91,7 +91,7 @@ def nodeTelnetConsole(name, server, port):
|
||||
if not command:
|
||||
return
|
||||
|
||||
#FIXME: do we still need to run the console from a thread?
|
||||
# FIXME: do we still need to run the console from a thread?
|
||||
log.info('Starting telnet console in thread "{}"'.format(command))
|
||||
console_thread = ConsoleThread(MainWindow.instance(), command, name, server, port)
|
||||
# console_thread.consoleDone.connect(callback)
|
||||
|
||||
@@ -732,7 +732,7 @@ class Topology:
|
||||
topology_file_errors.append("Path to symbol {} doesn't exist".format(symbol_path))
|
||||
pixmap = QtGui.QPixmap(symbol_path)
|
||||
if not pixmap.isNull():
|
||||
node_item = PixmapNodeItem(node, symbol_path)
|
||||
node_item = PixmapNodeItem(node, symbol_path)
|
||||
else:
|
||||
topology_file_errors.append("Symbol {} is invalid".format(symbol_path))
|
||||
node_item = SvgNodeItem(node)
|
||||
|
||||
@@ -41,7 +41,7 @@ def getTopologyValidationErrors(topology):
|
||||
error_message = ""
|
||||
for error in errors:
|
||||
# Uncomment for more details
|
||||
#for suberror in sorted(error.context, key=lambda e: e.schema_path):
|
||||
# for suberror in sorted(error.context, key=lambda e: e.schema_path):
|
||||
# print(list(suberror.schema_path), suberror.message, sep=", ")
|
||||
error_message += "{}\n".format(str(error))
|
||||
return error_message
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_ApplianceWizard(object):
|
||||
|
||||
def setupUi(self, ApplianceWizard):
|
||||
ApplianceWizard.setObjectName("ApplianceWizard")
|
||||
ApplianceWizard.resize(688, 469)
|
||||
@@ -44,7 +46,7 @@ class Ui_ApplianceWizard(object):
|
||||
self.gridLayout_4.addWidget(self.uiInfoTreeWidget, 1, 0, 1, 1)
|
||||
self.uiDescriptionLabel = QtWidgets.QLabel(self.uiInfoWizardPage)
|
||||
self.uiDescriptionLabel.setScaledContents(False)
|
||||
self.uiDescriptionLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
||||
self.uiDescriptionLabel.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
|
||||
self.uiDescriptionLabel.setWordWrap(True)
|
||||
self.uiDescriptionLabel.setObjectName("uiDescriptionLabel")
|
||||
self.gridLayout_4.addWidget(self.uiDescriptionLabel, 0, 0, 1, 1)
|
||||
@@ -273,9 +275,9 @@ class Ui_ApplianceWizard(object):
|
||||
self.uiUsageWizardPage.setTitle(_translate("ApplianceWizard", "Usage"))
|
||||
self.uiUsageWizardPage.setSubTitle(_translate("ApplianceWizard", "Please read the following instructions in order to use your new appliance."))
|
||||
self.uiUsageTextEdit.setHtml(_translate("ApplianceWizard", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||
"p, li { white-space: pre-wrap; }\n"
|
||||
"</style></head><body style=\" font-family:\'.Helvetica Neue DeskInterface\'; font-size:13pt; font-weight:400; font-style:normal;\">\n"
|
||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Ubuntu\'; font-size:11pt;\">The default username/password is admin/admin. A default configuration is present.</span></p></body></html>"))
|
||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||
"p, li { white-space: pre-wrap; }\n"
|
||||
"</style></head><body style=\" font-family:\'.Helvetica Neue DeskInterface\'; font-size:13pt; font-weight:400; font-style:normal;\">\n"
|
||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Ubuntu\'; font-size:11pt;\">The default username/password is admin/admin. A default configuration is present.</span></p></body></html>"))
|
||||
|
||||
from . import resources_rc
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_configurationDialog(object):
|
||||
|
||||
def setupUi(self, configurationDialog):
|
||||
configurationDialog.setObjectName("configurationDialog")
|
||||
configurationDialog.resize(585, 454)
|
||||
@@ -53,7 +55,7 @@ class Ui_configurationDialog(object):
|
||||
self.gridlayout.addWidget(self.splitter, 0, 0, 1, 1)
|
||||
self.uiButtonBox = QtWidgets.QDialogButtonBox(configurationDialog)
|
||||
self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setObjectName("uiButtonBox")
|
||||
self.gridlayout.addWidget(self.uiButtonBox, 1, 0, 1, 1)
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_ExecCommandDialog(object):
|
||||
|
||||
def setupUi(self, ExecCommandDialog):
|
||||
ExecCommandDialog.setObjectName("ExecCommandDialog")
|
||||
ExecCommandDialog.resize(651, 343)
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_ExportDebugDialog(object):
|
||||
|
||||
def setupUi(self, ExportDebugDialog):
|
||||
ExportDebugDialog.setObjectName("ExportDebugDialog")
|
||||
ExportDebugDialog.setWindowModality(QtCore.Qt.WindowModal)
|
||||
@@ -20,7 +22,7 @@ class Ui_ExportDebugDialog(object):
|
||||
self.label = QtWidgets.QLabel(ExportDebugDialog)
|
||||
self.label.setTextFormat(QtCore.Qt.RichText)
|
||||
self.label.setScaledContents(False)
|
||||
self.label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
||||
self.label.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
|
||||
self.label.setWordWrap(True)
|
||||
self.label.setObjectName("label")
|
||||
self.verticalLayout.addWidget(self.label)
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_GeneralPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, GeneralPreferencesPageWidget):
|
||||
GeneralPreferencesPageWidget.setObjectName("GeneralPreferencesPageWidget")
|
||||
GeneralPreferencesPageWidget.resize(538, 623)
|
||||
@@ -427,4 +429,3 @@ class Ui_GeneralPreferencesPageWidget(object):
|
||||
self.uiSlowStartAllSpinBox.setSuffix(_translate("GeneralPreferencesPageWidget", " seconds"))
|
||||
self.uiMiscTabWidget.setTabText(self.uiMiscTabWidget.indexOf(self.tab), _translate("GeneralPreferencesPageWidget", "Miscellaneous"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("GeneralPreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_IdlePCDialog(object):
|
||||
|
||||
def setupUi(self, IdlePCDialog):
|
||||
IdlePCDialog.setObjectName("IdlePCDialog")
|
||||
IdlePCDialog.setModal(True)
|
||||
@@ -23,7 +25,7 @@ class Ui_IdlePCDialog(object):
|
||||
self.gridLayout.addWidget(self.uiComboBox, 1, 0, 1, 1)
|
||||
self.uiButtonBox = QtWidgets.QDialogButtonBox(IdlePCDialog)
|
||||
self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Help|QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply | QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Help | QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setObjectName("uiButtonBox")
|
||||
self.gridLayout.addWidget(self.uiButtonBox, 2, 0, 1, 1)
|
||||
|
||||
@@ -36,4 +38,3 @@ class Ui_IdlePCDialog(object):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
IdlePCDialog.setWindowTitle(_translate("IdlePCDialog", "Idle-PC values"))
|
||||
self.uiLabel.setText(_translate("IdlePCDialog", "Potentially better Idle-PC values are marked with \'*\'"))
|
||||
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_IOUVMConverterWizard(object):
|
||||
|
||||
def setupUi(self, IOUVMConverterWizard):
|
||||
IOUVMConverterWizard.setObjectName("IOUVMConverterWizard")
|
||||
IOUVMConverterWizard.resize(649, 377)
|
||||
IOUVMConverterWizard.setOptions(QtWidgets.QWizard.NoCancelButton|QtWidgets.QWizard.NoDefaultButton)
|
||||
IOUVMConverterWizard.setOptions(QtWidgets.QWizard.NoCancelButton | QtWidgets.QWizard.NoDefaultButton)
|
||||
self.uiWizardWelcomePage = QtWidgets.QWizardPage()
|
||||
self.uiWizardWelcomePage.setObjectName("uiWizardWelcomePage")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.uiWizardWelcomePage)
|
||||
@@ -44,7 +46,7 @@ class Ui_IOUVMConverterWizard(object):
|
||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||
self.label_3 = QtWidgets.QLabel(self.uiWizardUpdateIOUVM)
|
||||
self.label_3.setTextFormat(QtCore.Qt.RichText)
|
||||
self.label_3.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
|
||||
self.label_3.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.verticalLayout_4.addWidget(self.label_3)
|
||||
IOUVMConverterWizard.addPage(self.uiWizardUpdateIOUVM)
|
||||
@@ -137,73 +139,72 @@ class Ui_IOUVMConverterWizard(object):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
IOUVMConverterWizard.setWindowTitle(_translate("IOUVMConverterWizard", "GNS3 IOU Converter"))
|
||||
self.label.setText(_translate("IOUVMConverterWizard", "<h1>Welcome to the IOUVM converter</h1>\n"
|
||||
"<p>This Wizard will help you to convert the IOUVM to the new GNS3 VM</p>\n"
|
||||
"<p>The GNS3 VM has a self update system allowing you to easily upgrade between version of the GNS3 VM without manual operations.</p>"))
|
||||
"<p>This Wizard will help you to convert the IOUVM to the new GNS3 VM</p>\n"
|
||||
"<p>The GNS3 VM has a self update system allowing you to easily upgrade between version of the GNS3 VM without manual operations.</p>"))
|
||||
self.label_14.setText(_translate("IOUVMConverterWizard", "<h1>Start GNS3</h1>\n"
|
||||
"<ul>\n"
|
||||
"<li>Start GNS3 >= 1.4</li>\n"
|
||||
"<li>Configure the GNS3 VM via preferences or the initial wizard</li>\n"
|
||||
"<li>Exit all instance of GNS3</li>\n"
|
||||
"</ul>"))
|
||||
"<ul>\n"
|
||||
"<li>Start GNS3 >= 1.4</li>\n"
|
||||
"<li>Configure the GNS3 VM via preferences or the initial wizard</li>\n"
|
||||
"<li>Exit all instance of GNS3</li>\n"
|
||||
"</ul>"))
|
||||
self.label_2.setText(_translate("IOUVMConverterWizard", "<h1>Setup NAT</h1>\n"
|
||||
"<ul>\n"
|
||||
"<li>Start VirtualBox </li>\n"
|
||||
"<li>Click on the IOUVM</li>\n"
|
||||
"<li>Click on settings</li>\n"
|
||||
"<li>Click on Network</li>\n"
|
||||
"<li>Change Host-only adapter to NAT</li>\n"
|
||||
"<li>Click on OK</li>\n"
|
||||
"<li>Start the VM<li>\n"
|
||||
"</ul>"))
|
||||
"<ul>\n"
|
||||
"<li>Start VirtualBox </li>\n"
|
||||
"<li>Click on the IOUVM</li>\n"
|
||||
"<li>Click on settings</li>\n"
|
||||
"<li>Click on Network</li>\n"
|
||||
"<li>Change Host-only adapter to NAT</li>\n"
|
||||
"<li>Click on OK</li>\n"
|
||||
"<li>Start the VM<li>\n"
|
||||
"</ul>"))
|
||||
self.label_3.setText(_translate("IOUVMConverterWizard", "<html><head/><body><p><span style=\" font-size:xx-large; font-weight:600;\">Update GNS3 on IOUVM</span></p><p>In the VM: </p><ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Log as root with password CISCO</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">pip3 install gns3-server==1.3.10</li><li style=\" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">halt</li></ul></body></html>"))
|
||||
self.label_4.setText(_translate("IOUVMConverterWizard", "<h1>Restore VM network settings</h1>\n"
|
||||
"<ul>\n"
|
||||
"<li>Start VirtualBox </li>\n"
|
||||
"<li>Click on the IOUVM</li>\n"
|
||||
"<li>Click on settings</li>\n"
|
||||
"<li>Click on Network</li>\n"
|
||||
"<li>Change NAT adapter to Host-Only</li>\n"
|
||||
"<li>Click on OK</li>\n"
|
||||
"<li>Start the VM<li>\n"
|
||||
"</ul>"))
|
||||
"<ul>\n"
|
||||
"<li>Start VirtualBox </li>\n"
|
||||
"<li>Click on the IOUVM</li>\n"
|
||||
"<li>Click on settings</li>\n"
|
||||
"<li>Click on Network</li>\n"
|
||||
"<li>Change NAT adapter to Host-Only</li>\n"
|
||||
"<li>Click on OK</li>\n"
|
||||
"<li>Start the VM<li>\n"
|
||||
"</ul>"))
|
||||
self.label_10.setText(_translate("IOUVMConverterWizard", "<h1>Download backups</h1>\n"
|
||||
"<ul>\n"
|
||||
"<li>Log as root with password cisco</li>\n"
|
||||
"<li>Type ifconfig eth0</li>\n"
|
||||
"<li>Remember the addr</li>\n"
|
||||
"<li>In your browser open http://THEADDR:8000</li>\n"
|
||||
"<li>Download projects and images backups</li>\n"
|
||||
"<li>halt the vm</li>\n"
|
||||
"</ul>"))
|
||||
"<ul>\n"
|
||||
"<li>Log as root with password cisco</li>\n"
|
||||
"<li>Type ifconfig eth0</li>\n"
|
||||
"<li>Remember the addr</li>\n"
|
||||
"<li>In your browser open http://THEADDR:8000</li>\n"
|
||||
"<li>Download projects and images backups</li>\n"
|
||||
"<li>halt the vm</li>\n"
|
||||
"</ul>"))
|
||||
self.label_11.setText(_translate("IOUVMConverterWizard", "<h1>Restore backups</h1>\n"
|
||||
"<ul>\n"
|
||||
"<li>Start the GNS3 VM</li>\n"
|
||||
"<li>Remember the IP display on the information screen</li>\n"
|
||||
"<li>In a browser open http://THEIP:8000/upload</li>\n"
|
||||
"<li>Select the option for restoring projects and upload the previous backup</li>\n"
|
||||
"<li>Select the option for restoring images and upload the previous backup</li>\n"
|
||||
"</ul>"))
|
||||
"<ul>\n"
|
||||
"<li>Start the GNS3 VM</li>\n"
|
||||
"<li>Remember the IP display on the information screen</li>\n"
|
||||
"<li>In a browser open http://THEIP:8000/upload</li>\n"
|
||||
"<li>Select the option for restoring projects and upload the previous backup</li>\n"
|
||||
"<li>Select the option for restoring images and upload the previous backup</li>\n"
|
||||
"</ul>"))
|
||||
self.label_5.setText(_translate("IOUVMConverterWizard", "<center>\n"
|
||||
"BACKUP<br>\n"
|
||||
"YOUR TOPOLOGIES!\n"
|
||||
"</center>"))
|
||||
"BACKUP<br>\n"
|
||||
"YOUR TOPOLOGIES!\n"
|
||||
"</center>"))
|
||||
self.label_7.setText(_translate("IOUVMConverterWizard", "<h1>Validation of the IOURC file</h1> \n"
|
||||
"The IOURC file contain your licence for IOU.<br>\n"
|
||||
"The format of file is:\n"
|
||||
"<pre>\n"
|
||||
"[license]\n"
|
||||
"gns3-iouvm = OLDLICENCE;\n"
|
||||
"gns3vm = NEWLICENCE;\n"
|
||||
"</pre>\n"
|
||||
"<br>\n"
|
||||
"The GNS3VM require a new licence. You need to add it in the file. IOU is a CISCO product. GNS3 staff is not allowed to provide this licence."))
|
||||
"The IOURC file contain your licence for IOU.<br>\n"
|
||||
"The format of file is:\n"
|
||||
"<pre>\n"
|
||||
"[license]\n"
|
||||
"gns3-iouvm = OLDLICENCE;\n"
|
||||
"gns3vm = NEWLICENCE;\n"
|
||||
"</pre>\n"
|
||||
"<br>\n"
|
||||
"The GNS3VM require a new licence. You need to add it in the file. IOU is a CISCO product. GNS3 staff is not allowed to provide this licence."))
|
||||
self.label_12.setText(_translate("IOUVMConverterWizard", "<h1>Update configuration</h1>\n"
|
||||
"<p style=\"color: red\">Your GNS3 configuration will be updated.</p>\n"
|
||||
"<p>All your remote servers will be removed and replace by the GNS3VM. </p><p>If you have a custom remote server <strong>DO NOT CONTINUE</strong></p>"))
|
||||
"<p style=\"color: red\">Your GNS3 configuration will be updated.</p>\n"
|
||||
"<p>All your remote servers will be removed and replace by the GNS3VM. </p><p>If you have a custom remote server <strong>DO NOT CONTINUE</strong></p>"))
|
||||
self.label_6.setText(_translate("IOUVMConverterWizard", "<h1>Patch topologies</h1>\n"
|
||||
"We need to patch your topologies please select your topologies directory"))
|
||||
"We need to patch your topologies please select your topologies directory"))
|
||||
self.uiPushButtonBrowse.setText(_translate("IOUVMConverterWizard", "Browse..."))
|
||||
self.label_8.setText(_translate("IOUVMConverterWizard", "<center>\n"
|
||||
"<h1>Congratulation you can now use the GNS3 VM</h1>\n"
|
||||
"</center>"))
|
||||
|
||||
"<h1>Congratulation you can now use the GNS3 VM</h1>\n"
|
||||
"</center>"))
|
||||
|
||||
@@ -8,28 +8,30 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.setWindowModality(QtCore.Qt.NonModal)
|
||||
MainWindow.resize(984, 715)
|
||||
MainWindow.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
|
||||
MainWindow.setStyleSheet("#toolBar_Devices QToolButton {\n"
|
||||
"width: 50px;\n"
|
||||
"height: 55px;\n"
|
||||
"border:solid 1px black opacity 0.4;\n"
|
||||
"background-none;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"#toolBar_General QToolButton {\n"
|
||||
"width: 36px;\n"
|
||||
"height: 36px;\n"
|
||||
"border:solid 1px black opacity 0.4;\n"
|
||||
"background-none;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"")
|
||||
MainWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks|QtWidgets.QMainWindow.AnimatedDocks)
|
||||
"width: 50px;\n"
|
||||
"height: 55px;\n"
|
||||
"border:solid 1px black opacity 0.4;\n"
|
||||
"background-none;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"#toolBar_General QToolButton {\n"
|
||||
"width: 36px;\n"
|
||||
"height: 36px;\n"
|
||||
"border:solid 1px black opacity 0.4;\n"
|
||||
"background-none;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"")
|
||||
MainWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks | QtWidgets.QMainWindow.AnimatedDocks)
|
||||
self.uiCentralWidget = QtWidgets.QWidget(MainWindow)
|
||||
self.uiCentralWidget.setObjectName("uiCentralWidget")
|
||||
self.gridlayout = QtWidgets.QGridLayout(self.uiCentralWidget)
|
||||
@@ -81,7 +83,7 @@ class Ui_MainWindow(object):
|
||||
self.uiNodesDockWidget.setEnabled(True)
|
||||
self.uiNodesDockWidget.setVisible(True)
|
||||
self.uiNodesDockWidget.setFloating(False)
|
||||
self.uiNodesDockWidget.setAllowedAreas(QtCore.Qt.LeftDockWidgetArea|QtCore.Qt.RightDockWidgetArea)
|
||||
self.uiNodesDockWidget.setAllowedAreas(QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea)
|
||||
self.uiNodesDockWidget.setObjectName("uiNodesDockWidget")
|
||||
self.uiNodesDockWidgetContents = QtWidgets.QWidget()
|
||||
self.uiNodesDockWidgetContents.setObjectName("uiNodesDockWidgetContents")
|
||||
@@ -143,7 +145,7 @@ class Ui_MainWindow(object):
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiTopologySummaryDockWidget.sizePolicy().hasHeightForWidth())
|
||||
self.uiTopologySummaryDockWidget.setSizePolicy(sizePolicy)
|
||||
self.uiTopologySummaryDockWidget.setAllowedAreas(QtCore.Qt.LeftDockWidgetArea|QtCore.Qt.RightDockWidgetArea)
|
||||
self.uiTopologySummaryDockWidget.setAllowedAreas(QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea)
|
||||
self.uiTopologySummaryDockWidget.setObjectName("uiTopologySummaryDockWidget")
|
||||
self.uiTopologySummaryDockWidgetContents = QtWidgets.QWidget()
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_NewProjectDialog(object):
|
||||
|
||||
def setupUi(self, NewProjectDialog):
|
||||
NewProjectDialog.setObjectName("NewProjectDialog")
|
||||
NewProjectDialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
||||
@@ -19,7 +21,7 @@ class Ui_NewProjectDialog(object):
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.uiButtonBox = QtWidgets.QDialogButtonBox(NewProjectDialog)
|
||||
self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setObjectName("uiButtonBox")
|
||||
self.gridLayout_2.addWidget(self.uiButtonBox, 2, 2, 1, 1)
|
||||
self.uiOpenProjectPushButton = QtWidgets.QPushButton(NewProjectDialog)
|
||||
@@ -73,4 +75,3 @@ class Ui_NewProjectDialog(object):
|
||||
self.uiNameLabel.setText(_translate("NewProjectDialog", "Name:"))
|
||||
self.uiLocationLabel.setText(_translate("NewProjectDialog", "Location:"))
|
||||
self.uiLocationBrowserToolButton.setText(_translate("NewProjectDialog", "Browse..."))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_NodePropertiesDialog(object):
|
||||
|
||||
def setupUi(self, NodePropertiesDialog):
|
||||
NodePropertiesDialog.setObjectName("NodePropertiesDialog")
|
||||
NodePropertiesDialog.resize(689, 454)
|
||||
@@ -68,7 +70,7 @@ class Ui_NodePropertiesDialog(object):
|
||||
self.gridlayout.addWidget(self.splitter, 0, 0, 1, 1)
|
||||
self.uiButtonBox = QtWidgets.QDialogButtonBox(NodePropertiesDialog)
|
||||
self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Reset)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply | QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Reset)
|
||||
self.uiButtonBox.setObjectName("uiButtonBox")
|
||||
self.gridlayout.addWidget(self.uiButtonBox, 1, 0, 1, 1)
|
||||
|
||||
@@ -82,6 +84,6 @@ class Ui_NodePropertiesDialog(object):
|
||||
self.uiNodesTreeWidget.headerItem().setText(0, _translate("NodePropertiesDialog", "Nodes"))
|
||||
self.uiTitleLabel.setText(_translate("NodePropertiesDialog", "Node Configuration"))
|
||||
self.textLabel.setText(_translate("NodePropertiesDialog", "Please select a node in the list \n"
|
||||
"to display the configuration page."))
|
||||
"to display the configuration page."))
|
||||
|
||||
from . import resources_rc
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_PacketCapturePreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, PacketCapturePreferencesPageWidget):
|
||||
PacketCapturePreferencesPageWidget.setObjectName("PacketCapturePreferencesPageWidget")
|
||||
PacketCapturePreferencesPageWidget.resize(400, 250)
|
||||
@@ -73,4 +75,3 @@ class Ui_PacketCapturePreferencesPageWidget(object):
|
||||
self.uiPreconfiguredCaptureReaderCommandLabel.setText(_translate("PacketCapturePreferencesPageWidget", "Preconfigured packet capture reader commands:"))
|
||||
self.uiPreconfiguredCaptureReaderCommandPushButton.setText(_translate("PacketCapturePreferencesPageWidget", "&Set"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("PacketCapturePreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_PreferencesDialog(object):
|
||||
|
||||
def setupUi(self, PreferencesDialog):
|
||||
PreferencesDialog.setObjectName("PreferencesDialog")
|
||||
PreferencesDialog.resize(590, 534)
|
||||
@@ -22,7 +24,7 @@ class Ui_PreferencesDialog(object):
|
||||
self.gridlayout.setObjectName("gridlayout")
|
||||
self.uiButtonBox = QtWidgets.QDialogButtonBox(PreferencesDialog)
|
||||
self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply | QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setCenterButtons(False)
|
||||
self.uiButtonBox.setObjectName("uiButtonBox")
|
||||
self.gridlayout.addWidget(self.uiButtonBox, 2, 1, 1, 2)
|
||||
|
||||
@@ -183380,9 +183380,11 @@ qt_resource_struct = b"\
|
||||
\x00\x00\x13\x32\x00\x01\x00\x00\x00\x01\x00\x20\x82\x0e\
|
||||
"
|
||||
|
||||
|
||||
def qInitResources():
|
||||
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||
|
||||
|
||||
def qCleanupResources():
|
||||
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_ServerPreferencesPageWidget(object):
|
||||
|
||||
def setupUi(self, ServerPreferencesPageWidget):
|
||||
ServerPreferencesPageWidget.setObjectName("ServerPreferencesPageWidget")
|
||||
ServerPreferencesPageWidget.resize(500, 609)
|
||||
@@ -207,7 +209,7 @@ class Ui_ServerPreferencesPageWidget(object):
|
||||
self.uiVMPasswordLabel.setObjectName("uiVMPasswordLabel")
|
||||
self.gridLayout_3.addWidget(self.uiVMPasswordLabel, 1, 0, 1, 1)
|
||||
self.uiVMPasswordLineEdit = QtWidgets.QLineEdit(self.groupBox)
|
||||
self.uiVMPasswordLineEdit.setInputMethodHints(QtCore.Qt.ImhHiddenText|QtCore.Qt.ImhNoAutoUppercase|QtCore.Qt.ImhNoPredictiveText)
|
||||
self.uiVMPasswordLineEdit.setInputMethodHints(QtCore.Qt.ImhHiddenText | QtCore.Qt.ImhNoAutoUppercase | QtCore.Qt.ImhNoPredictiveText)
|
||||
self.uiVMPasswordLineEdit.setEchoMode(QtWidgets.QLineEdit.Password)
|
||||
self.uiVMPasswordLineEdit.setObjectName("uiVMPasswordLineEdit")
|
||||
self.gridLayout_3.addWidget(self.uiVMPasswordLineEdit, 1, 1, 1, 1)
|
||||
@@ -319,7 +321,7 @@ class Ui_ServerPreferencesPageWidget(object):
|
||||
self.uiRemoteServerSSHPortSpinBox.setObjectName("uiRemoteServerSSHPortSpinBox")
|
||||
self.gridLayout_5.addWidget(self.uiRemoteServerSSHPortSpinBox, 7, 1, 1, 1)
|
||||
self.uiRemoteServerPasswordLineEdit = QtWidgets.QLineEdit(self.uiRemoteTabWidget)
|
||||
self.uiRemoteServerPasswordLineEdit.setInputMethodHints(QtCore.Qt.ImhHiddenText|QtCore.Qt.ImhNoAutoUppercase|QtCore.Qt.ImhNoPredictiveText)
|
||||
self.uiRemoteServerPasswordLineEdit.setInputMethodHints(QtCore.Qt.ImhHiddenText | QtCore.Qt.ImhNoAutoUppercase | QtCore.Qt.ImhNoPredictiveText)
|
||||
self.uiRemoteServerPasswordLineEdit.setText("")
|
||||
self.uiRemoteServerPasswordLineEdit.setEchoMode(QtWidgets.QLineEdit.Password)
|
||||
self.uiRemoteServerPasswordLineEdit.setObjectName("uiRemoteServerPasswordLineEdit")
|
||||
@@ -461,4 +463,3 @@ class Ui_ServerPreferencesPageWidget(object):
|
||||
self.uiRendezVousHashingRadioButton.setText(_translate("ServerPreferencesPageWidget", "Rendezvous hashing"))
|
||||
self.uiServerPreferenceTabWidget.setTabText(self.uiServerPreferenceTabWidget.indexOf(self.uiLoadBalancingTabWidget), _translate("ServerPreferencesPageWidget", "Load Balancing"))
|
||||
self.uiRestoreDefaultsPushButton.setText(_translate("ServerPreferencesPageWidget", "Restore defaults"))
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_SetupWizard(object):
|
||||
|
||||
def setupUi(self, SetupWizard):
|
||||
SetupWizard.setObjectName("SetupWizard")
|
||||
SetupWizard.resize(688, 469)
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_SnapshotsDialog(object):
|
||||
|
||||
def setupUi(self, SnapshotsDialog):
|
||||
SnapshotsDialog.setObjectName("SnapshotsDialog")
|
||||
SnapshotsDialog.setWindowModality(QtCore.Qt.WindowModal)
|
||||
@@ -46,4 +48,3 @@ class Ui_SnapshotsDialog(object):
|
||||
self.uiCreatePushButton.setText(_translate("SnapshotsDialog", "&Create"))
|
||||
self.uiRestorePushButton.setText(_translate("SnapshotsDialog", "&Restore"))
|
||||
self.uiDeletePushButton.setText(_translate("SnapshotsDialog", "&Delete"))
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_StyleEditorDialog(object):
|
||||
|
||||
def setupUi(self, StyleEditorDialog):
|
||||
StyleEditorDialog.setObjectName("StyleEditorDialog")
|
||||
StyleEditorDialog.resize(328, 252)
|
||||
@@ -64,7 +66,7 @@ class Ui_StyleEditorDialog(object):
|
||||
self.verticalLayout.addWidget(self.uiStyleSettingsGroupBox)
|
||||
self.uiButtonBox = QtWidgets.QDialogButtonBox(StyleEditorDialog)
|
||||
self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply | QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setObjectName("uiButtonBox")
|
||||
self.verticalLayout.addWidget(self.uiButtonBox)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
@@ -86,7 +88,7 @@ class Ui_StyleEditorDialog(object):
|
||||
self.uiBorderStyleLabel.setText(_translate("StyleEditorDialog", "Border style:"))
|
||||
self.uiRotationLabel.setText(_translate("StyleEditorDialog", "Rotation:"))
|
||||
self.uiRotationSpinBox.setToolTip(_translate("StyleEditorDialog", "Rotation can be ajusted on the scene for a selected item while\n"
|
||||
"editing (notes only) with ALT and \'+\' (or P) / ALT and \'-\' (or M)"))
|
||||
"editing (notes only) with ALT and \'+\' (or P) / ALT and \'-\' (or M)"))
|
||||
self.uiRotationSpinBox.setSuffix(_translate("StyleEditorDialog", "°"))
|
||||
|
||||
from . import resources_rc
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_SymbolSelectionDialog(object):
|
||||
|
||||
def setupUi(self, SymbolSelectionDialog):
|
||||
SymbolSelectionDialog.setObjectName("SymbolSelectionDialog")
|
||||
SymbolSelectionDialog.resize(521, 655)
|
||||
@@ -77,7 +79,7 @@ class Ui_SymbolSelectionDialog(object):
|
||||
self.horizontalLayout.addItem(spacerItem2)
|
||||
self.uiButtonBox = QtWidgets.QDialogButtonBox(SymbolSelectionDialog)
|
||||
self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply | QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setObjectName("uiButtonBox")
|
||||
self.horizontalLayout.addWidget(self.uiButtonBox)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_TextEditorDialog(object):
|
||||
|
||||
def setupUi(self, TextEditorDialog):
|
||||
TextEditorDialog.setObjectName("TextEditorDialog")
|
||||
TextEditorDialog.resize(457, 333)
|
||||
@@ -55,7 +57,7 @@ class Ui_TextEditorDialog(object):
|
||||
self.horizontalLayout.addItem(spacerItem)
|
||||
self.uiButtonBox = QtWidgets.QDialogButtonBox(TextEditorDialog)
|
||||
self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply | QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
|
||||
self.uiButtonBox.setObjectName("uiButtonBox")
|
||||
self.horizontalLayout.addWidget(self.uiButtonBox)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
@@ -74,7 +76,7 @@ class Ui_TextEditorDialog(object):
|
||||
self.uiColorLabel.setText(_translate("TextEditorDialog", "Color:"))
|
||||
self.uiRotationLabel.setText(_translate("TextEditorDialog", "Rotation:"))
|
||||
self.uiRotationSpinBox.setToolTip(_translate("TextEditorDialog", "Rotation can be ajusted on the scene for a selected item while\n"
|
||||
"editing (notes only) with ALT and \'+\' (or P) / ALT and \'-\' (or M)"))
|
||||
"editing (notes only) with ALT and \'+\' (or P) / ALT and \'-\' (or M)"))
|
||||
self.uiRotationSpinBox.setSuffix(_translate("TextEditorDialog", "°"))
|
||||
self.uiApplyTextToAllItemsCheckBox.setText(_translate("TextEditorDialog", "Apply the text below to all selected items"))
|
||||
self.uiFontPushButton.setText(_translate("TextEditorDialog", "&Select font"))
|
||||
|
||||
@@ -191,10 +191,10 @@ class UpdateManager(QtCore.QObject):
|
||||
self._filesToDownload -= 1
|
||||
if self._filesToDownload == 0:
|
||||
reply = QtWidgets.QMessageBox.question(self._parent,
|
||||
"Check For Update",
|
||||
"GNS3 upgrade downloaded do you want to quit the application?",
|
||||
QtWidgets.QMessageBox.Yes,
|
||||
QtWidgets.QMessageBox.No)
|
||||
"Check For Update",
|
||||
"GNS3 upgrade downloaded do you want to quit the application?",
|
||||
QtWidgets.QMessageBox.Yes,
|
||||
QtWidgets.QMessageBox.No)
|
||||
if reply == QtWidgets.QMessageBox.Yes:
|
||||
app = QtWidgets.QApplication.instance().closeAllWindows()
|
||||
else:
|
||||
|
||||
@@ -2,6 +2,7 @@ import importlib
|
||||
import hashlib
|
||||
import re
|
||||
|
||||
|
||||
def import_from_string(string_val):
|
||||
"""
|
||||
Attempt to import a name from its string representation.
|
||||
@@ -63,7 +64,7 @@ def parse_version(version):
|
||||
|
||||
|
||||
def human_filesize(size):
|
||||
for unit in ['B','KB','MB','GB']:
|
||||
for unit in ['B', 'KB', 'MB', 'GB']:
|
||||
if abs(size) < 1024.0:
|
||||
return "%3.1f%s" % (size, unit)
|
||||
size /= 1024.0
|
||||
|
||||
@@ -77,34 +77,34 @@ class AnalyticsClient(QtCore.QObject):
|
||||
log.debug("Stats is turn off ignore call %s", screen)
|
||||
return
|
||||
|
||||
body = "v=1" #Version
|
||||
body += "&tid={}".format(self._property_id) # Tracking ID / Property ID
|
||||
body += "&cid={}".format(settings["stats_visitor_id"]) # Anonymous Client ID
|
||||
body += "&aip=1" # Anonymize IP
|
||||
body += "&t=screenview" # Screenview hit type
|
||||
body += "&an=GNS3" # App name
|
||||
body += "&av={}".format(quote(__version__)) # App version.
|
||||
body += "&ua={}".format(quote(self._user_agent)) # User agent
|
||||
body += "&cd={}".format(quote(screen)) # Category
|
||||
body += "&ds=gns3-gui" # Data source
|
||||
body = "v=1" # Version
|
||||
body += "&tid={}".format(self._property_id) # Tracking ID / Property ID
|
||||
body += "&cid={}".format(settings["stats_visitor_id"]) # Anonymous Client ID
|
||||
body += "&aip=1" # Anonymize IP
|
||||
body += "&t=screenview" # Screenview hit type
|
||||
body += "&an=GNS3" # App name
|
||||
body += "&av={}".format(quote(__version__)) # App version.
|
||||
body += "&ua={}".format(quote(self._user_agent)) # User agent
|
||||
body += "&cd={}".format(quote(screen)) # Category
|
||||
body += "&ds=gns3-gui" # Data source
|
||||
if session_start is True:
|
||||
body += "&sc=start" # Session start
|
||||
body += "&sc=start" # Session start
|
||||
elif session_start is False:
|
||||
body += "&sc=end" # Session end
|
||||
body += "&sc=end" # Session end
|
||||
|
||||
screen = QtWidgets.QApplication.desktop().screenGeometry()
|
||||
body += "&sr={}x{}".format(screen.width(), screen.height()) # Screen resolution
|
||||
body += "&sr={}x{}".format(screen.width(), screen.height()) # Screen resolution
|
||||
|
||||
locale = QtCore.QLocale.system().name().lower()
|
||||
if locale:
|
||||
body += "&ul={}".format(locale) # User language
|
||||
body += "&ul={}".format(locale) # User language
|
||||
|
||||
# TODO: HTTPS when possible because it's broken for the moment with Qt on OSX:
|
||||
# https://bugreports.qt.io/browse/QTBUG-45487
|
||||
if sys.platform.startswith("darwin"):
|
||||
url = QtCore.QUrl('http://www.google-analytics.com/collect');
|
||||
url = QtCore.QUrl('http://www.google-analytics.com/collect')
|
||||
else:
|
||||
url = QtCore.QUrl('https://www.google-analytics.com/collect');
|
||||
url = QtCore.QUrl('https://www.google-analytics.com/collect')
|
||||
request_qt = QtNetwork.QNetworkRequest(url)
|
||||
request_qt.setRawHeader(b"Content-Type", b"application/x-www-form-urlencoded")
|
||||
request_qt.setRawHeader(b"User-Agent", self._user_agent.encode())
|
||||
|
||||
@@ -63,7 +63,6 @@ class DownloadProjectWorker(QtCore.QObject):
|
||||
if self._get_file_lists == 0:
|
||||
self._is_running = False
|
||||
|
||||
|
||||
def _fileListReceived(self, result, error=False, server=None, **kwargs):
|
||||
self._get_file_lists -= 1
|
||||
if error:
|
||||
|
||||
@@ -124,7 +124,6 @@ class ProcessFilesWorker(QtCore.QObject):
|
||||
except RuntimeError:
|
||||
self.error.emit("Maximum path depth exceedeed when copying {}".format(self._source), True)
|
||||
|
||||
|
||||
# everything has been copied or moved, let's inform the GUI
|
||||
self.finished.emit()
|
||||
|
||||
|
||||
@@ -16,4 +16,4 @@ echo '
|
||||
|
||||
find . -name '*.py' -exec autopep8 --in-place -v --aggressive --aggressive \{\} \;
|
||||
|
||||
echo "Its 'clean"
|
||||
echo "It's clean"
|
||||
|
||||
@@ -12,6 +12,7 @@ sys._called_from_test = True
|
||||
from gns3.qt.QtWidgets import QApplication
|
||||
app = QApplication([])
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def reset_qt_signal():
|
||||
"""
|
||||
@@ -161,7 +162,7 @@ def qemu_vm(local_server, project):
|
||||
def local_config():
|
||||
from gns3.local_config import LocalConfig
|
||||
|
||||
(fd, config_path) = tempfile.mkstemp()
|
||||
(fd, config_path) = tempfile.mkstemp()
|
||||
os.close(fd)
|
||||
|
||||
LocalConfig._instance = LocalConfig(config_file=config_path)
|
||||
@@ -232,5 +233,3 @@ def pytest_configure(config):
|
||||
|
||||
def pytest_unconfigure(config):
|
||||
del sys._called_from_test
|
||||
|
||||
|
||||
|
||||
@@ -121,6 +121,3 @@ def test_is_version_installable(linux_microcore_img, microcore_appliance):
|
||||
|
||||
assert microcore_appliance.is_version_installable("3.4.1")
|
||||
assert not microcore_appliance.is_version_installable("4.0.2")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -260,7 +260,6 @@ def test_add_appliance_router_two_disk(empty_config, images_dir):
|
||||
with open("tests/registry/appliances/arista-veos.json", encoding="utf-8") as f:
|
||||
config = json.load(f)
|
||||
|
||||
|
||||
config["images"] = [
|
||||
{
|
||||
"type": "hda_disk_image",
|
||||
|
||||
@@ -51,7 +51,6 @@ def test_md5sum_ova(tmpdir):
|
||||
assert image.md5sum == "56f46611dfa80d0eead602cbb3f6dcee"
|
||||
|
||||
|
||||
|
||||
def test_filesize(linux_microcore_img):
|
||||
image = Image(linux_microcore_img)
|
||||
assert image.filesize == 5
|
||||
|
||||
@@ -51,6 +51,7 @@ def http_client(http_request, network_manager):
|
||||
def http_request():
|
||||
|
||||
mock = unittest.mock.Mock()
|
||||
|
||||
def call_request(url):
|
||||
mock(url)
|
||||
return mock
|
||||
@@ -185,7 +186,6 @@ def test_processDownloadProgress(http_client):
|
||||
assert args[0] == {"action": "ping"}
|
||||
|
||||
|
||||
|
||||
def test_processDownloadProgressHTTPError(http_client):
|
||||
|
||||
callback = unittest.mock.MagicMock()
|
||||
@@ -317,7 +317,7 @@ def test_callbackConnect_minor_version_invalid(http_client):
|
||||
}
|
||||
mock = unittest.mock.MagicMock()
|
||||
|
||||
#Stable release
|
||||
# Stable release
|
||||
if __version_info__[3] == 0:
|
||||
http_client._callbackConnect("GET", "/version", mock, {}, {}, params)
|
||||
assert http_client._connected is False
|
||||
@@ -327,7 +327,6 @@ def test_callbackConnect_minor_version_invalid(http_client):
|
||||
assert http_client._connected is True
|
||||
|
||||
|
||||
|
||||
def test_callbackConnect_non_gns3_server(http_client):
|
||||
|
||||
params = {
|
||||
@@ -337,4 +336,3 @@ def test_callbackConnect_non_gns3_server(http_client):
|
||||
http_client._callbackConnect("GET", "/version", mock, {}, {}, params)
|
||||
assert http_client._connected is False
|
||||
mock.assert_called_with({"message": "The remote server http://127.0.0.1:8000 is not a GNS3 server"}, error=True, server=http_client)
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ from unittest.mock import patch
|
||||
|
||||
from gns3.image_manager import ImageManager
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def image_manager(tmpdir):
|
||||
ImageManager._instance = None
|
||||
@@ -34,7 +35,7 @@ def qemu_img(tmpdir):
|
||||
"""
|
||||
Return a fake qemu IMG
|
||||
"""
|
||||
path = str(tmpdir / 'QEMU' /'test.img')
|
||||
path = str(tmpdir / 'QEMU' / 'test.img')
|
||||
os.makedirs(str(tmpdir / 'QEMU'))
|
||||
open(path, 'w+').close()
|
||||
return path
|
||||
|
||||
@@ -38,4 +38,3 @@ def test_context():
|
||||
assert progress._allow_cancel_query is True
|
||||
assert progress._cancel_button_text == ""
|
||||
assert progress._allow_cancel_query is False
|
||||
|
||||
|
||||
@@ -188,13 +188,12 @@ def test_handle_handleSslErrors():
|
||||
reply.url.return_value.toDisplayString.return_value = "https://root@127.0.0.1:443/v1/version"
|
||||
ssl_error = MagicMock()
|
||||
ssl_error.certificate.return_value.digest.return_value = binascii.unhexlify("cca0a932ced2fb1b1a18c823542cb065")
|
||||
errorList = [ ssl_error ]
|
||||
errorList = [ssl_error]
|
||||
|
||||
with patch("gns3.qt.QtWidgets.QMessageBox.warning") as message_box_mock:
|
||||
message_box_mock.return_value = QtWidgets.QMessageBox.Yes
|
||||
servers._handleSslErrors(reply, errorList)
|
||||
|
||||
|
||||
servers._saveSettings()
|
||||
assert len(servers._settings["remote_servers"]) == 1
|
||||
assert servers._settings["remote_servers"] == [
|
||||
@@ -209,5 +208,3 @@ def test_handle_handleSslErrors():
|
||||
'user': 'root'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -44,4 +44,3 @@ def test_load_invalid(file):
|
||||
|
||||
errors = getTopologyValidationErrors(topology)
|
||||
assert errors is not None, errors
|
||||
|
||||
|
||||
@@ -118,4 +118,3 @@ def test_getLastVersionFromPyPiReplyNewMajor(update, stableVersion):
|
||||
}
|
||||
}
|
||||
assert update._getLastMinorVersionFromPyPiReply(body) == '1.4.1'
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user