Merge remote-tracking branch 'origin/pr/254'

* origin/pr/254:
  Modified warning shown when destination qube for backup is unavailable
This commit is contained in:
Marek Marczykowski-Górecki 2020-08-12 01:37:57 +02:00
commit 83363299ce
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
3 changed files with 6 additions and 3 deletions

View File

@ -178,7 +178,10 @@ class BackupVMsWindow(ui_backupdlg.Ui_Backup, QtWidgets.QWizard):
if dest_vm_idx > -1:
self.appvm_combobox.setCurrentIndex(dest_vm_idx)
else:
self.unrecognized_config_label.setVisible(True)
self.warning_running_label.setText(
"NOTE: Only running qubes are listed. The profile "
"lists {} as the destination qube, but it is not "
"currently running.".format(dest_vm_name))
if 'destination_path' in profile_data:
dest_path = profile_data['destination_path']

View File

@ -391,7 +391,7 @@ class BackupTest(unittest.TestCase):
self.dialog.show()
# check errors were detected
self.assertTrue(self.dialog.unrecognized_config_label.isVisible())
self.assertIn('incorrect_vm', self.dialog.warning_running_label.text())
@unittest.mock.patch('qubesmanager.backup_utils.load_backup_profile')
@unittest.mock.patch('PyQt5.QtWidgets.QMessageBox.information')

View File

@ -292,7 +292,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="warning_running_label">
<property name="font">
<font>
<italic>true</italic>