Usability fixes

Added label to inform the user only running VMs are listed in backup
GUI; made "ignore missing" label clearer.
This commit is contained in:
Marta Marczykowska-Górecka 2017-12-11 00:13:15 +01:00
parent 7848b6b2c3
commit 4e2835531e
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B
5 changed files with 62 additions and 63 deletions

View File

@ -105,10 +105,6 @@ class BackupVMsWindow(ui_backupdlg.Ui_Backup, multiselectwidget.QtGui.QWizard):
self.total_size = 0
# TODO: is the is_running criterion really necessary? It's designed to
# avoid backuping a VM into itself or surprising the user with starting
# a VM when they didn't plan to.
# TODO: inform the user only running VMs are listed?
self.target_vm_list, self.target_vm_idx = utils.prepare_vm_choice(
self.appvm_combobox,
self.qvm_collection,

View File

@ -43,12 +43,7 @@ def fill_appvms_list(dialog):
if vm.klass == 'TemplateVM' and vm.installed_by_rpm:
continue
# TODO: is the is_running criterion really necessary? It's designed to
# avoid backuping a VM into itself or surprising the user with starting
# a VM when they didn't plan to.
# TODO: remove debug
debug = True
if (debug or vm.is_running()) and vm.qid != 0:
if vm.is_running() and vm.qid != 0:
dialog.appvm_combobox.addItem(vm.name)
@ -63,7 +58,6 @@ def select_path_button_clicked(dialog, select_file=False):
file_dialog.setReadOnly(True)
new_path = None
# TODO: check if dom0 is available
new_appvm = str(dialog.appvm_combobox.currentText())
vm = dialog.qvm_collection.domains[new_appvm]
@ -78,7 +72,6 @@ def select_path_button_clicked(dialog, select_file=False):
dialog.tr("Nothing selected!"),
dialog.tr("No file or directory selected."))
# TODO: check if this works for restore
if new_path:
dialog.dir_line_edit.setText(new_path)

View File

@ -121,7 +121,7 @@ class RestoreVMsWindow(ui_restoredlg.Ui_Restore, QtGui.QWizard):
self.select_vms_widget.selected_list.clear()
self.select_vms_widget.available_list.clear()
self.target_appvm = None # TODO: what is the purpose of this
self.target_appvm = None
if self.appvm_combobox.currentIndex() != 0: # An existing appvm chosen
self.target_appvm = self.qvm_collection.domains[
str(self.appvm_combobox.currentText())]
@ -134,8 +134,6 @@ class RestoreVMsWindow(ui_restoredlg.Ui_Restore, QtGui.QWizard):
self.passphrase_line_edit.text()
)
# TODO: change text of ignore missing to ignore
# missing templates and netvms
if self.ignore_missing.isChecked():
self.backup_restore.options.use_default_template = True
self.backup_restore.options.use_default_netvm = True

View File

@ -180,53 +180,7 @@
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Backup security</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Encryption / Verification&lt;br/&gt;passphrase:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="passphrase_line_edit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Reenter passphrase:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="passphrase_line_edit_verify">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
@ -279,6 +233,64 @@
<zorder>save_profile_checkbox</zorder>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Backup security</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Encryption / Verification&lt;br/&gt;passphrase:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="passphrase_line_edit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Reenter passphrase:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="passphrase_line_edit_verify">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>NOTE: Only running VMs are listed.</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWizardPage" name="confirm_page">

View File

@ -52,7 +52,7 @@
<string>Ignore missing templates or netvms, restore VMs anyway.</string>
</property>
<property name="text">
<string>ignore missing</string>
<string>ignore missing templates and net VMs</string>
</property>
</widget>
</item>