]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
BEE Backport bacula/src/qt-console/tray-monitor/RestoreJobPage.qml
authorHenrique <henrique.faria@baculasystems.com>
Sat, 16 May 2020 09:41:28 +0000 (11:41 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 29 Apr 2021 08:44:19 +0000 (10:44 +0200)
This commit is the result of the squash of the following main commits:

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Fri Aug 30 11:09:54 2019 -0300

    android: fixed sdcard path and added proper termination of the restore wizard pages

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Thu Aug 29 12:41:59 2019 -0300

    android: Restore Job Feature

    1) Fixed crash that happened after retrieving the client jobs
    2) Added confirmation dialog at the end of the restore wizard
    3) Prepended sdcard path to the default where parameter

Author: Henrique <henrique.faria@baculasystems.com>
Date:   Wed Jun 26 12:03:27 2019 -0300

    android: added missing license and a few comments on src files. FD debug level reduced to 50

Author: Henrique Faria <henrique.faria@baculasystems.com>
Date:   Tue Dec 18 10:56:09 2018 +0100

    android: Port bacula tray-monitor for Android

bacula/src/qt-console/tray-monitor/RestoreJobPage.qml [new file with mode: 0644]

diff --git a/bacula/src/qt-console/tray-monitor/RestoreJobPage.qml b/bacula/src/qt-console/tray-monitor/RestoreJobPage.qml
new file mode 100644 (file)
index 0000000..6b5784b
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+   Bacula(R) - The Network Backup Solution
+
+   Copyright (C) 2000-2020 Kern Sibbald
+
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
+
+   You may use this file and others of this release according to the
+   license defined in the LICENSE file, which includes the Affero General
+   Public License, v3.0 ("AGPLv3") and some additional permissions and
+   terms pursuant to its AGPLv3 Section 7.
+
+   This notice must be preserved when any source code is
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
+*/
+
+import QtQuick 2.10
+import QtQuick.Window 2.10
+import QtQuick.Layouts 1.3
+import QtQuick.Controls 2.3
+import QtQuick.Controls.Material 2.1
+import QtQuick.Dialogs 1.2
+import io.qt.bmob.restorejobcontroller 1.0
+
+Page {
+    id: restoreJobPage
+    visible: true
+    height: parent ? parent.height : 0
+    width: parent ? parent.width : 0
+
+    property var model;
+
+    RestoreUiController {
+        id: restoreJobController
+
+        Component.onCompleted: {
+            if(typeof restoreJobPage.model !== "undefined") {
+                model = restoreJobPage.model
+            }
+        }
+
+        onFileModelChanged: {
+            fileSelectTab.fileModel = restoreJobController.files
+        }
+
+        onDialogTextChanged: {
+            restoreJobDialog.text = restoreJobController.dialogText
+            restoreJobDialog.visible = true
+        }
+    }
+
+    StackLayout {
+        id: restorePageStack
+        anchors.fill: parent
+        currentIndex: 0
+
+        JobSelectTab {
+            id: jobSelectTab
+        }
+
+        FileSelectTab {
+            id: fileSelectTab
+        }
+
+        RestoreConfirmTab {
+            id: restoreConfirmTab
+        }
+    }
+
+    MessageDialog {
+        id: restoreJobDialog
+        modality: Qt.ApplicationModal
+        standardButtons: StandardButton.Ok
+        visible: false
+
+        onAccepted: {
+            stackView.pop();
+        }
+    }
+}
+