mirror of
https://github.com/GNS3/gns3-gui.git
synced 2026-05-17 00:46:01 +03:00
Change some text regarding appliance installation.
This commit is contained in:
@@ -198,7 +198,7 @@ class ApplianceWizard(QtWidgets.QWizard, Ui_ApplianceWizard):
|
||||
Qemu.instance().getQemuBinariesFromServer(self._compute_id, qpartial(self._getQemuBinariesFromServerCallback), [self._appliance["qemu"]["arch"]])
|
||||
|
||||
elif self.page(page_id) == self.uiUsageWizardPage:
|
||||
self.uiUsageTextEdit.setText("The appliance is available in the {} category.\n\n{}".format(self._appliance["category"].replace("_", " "), self._appliance.get("usage", "")))
|
||||
self.uiUsageTextEdit.setText("The template will be available in the {} category.\n\n{}".format(self._appliance["category"].replace("_", " "), self._appliance.get("usage", "")))
|
||||
|
||||
def _qemuServerCapabilitiesCallback(self, result, error=None, *args, **kwargs):
|
||||
"""
|
||||
@@ -576,10 +576,10 @@ class ApplianceWizard(QtWidgets.QWizard, Ui_ApplianceWizard):
|
||||
def _templateCreatedCallback(self, result, error=False, **kwargs):
|
||||
|
||||
if error is True:
|
||||
QtWidgets.QMessageBox.critical(self.parent(), "Add template", "Template cannot be created: {}".format(result.get("message", "unknown")))
|
||||
QtWidgets.QMessageBox.critical(self.parent(), "Add template", "The template cannot be created: {}".format(result.get("message", "unknown")))
|
||||
return
|
||||
|
||||
QtWidgets.QMessageBox.information(self.parent(), "Add template", "Template '{}' has been successfully created!".format(result["name"]))
|
||||
QtWidgets.QMessageBox.information(self.parent(), "Add template", "The appliance has been installed and a template named '{}' has been successfully created!".format(result["name"]))
|
||||
self._template_created = True
|
||||
self.done(True)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Add appliance</string>
|
||||
<string>Install appliance</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
@@ -39,7 +39,7 @@
|
||||
<string>Server</string>
|
||||
</property>
|
||||
<property name="subTitle">
|
||||
<string>Please choose a server type to run the appliance. The grayed out server types are not supported or configured.</string>
|
||||
<string>Please choose a server type to install the appliance. The grayed out server types are not supported or configured.</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
@@ -75,7 +75,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Run the appliance on a remote server</string>
|
||||
<string>Install the appliance on a remote server</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@@ -97,7 +97,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Run the appliance on the GNS3 VM (recommended)</string>
|
||||
<string>Install the appliance on the GNS3 VM (recommended)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -116,7 +116,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Run the appliance on your local computer</string>
|
||||
<string>Install the appliance on your local computer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -197,7 +197,7 @@
|
||||
<string>Qemu settings</string>
|
||||
</property>
|
||||
<property name="subTitle">
|
||||
<string>Please choose the qemu binary that we will use for running this appliance.</string>
|
||||
<string>Please choose the qemu binary that will be used to run this appliance.</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
|
||||
@@ -162,17 +162,17 @@ class Ui_ApplianceWizard(object):
|
||||
|
||||
def retranslateUi(self, ApplianceWizard):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
ApplianceWizard.setWindowTitle(_translate("ApplianceWizard", "Add appliance"))
|
||||
ApplianceWizard.setWindowTitle(_translate("ApplianceWizard", "Install appliance"))
|
||||
self.uiServerWizardPage.setTitle(_translate("ApplianceWizard", "Server"))
|
||||
self.uiServerWizardPage.setSubTitle(_translate("ApplianceWizard", "Please choose a server type to run the appliance. The grayed out server types are not supported or configured."))
|
||||
self.uiServerWizardPage.setSubTitle(_translate("ApplianceWizard", "Please choose a server type to install the appliance. The grayed out server types are not supported or configured."))
|
||||
self.uiServerTypeGroupBox.setTitle(_translate("ApplianceWizard", "Server type"))
|
||||
self.uiRemoteRadioButton.setText(_translate("ApplianceWizard", "Run the appliance on a remote server"))
|
||||
self.uiVMRadioButton.setText(_translate("ApplianceWizard", "Run the appliance on the GNS3 VM (recommended)"))
|
||||
self.uiLocalRadioButton.setText(_translate("ApplianceWizard", "Run the appliance on your local computer"))
|
||||
self.uiRemoteRadioButton.setText(_translate("ApplianceWizard", "Install the appliance on a remote server"))
|
||||
self.uiVMRadioButton.setText(_translate("ApplianceWizard", "Install the appliance on the GNS3 VM (recommended)"))
|
||||
self.uiLocalRadioButton.setText(_translate("ApplianceWizard", "Install the appliance on your local computer"))
|
||||
self.uiRemoteServersGroupBox.setTitle(_translate("ApplianceWizard", "Remote server"))
|
||||
self.uiRemoteServersLabel.setText(_translate("ApplianceWizard", "Run on:"))
|
||||
self.uiQemuWizardPage.setTitle(_translate("ApplianceWizard", "Qemu settings"))
|
||||
self.uiQemuWizardPage.setSubTitle(_translate("ApplianceWizard", "Please choose the qemu binary that we will use for running this appliance."))
|
||||
self.uiQemuWizardPage.setSubTitle(_translate("ApplianceWizard", "Please choose the qemu binary that will be used to run this appliance."))
|
||||
self.uiQemuListLabel.setText(_translate("ApplianceWizard", "Qemu binary:"))
|
||||
self.uiFilesWizardPage.setTitle(_translate("ApplianceWizard", "Required files"))
|
||||
self.uiFilesWizardPage.setSubTitle(_translate("ApplianceWizard", "The following files are required to install the appliance"))
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
<string>New template</string>
|
||||
</property>
|
||||
<property name="subTitle">
|
||||
<string>Please choose how you want to create a new template</string>
|
||||
<string>Please select how you want to create a new template</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="uiImportApplianceFromServerRadioButton">
|
||||
<property name="text">
|
||||
<string>&Import appliances from the GNS3 server (recommended)</string>
|
||||
<string>&Install an appliance from the GNS3 server (recommended)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@@ -40,14 +40,14 @@
|
||||
<item>
|
||||
<widget class="QRadioButton" name="uiImportApplianceFromFileRadioButton">
|
||||
<property name="text">
|
||||
<string>&Import a GNS3 appliance file (.gns3a)</string>
|
||||
<string>&Import an appliance file (.gns3a extension)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="uiCreateTemplateManuallyRadioButton">
|
||||
<property name="text">
|
||||
<string>&Create a template manually</string>
|
||||
<string>&Manually create a new template</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -58,7 +58,7 @@
|
||||
<string>Appliances from server</string>
|
||||
</property>
|
||||
<property name="subTitle">
|
||||
<string>Please select the appliances to install. Update will request the server to download appliances from our online registry.</string>
|
||||
<string>Select one or more appliances to install. Update will request the server to download appliances from our online registry.</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
|
||||
@@ -51,12 +51,12 @@ class Ui_NewTemplateWizard(object):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
NewTemplateWizard.setWindowTitle(_translate("NewTemplateWizard", "New template"))
|
||||
self.uiSelectTemplateSourceWizardPage.setTitle(_translate("NewTemplateWizard", "New template"))
|
||||
self.uiSelectTemplateSourceWizardPage.setSubTitle(_translate("NewTemplateWizard", "Please choose how you want to create a new template"))
|
||||
self.uiImportApplianceFromServerRadioButton.setText(_translate("NewTemplateWizard", "&Import appliances from the GNS3 server (recommended)"))
|
||||
self.uiImportApplianceFromFileRadioButton.setText(_translate("NewTemplateWizard", "&Import a GNS3 appliance file (.gns3a)"))
|
||||
self.uiSelectTemplateSourceWizardPage.setSubTitle(_translate("NewTemplateWizard", "Please select how you want to create a new template"))
|
||||
self.uiImportApplianceFromServerRadioButton.setText(_translate("NewTemplateWizard", "&Install an appliance from the GNS3 server (recommended)"))
|
||||
self.uiImportApplianceFromFileRadioButton.setText(_translate("NewTemplateWizard", "&Import an appliance file (.gns3a extension)"))
|
||||
self.uiCreateTemplateManuallyRadioButton.setText(_translate("NewTemplateWizard", "&Create a template manually"))
|
||||
self.uiApplianceFromServerWizardPage.setTitle(_translate("NewTemplateWizard", "Appliances from server"))
|
||||
self.uiApplianceFromServerWizardPage.setSubTitle(_translate("NewTemplateWizard", "Please select the appliances to install. Update will request the server to download appliances from our online registry."))
|
||||
self.uiApplianceFromServerWizardPage.setSubTitle(_translate("NewTemplateWizard", "Select one or more appliances to install. Update will request the server to download appliances from our online registry."))
|
||||
self.uiFilterLineEdit.setPlaceholderText(_translate("NewTemplateWizard", "Filter"))
|
||||
self.uiAppliancesTreeWidget.setSortingEnabled(True)
|
||||
self.uiAppliancesTreeWidget.headerItem().setText(0, _translate("NewTemplateWizard", "Appliance name"))
|
||||
|
||||
@@ -190,7 +190,7 @@ def test_add_appliance_with_symbol(linux_microcore_img):
|
||||
assert new_template["symbol"] == ":/symbols/asa.svg"
|
||||
|
||||
|
||||
def test_add_appliance_with_symbol_from_symbols_dir(linux_microcore_img, symbols_dir):
|
||||
def test_add_appliance_with_symbol_from_symbols_dir(empty_config, linux_microcore_img, symbols_dir):
|
||||
with open("tests/registry/appliances/microcore-linux.gns3a", encoding="utf-8") as f:
|
||||
config = json.load(f)
|
||||
config["images"] = [
|
||||
|
||||
Reference in New Issue
Block a user