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:
parent
7848b6b2c3
commit
4e2835531e
@ -105,10 +105,6 @@ class BackupVMsWindow(ui_backupdlg.Ui_Backup, multiselectwidget.QtGui.QWizard):
|
|||||||
|
|
||||||
self.total_size = 0
|
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.target_vm_list, self.target_vm_idx = utils.prepare_vm_choice(
|
||||||
self.appvm_combobox,
|
self.appvm_combobox,
|
||||||
self.qvm_collection,
|
self.qvm_collection,
|
||||||
|
@ -43,12 +43,7 @@ def fill_appvms_list(dialog):
|
|||||||
if vm.klass == 'TemplateVM' and vm.installed_by_rpm:
|
if vm.klass == 'TemplateVM' and vm.installed_by_rpm:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# TODO: is the is_running criterion really necessary? It's designed to
|
if vm.is_running() and vm.qid != 0:
|
||||||
# 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:
|
|
||||||
dialog.appvm_combobox.addItem(vm.name)
|
dialog.appvm_combobox.addItem(vm.name)
|
||||||
|
|
||||||
|
|
||||||
@ -63,7 +58,6 @@ def select_path_button_clicked(dialog, select_file=False):
|
|||||||
file_dialog.setReadOnly(True)
|
file_dialog.setReadOnly(True)
|
||||||
|
|
||||||
new_path = None
|
new_path = None
|
||||||
# TODO: check if dom0 is available
|
|
||||||
|
|
||||||
new_appvm = str(dialog.appvm_combobox.currentText())
|
new_appvm = str(dialog.appvm_combobox.currentText())
|
||||||
vm = dialog.qvm_collection.domains[new_appvm]
|
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("Nothing selected!"),
|
||||||
dialog.tr("No file or directory selected."))
|
dialog.tr("No file or directory selected."))
|
||||||
|
|
||||||
# TODO: check if this works for restore
|
|
||||||
if new_path:
|
if new_path:
|
||||||
dialog.dir_line_edit.setText(new_path)
|
dialog.dir_line_edit.setText(new_path)
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ class RestoreVMsWindow(ui_restoredlg.Ui_Restore, QtGui.QWizard):
|
|||||||
self.select_vms_widget.selected_list.clear()
|
self.select_vms_widget.selected_list.clear()
|
||||||
self.select_vms_widget.available_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
|
if self.appvm_combobox.currentIndex() != 0: # An existing appvm chosen
|
||||||
self.target_appvm = self.qvm_collection.domains[
|
self.target_appvm = self.qvm_collection.domains[
|
||||||
str(self.appvm_combobox.currentText())]
|
str(self.appvm_combobox.currentText())]
|
||||||
@ -134,8 +134,6 @@ class RestoreVMsWindow(ui_restoredlg.Ui_Restore, QtGui.QWizard):
|
|||||||
self.passphrase_line_edit.text()
|
self.passphrase_line_edit.text()
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: change text of ignore missing to ignore
|
|
||||||
# missing templates and netvms
|
|
||||||
if self.ignore_missing.isChecked():
|
if self.ignore_missing.isChecked():
|
||||||
self.backup_restore.options.use_default_template = True
|
self.backup_restore.options.use_default_template = True
|
||||||
self.backup_restore.options.use_default_netvm = True
|
self.backup_restore.options.use_default_netvm = True
|
||||||
|
106
ui/backupdlg.ui
106
ui/backupdlg.ui
@ -180,53 +180,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="3" 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><html><head/><body><p>Encryption / Verification<br/>passphrase:</p></body></html></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><html><head/><body><p>Reenter passphrase:</p></body></html></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">
|
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
@ -279,6 +233,64 @@
|
|||||||
<zorder>save_profile_checkbox</zorder>
|
<zorder>save_profile_checkbox</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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><html><head/><body><p>Encryption / Verification<br/>passphrase:</p></body></html></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><html><head/><body><p>Reenter passphrase:</p></body></html></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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWizardPage" name="confirm_page">
|
<widget class="QWizardPage" name="confirm_page">
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
<string>Ignore missing templates or netvms, restore VMs anyway.</string>
|
<string>Ignore missing templates or netvms, restore VMs anyway.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>ignore missing</string>
|
<string>ignore missing templates and net VMs</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user