mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-06-15 16:28:56 +00:00
ui: tape: fix restoring a single datastore
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>
This commit is contained in:
parent
84a91c5b93
commit
df881ed0fc
@ -375,9 +375,15 @@ Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
|
|||||||
onGetValues: function(values) {
|
onGetValues: function(values) {
|
||||||
let me = this;
|
let me = this;
|
||||||
let controller = me.up('window').getController();
|
let controller = me.up('window').getController();
|
||||||
|
let vm = controller.getViewModel();
|
||||||
let datastores = [];
|
let datastores = [];
|
||||||
if (values.store.toString() !== "") {
|
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;
|
delete values.store;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user