Backup dialog.
Plus an extra page in the backup restore dialog, so that it resembles the backup dialog.
This commit is contained in:
parent
6481a551de
commit
e38f4df7fe
2
Makefile
2
Makefile
@ -20,6 +20,8 @@ res:
|
|||||||
pyuic4 -o qubesmanager/ui_newfwruledlg.py newfwruledlg.ui
|
pyuic4 -o qubesmanager/ui_newfwruledlg.py newfwruledlg.ui
|
||||||
pyuic4 -o qubesmanager/ui_multiselectwidget.py multiselectwidget.ui
|
pyuic4 -o qubesmanager/ui_multiselectwidget.py multiselectwidget.ui
|
||||||
pyuic4 -o qubesmanager/ui_settingsdlg.py settingsdlg.ui
|
pyuic4 -o qubesmanager/ui_settingsdlg.py settingsdlg.ui
|
||||||
|
pyuic4 -o qubesmanager/ui_restoredlg.py restoredlg.ui
|
||||||
|
pyuic4 -o qubesmanager/ui_backupdlg.py backupdlg.ui
|
||||||
|
|
||||||
update-repo-current:
|
update-repo-current:
|
||||||
ln -f $(RPMS_DIR)/x86_64/qubes-manager-*$(VERSION)*.rpm ../yum/current-release/current/dom0/rpm/
|
ln -f $(RPMS_DIR)/x86_64/qubes-manager-*$(VERSION)*.rpm ../yum/current-release/current/dom0/rpm/
|
||||||
|
218
backupdlg.ui
Normal file
218
backupdlg.ui
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Backup</class>
|
||||||
|
<widget class="QWizard" name="Backup">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>700</width>
|
||||||
|
<height>399</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Qubes Backup VMs</string>
|
||||||
|
</property>
|
||||||
|
<property name="locale">
|
||||||
|
<locale language="English" country="UnitedStates"/>
|
||||||
|
</property>
|
||||||
|
<property name="options">
|
||||||
|
<set>QWizard::NoBackButtonOnLastPage|QWizard::NoBackButtonOnStartPage</set>
|
||||||
|
</property>
|
||||||
|
<widget class="QWizardPage" name="wizardPage1">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>true</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Select VMs to backup:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWizardPage" name="wizardPage">
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>true</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Select backup destination directory:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Device</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>dev1</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>longdeviceblablabla</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>dev2</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>dev3</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Backup directory:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="pathLineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QToolButton" name="selectPathButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWizardPage" name="wizardPage2">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>true</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>You're about to perform the following actions:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit">
|
||||||
|
<property name="html">
|
||||||
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info<br />A lot of info<br />A lot of info<br />A lot of info<br />A lot of info<br />A lot of info<br />A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info<br />A lot of info</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>true</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>To continue press Next. </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWizardPage" name="wizardPage_2">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>true</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Backup in progress...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit_2">
|
||||||
|
<property name="html">
|
||||||
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info<br />A lot of info<br />A lot of info<br />A lot of info<br />A lot of info<br />A lot of info<br />A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info<br />A lot of info</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QProgressBar" name="progressBar">
|
||||||
|
<property name="value">
|
||||||
|
<number>24</number>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="invertedAppearance">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@ -128,19 +128,6 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name</string>
|
<string>Name</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>50</weight>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="background">
|
|
||||||
<color>
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</property>
|
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -199,6 +186,8 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Options</string>
|
<string>Options</string>
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="action_backup"/>
|
||||||
|
<addaction name="action_restore"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuView">
|
<widget class="QMenu" name="menuView">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -517,6 +506,16 @@
|
|||||||
<string>VM Settings</string>
|
<string>VM Settings</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_restore">
|
||||||
|
<property name="text">
|
||||||
|
<string>Restore VMs from backup</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="action_backup">
|
||||||
|
<property name="text">
|
||||||
|
<string>Backup VMs</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="resources.qrc"/>
|
<include location="resources.qrc"/>
|
||||||
|
136
qubesmanager/backup.py
Normal file
136
qubesmanager/backup.py
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
#!/usr/bin/python2.6
|
||||||
|
#
|
||||||
|
# The Qubes OS Project, http://www.qubes-os.org
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Agnieszka Kostrzewa <agnieszka.kostrzewa@gmail.com>
|
||||||
|
# Copyright (C) 2012 Marek Marczykowski <marmarek@mimuw.edu.pl>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
from PyQt4.QtCore import *
|
||||||
|
from PyQt4.QtGui import *
|
||||||
|
|
||||||
|
from qubes.qubes import QubesVmCollection
|
||||||
|
from qubes.qubes import QubesException
|
||||||
|
from qubes.qubes import QubesDaemonPidfile
|
||||||
|
from qubes.qubes import QubesHost
|
||||||
|
|
||||||
|
import qubesmanager.resources_rc
|
||||||
|
|
||||||
|
from pyinotify import WatchManager, Notifier, ThreadedNotifier, EventsCodes, ProcessEvent
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import time
|
||||||
|
import threading
|
||||||
|
from operator import itemgetter
|
||||||
|
|
||||||
|
from ui_backupdlg import *
|
||||||
|
from multiselectwidget import *
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class BackupVMsWindow(Ui_Backup, QWizard):
|
||||||
|
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
super(BackupVMsWindow, self).__init__(parent)
|
||||||
|
|
||||||
|
self.setupUi(self)
|
||||||
|
|
||||||
|
self.selectVMsWidget = MultiSelectWidget(self)
|
||||||
|
self.verticalLayout.insertWidget(1, self.selectVMsWidget)
|
||||||
|
|
||||||
|
self.selectVMsWidget.available_list.addItem("netVM1")
|
||||||
|
self.selectVMsWidget.available_list.addItem("appVM1")
|
||||||
|
self.selectVMsWidget.available_list.addItem("appVM2")
|
||||||
|
self.selectVMsWidget.available_list.addItem("templateVM1")
|
||||||
|
|
||||||
|
self.connect(self, SIGNAL("currentIdChanged(int)"), self.current_page_changed)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
self.done(0)
|
||||||
|
|
||||||
|
def save_and_apply(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@pyqtSlot(name='on_selectPathButton_clicked')
|
||||||
|
def selectPathButton_clicked(self):
|
||||||
|
self.path = self.pathLineEdit.text()
|
||||||
|
newPath = QFileDialog.getExistingDirectory(self, 'Select backup directory.')
|
||||||
|
if newPath:
|
||||||
|
self.pathLineEdit.setText(newPath)
|
||||||
|
self.path = newPath
|
||||||
|
|
||||||
|
def current_page_changed(self, id):
|
||||||
|
self.button(self.CancelButton).setDisabled(id==3)
|
||||||
|
|
||||||
|
|
||||||
|
# Bases on the original code by:
|
||||||
|
# Copyright (c) 2002-2007 Pascal Varet <p.varet@gmail.com>
|
||||||
|
|
||||||
|
def handle_exception( exc_type, exc_value, exc_traceback ):
|
||||||
|
import sys
|
||||||
|
import os.path
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
filename, line, dummy, dummy = traceback.extract_tb( exc_traceback ).pop()
|
||||||
|
filename = os.path.basename( filename )
|
||||||
|
error = "%s: %s" % ( exc_type.__name__, exc_value )
|
||||||
|
|
||||||
|
QMessageBox.critical(None, "Houston, we have a problem...",
|
||||||
|
"Whoops. A critical error has occured. This is most likely a bug "
|
||||||
|
"in Qubes Restore VMs application.<br><br>"
|
||||||
|
"<b><i>%s</i></b>" % error +
|
||||||
|
"at <b>line %d</b> of file <b>%s</b>.<br/><br/>"
|
||||||
|
% ( line, filename ))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
|
global qubes_host
|
||||||
|
qubes_host = QubesHost()
|
||||||
|
|
||||||
|
global app
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
app.setOrganizationName("The Qubes Project")
|
||||||
|
app.setOrganizationDomain("http://qubes-os.org")
|
||||||
|
app.setApplicationName("Qubes Restore VMs")
|
||||||
|
|
||||||
|
sys.excepthook = handle_exception
|
||||||
|
|
||||||
|
qvm_collection = QubesVmCollection()
|
||||||
|
qvm_collection.lock_db_for_reading()
|
||||||
|
qvm_collection.load()
|
||||||
|
qvm_collection.unlock_db()
|
||||||
|
|
||||||
|
global backup_window
|
||||||
|
backup_window = BackupVMsWindow()
|
||||||
|
|
||||||
|
backup_window.show()
|
||||||
|
|
||||||
|
app.exec_()
|
||||||
|
app.exit()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
@ -39,6 +39,9 @@ import qubesmanager.resources_rc
|
|||||||
import ui_newappvmdlg
|
import ui_newappvmdlg
|
||||||
from ui_mainwindow import *
|
from ui_mainwindow import *
|
||||||
from appmenu_select import AppmenuSelectWindow
|
from appmenu_select import AppmenuSelectWindow
|
||||||
|
from settings import VMSettingsWindow
|
||||||
|
from restore import RestoreVMsWindow
|
||||||
|
from backup import BackupVMsWindow
|
||||||
|
|
||||||
from firewall import EditFwRulesDlg, QubesFirewallRulesModel
|
from firewall import EditFwRulesDlg, QubesFirewallRulesModel
|
||||||
|
|
||||||
@ -601,7 +604,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
for vm_row in self.vms_in_table:
|
for vm_row in self.vms_in_table:
|
||||||
vm_row.update(self.counter)
|
vm_row.update(self.counter)
|
||||||
|
|
||||||
self.table_selection_changed()
|
#self.table_selection_changed()
|
||||||
|
|
||||||
if not out_of_schedule:
|
if not out_of_schedule:
|
||||||
self.counter += 1
|
self.counter += 1
|
||||||
@ -615,13 +618,13 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
self.centralwidget.layout().contentsMargins().right()
|
self.centralwidget.layout().contentsMargins().right()
|
||||||
|
|
||||||
self.table.setFixedWidth( width )
|
self.table.setFixedWidth( width )
|
||||||
self.setFixedWidth( width)
|
|
||||||
|
|
||||||
def table_selection_changed (self):
|
def table_selection_changed (self):
|
||||||
|
|
||||||
vm = self.get_selected_vm()
|
vm = self.get_selected_vm()
|
||||||
|
|
||||||
# Update available actions:
|
# Update available actions:
|
||||||
|
self.action_settings.setEnabled(True)
|
||||||
self.action_removevm.setEnabled(not vm.installed_by_rpm and not vm.last_power_state)
|
self.action_removevm.setEnabled(not vm.installed_by_rpm and not vm.last_power_state)
|
||||||
self.action_resumevm.setEnabled(not vm.last_power_state)
|
self.action_resumevm.setEnabled(not vm.last_power_state)
|
||||||
self.action_pausevm.setEnabled(vm.last_power_state and vm.qid != 0)
|
self.action_pausevm.setEnabled(vm.last_power_state and vm.qid != 0)
|
||||||
@ -878,6 +881,13 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
self.shutdown_monitor[vm.qid] = VmShutdownMonitor (vm)
|
self.shutdown_monitor[vm.qid] = VmShutdownMonitor (vm)
|
||||||
QTimer.singleShot (vm_shutdown_timeout, self.shutdown_monitor[vm.qid].check_if_vm_has_shutdown)
|
QTimer.singleShot (vm_shutdown_timeout, self.shutdown_monitor[vm.qid].check_if_vm_has_shutdown)
|
||||||
|
|
||||||
|
@pyqtSlot(name='on_action_settings_triggered')
|
||||||
|
def action_settings_triggered(self):
|
||||||
|
vm = self.get_selected_vm()
|
||||||
|
settings_window = VMSettingsWindow(vm)
|
||||||
|
settings_window.exec_()
|
||||||
|
|
||||||
|
|
||||||
@pyqtSlot(name='on_action_appmenus_triggered')
|
@pyqtSlot(name='on_action_appmenus_triggered')
|
||||||
def action_appmenus_triggered(self):
|
def action_appmenus_triggered(self):
|
||||||
vm = self.get_selected_vm()
|
vm = self.get_selected_vm()
|
||||||
@ -931,6 +941,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
self.show_inactive_vms = self.action_showallvms.isChecked()
|
self.show_inactive_vms = self.action_showallvms.isChecked()
|
||||||
self.mark_table_for_update()
|
self.mark_table_for_update()
|
||||||
self.update_table(out_of_schedule = True)
|
self.update_table(out_of_schedule = True)
|
||||||
|
self.set_table_geom_height()
|
||||||
|
|
||||||
@pyqtSlot(name='on_action_editfwrules_triggered')
|
@pyqtSlot(name='on_action_editfwrules_triggered')
|
||||||
def action_editfwrules_triggered(self):
|
def action_editfwrules_triggered(self):
|
||||||
@ -948,6 +959,18 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
model.apply_rules()
|
model.apply_rules()
|
||||||
|
|
||||||
|
|
||||||
|
@pyqtSlot(name='on_action_restore_triggered')
|
||||||
|
def action_restore_triggered(self):
|
||||||
|
restore_window = RestoreVMsWindow()
|
||||||
|
restore_window.exec_()
|
||||||
|
|
||||||
|
@pyqtSlot(name='on_action_backup_triggered')
|
||||||
|
def action_backup_triggered(self):
|
||||||
|
backup_window = BackupVMsWindow()
|
||||||
|
backup_window.exec_()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def showhide_collumn(self, col_num, show):
|
def showhide_collumn(self, col_num, show):
|
||||||
self.table.setColumnHidden( col_num, not show)
|
self.table.setColumnHidden( col_num, not show)
|
||||||
self.update_table_columns()
|
self.update_table_columns()
|
||||||
|
@ -60,6 +60,7 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
|
|||||||
self.selectVMsWidget.available_list.addItem("appVM2")
|
self.selectVMsWidget.available_list.addItem("appVM2")
|
||||||
self.selectVMsWidget.available_list.addItem("templateVM1")
|
self.selectVMsWidget.available_list.addItem("templateVM1")
|
||||||
|
|
||||||
|
self.connect(self, SIGNAL("currentIdChanged(int)"), self.current_page_changed)
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
self.done(0)
|
self.done(0)
|
||||||
@ -67,6 +68,9 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
|
|||||||
def save_and_apply(self):
|
def save_and_apply(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def current_page_changed(self, id):
|
||||||
|
self.button(self.CancelButton).setDisabled(id==3)
|
||||||
|
|
||||||
@pyqtSlot(name='on_selectPathButton_clicked')
|
@pyqtSlot(name='on_selectPathButton_clicked')
|
||||||
def selectPathButton_clicked(self):
|
def selectPathButton_clicked(self):
|
||||||
self.path = self.pathLineEdit.text()
|
self.path = self.pathLineEdit.text()
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
<property name="locale">
|
<property name="locale">
|
||||||
<locale language="English" country="UnitedStates"/>
|
<locale language="English" country="UnitedStates"/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="options">
|
||||||
|
<set>QWizard::NoBackButtonOnLastPage|QWizard::NoBackButtonOnStartPage</set>
|
||||||
|
</property>
|
||||||
<widget class="QWizardPage" name="wizardPage1">
|
<widget class="QWizardPage" name="wizardPage1">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
@ -228,7 +231,55 @@ p, li { white-space: pre-wrap; }
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>To accept press Finish. </string>
|
<string>To continue press Next. </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWizardPage" name="wizardPage_2">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>true</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Restore in progress...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit_2">
|
||||||
|
<property name="html">
|
||||||
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info<br />A lot of info<br />A lot of info<br />A lot of info<br />A lot of info<br />A lot of info<br />A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info</p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A lot of info A lot of info A lot of info A lot of info A lot of info A lot of info<br />A lot of info</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QProgressBar" name="progressBar">
|
||||||
|
<property name="value">
|
||||||
|
<number>24</number>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="invertedAppearance">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user