[pbs-devel] [PATCH proxmox-backup 5/6] ui: tape: add Restore Window
Dominik Csapak
d.csapak at proxmox.com
Tue Feb 2 14:00:38 CET 2021
in the BackupOverview, when a media-set is selected
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/Makefile | 1 +
www/tape/BackupOverview.js | 8 ++++++
www/tape/window/TapeRestore.js | 45 ++++++++++++++++++++++++++++++++++
3 files changed, 54 insertions(+)
create mode 100644 www/tape/window/TapeRestore.js
diff --git a/www/Makefile b/www/Makefile
index 7a47ad8d..1f45bc14 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -20,6 +20,7 @@ TAPE_UI_FILES= \
tape/window/LabelMedia.js \
tape/window/PoolEdit.js \
tape/window/TapeBackup.js \
+ tape/window/TapeRestore.js \
tape/BackupOverview.js \
tape/ChangerConfig.js \
tape/ChangerStatus.js \
diff --git a/www/tape/BackupOverview.js b/www/tape/BackupOverview.js
index f850c29a..439c1394 100644
--- a/www/tape/BackupOverview.js
+++ b/www/tape/BackupOverview.js
@@ -148,6 +148,14 @@ Ext.define('PBS.TapeManagement.BackupOverview', {
text: gettext('New Backup'),
handler: 'backup',
},
+ {
+ xtype: 'proxmoxButton',
+ disabled: true,
+ text: gettext('Restore Media Set'),
+ handler: 'restore',
+ parentXType: 'treepanel',
+ enableFn: (rec) => !!rec.data.uuid,
+ },
],
columns: [
diff --git a/www/tape/window/TapeRestore.js b/www/tape/window/TapeRestore.js
new file mode 100644
index 00000000..9e0a5edb
--- /dev/null
+++ b/www/tape/window/TapeRestore.js
@@ -0,0 +1,45 @@
+Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
+ extend: 'Proxmox.window.Edit',
+ alias: 'pbsTapeRestoreWindow',
+ mixins: ['Proxmox.Mixin.CBind'],
+
+ width: 400,
+ title: gettext('Restore Media Set'),
+ url: '/api2/extjs/tape/restore',
+ method: 'POST',
+ showTaskViewer: true,
+ isCreate: true,
+
+ defaults: {
+ labelWidth: 120,
+ },
+
+ items: [
+ {
+ xtype: 'displayfield',
+ fieldLabel: gettext('Media Set'),
+ cbind: {
+ value: '{mediaset}',
+ },
+ },
+ {
+ xtype: 'displayfield',
+ fieldLabel: gettext('Media Set UUID'),
+ name: 'media-set',
+ submitValue: true,
+ cbind: {
+ value: '{uuid}',
+ },
+ },
+ {
+ xtype: 'pbsDataStoreSelector',
+ fieldLabel: gettext('Datastore'),
+ name: 'store',
+ },
+ {
+ xtype: 'pbsDriveSelector',
+ fieldLabel: gettext('Drive'),
+ name: 'drive',
+ },
+ ],
+});
--
2.20.1
More information about the pbs-devel
mailing list