all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 5/6] ui: tape: add Restore Window
Date: Tue,  2 Feb 2021 14:00:38 +0100	[thread overview]
Message-ID: <20210202130039.6564-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20210202130039.6564-1-d.csapak@proxmox.com>

in the BackupOverview, when a media-set is selected

Signed-off-by: Dominik Csapak <d.csapak@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





  parent reply	other threads:[~2021-02-02 13:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 13:00 [pbs-devel] [PATCH proxmox-backup 1/6] api2/types/tape/media: add media_set_ctime to MediaContentEntry Dominik Csapak
2021-02-02 13:00 ` [pbs-devel] [PATCH proxmox-backup 2/6] ui: refactor get_type_icon_cls Dominik Csapak
2021-02-02 13:00 ` [pbs-devel] [PATCH proxmox-backup 3/6] ui: tape: rework BackupOverview Dominik Csapak
2021-02-02 13:00 ` [pbs-devel] [PATCH proxmox-backup 4/6] ui: tape: TapeBackupWindow: add missing DriveSelector Dominik Csapak
2021-02-02 13:00 ` Dominik Csapak [this message]
2021-02-02 13:00 ` [pbs-devel] [PATCH proxmox-backup 6/6] ui: tape: add TapeInventory panel Dominik Csapak
2021-02-02 13:49 ` [pbs-devel] applied: [PATCH proxmox-backup 1/6] api2/types/tape/media: add media_set_ctime to MediaContentEntry Dietmar Maurer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210202130039.6564-5-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal