public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup 1/2] ui: tape: fix formatting
@ 2023-04-25 13:59 Dominik Csapak
  2023-04-25 13:59 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: tape: fix restoring a single datastore Dominik Csapak
  2023-05-17  9:30 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] ui: tape: fix formatting Thomas Lamprecht
  0 siblings, 2 replies; 4+ messages in thread
From: Dominik Csapak @ 2023-04-25 13:59 UTC (permalink / raw)
  To: pbs-devel

this is a separate statement, it should be on a separate line

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/tape/window/TapeRestore.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/tape/window/TapeRestore.js b/www/tape/window/TapeRestore.js
index 70337ff3..48119ac6 100644
--- a/www/tape/window/TapeRestore.js
+++ b/www/tape/window/TapeRestore.js
@@ -189,7 +189,8 @@ Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
 		    let snapshot = snapshotOrDatastore;
 		    let match = snapshot.split(':');
 		    datastore = match[0];
-		} datastores[datastore] = true;
+		}
+		datastores[datastore] = true;
 	    });
 
 	    me.setDataStores(Object.keys(datastores));
-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pbs-devel] [PATCH proxmox-backup 2/2] ui: tape: fix restoring a single datastore
  2023-04-25 13:59 [pbs-devel] [PATCH proxmox-backup 1/2] ui: tape: fix formatting Dominik Csapak
@ 2023-04-25 13:59 ` Dominik Csapak
  2023-05-17  9:31   ` [pbs-devel] applied: " Thomas Lamprecht
  2023-05-17  9:30 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] ui: tape: fix formatting Thomas Lamprecht
  1 sibling, 1 reply; 4+ messages in thread
From: Dominik Csapak @ 2023-04-25 13:59 UTC (permalink / raw)
  To: pbs-devel

if the user selected a single datastore to restore from tape on a
media-set that includes more than one, the ui suggests (and is
intended to) that only that datastore will be restored on the selected
target.

The logic to construct the store mapping parameter did not consider that
case, and simply gave the target as default store, which meant all
datastores were restored onto the target.

To fix that, we have to get the source datastore from the field, and
construct the correct parameter ("source=target").

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/tape/window/TapeRestore.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/www/tape/window/TapeRestore.js b/www/tape/window/TapeRestore.js
index 48119ac6..2ff7c4dd 100644
--- a/www/tape/window/TapeRestore.js
+++ b/www/tape/window/TapeRestore.js
@@ -375,9 +375,15 @@ Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
 		    onGetValues: function(values) {
 			let me = this;
 			let controller = me.up('window').getController();
+			let vm = controller.getViewModel();
 			let datastores = [];
 			if (values.store.toString() !== "") {
-			    datastores.push(values.store);
+			    if (vm.get('singleDatastore')) {
+				let source = controller.lookup('snapshotGrid').getValue();
+				datastores.push(`${source}=${values.store}`);
+			    } else {
+				datastores.push(values.store);
+			    }
 			    delete values.store;
 			}
 
-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup 1/2] ui: tape: fix formatting
  2023-04-25 13:59 [pbs-devel] [PATCH proxmox-backup 1/2] ui: tape: fix formatting Dominik Csapak
  2023-04-25 13:59 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: tape: fix restoring a single datastore Dominik Csapak
@ 2023-05-17  9:30 ` Thomas Lamprecht
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2023-05-17  9:30 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dominik Csapak

Am 25/04/2023 um 15:59 schrieb Dominik Csapak:
> this is a separate statement, it should be on a separate line
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  www/tape/window/TapeRestore.js | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
>

applied, with slight rewording of subject ("tape" and "fix formatting" can be interpreted
quite a bit different), thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup 2/2] ui: tape: fix restoring a single datastore
  2023-04-25 13:59 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: tape: fix restoring a single datastore Dominik Csapak
@ 2023-05-17  9:31   ` Thomas Lamprecht
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2023-05-17  9:31 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dominik Csapak

Am 25/04/2023 um 15:59 schrieb Dominik Csapak:
> if the user selected a single datastore to restore from tape on a
> media-set that includes more than one, the ui suggests (and is
> intended to) that only that datastore will be restored on the selected
> target.
> 
> The logic to construct the store mapping parameter did not consider that
> case, and simply gave the target as default store, which meant all
> datastores were restored onto the target.
> 
> To fix that, we have to get the source datastore from the field, and
> construct the correct parameter ("source=target").
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  www/tape/window/TapeRestore.js | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-17  9:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25 13:59 [pbs-devel] [PATCH proxmox-backup 1/2] ui: tape: fix formatting Dominik Csapak
2023-04-25 13:59 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: tape: fix restoring a single datastore Dominik Csapak
2023-05-17  9:31   ` [pbs-devel] applied: " Thomas Lamprecht
2023-05-17  9:30 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] ui: tape: fix formatting Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal