mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-07-09 17:46:12 +00:00
ui: tape: restore: improve variable names
some of the variable names did not really tell the full story, so extend them a bit. This makes the intention much clearer. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
This commit is contained in:
parent
be79c2bb6e
commit
4206d6fadb
@ -723,7 +723,7 @@ Ext.define('PBS.TapeManagement.SnapshotGrid', {
|
|||||||
let me = this;
|
let me = this;
|
||||||
let snapshots = [];
|
let snapshots = [];
|
||||||
|
|
||||||
let storeCounts = {};
|
let selectedStoreCounts = {};
|
||||||
|
|
||||||
me.getSelection().forEach((rec) => {
|
me.getSelection().forEach((rec) => {
|
||||||
let id = rec.get('id');
|
let id = rec.get('id');
|
||||||
@ -732,10 +732,10 @@ Ext.define('PBS.TapeManagement.SnapshotGrid', {
|
|||||||
// only add if not filtered
|
// only add if not filtered
|
||||||
if (me.store.findExact('id', id) !== -1) {
|
if (me.store.findExact('id', id) !== -1) {
|
||||||
snapshots.push(`${store}:${snap}`);
|
snapshots.push(`${store}:${snap}`);
|
||||||
if (storeCounts[store] === undefined) {
|
if (selectedStoreCounts[store] === undefined) {
|
||||||
storeCounts[store] = 0;
|
selectedStoreCounts[store] = 0;
|
||||||
}
|
}
|
||||||
storeCounts[store]++;
|
selectedStoreCounts[store]++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -747,17 +747,17 @@ Ext.define('PBS.TapeManagement.SnapshotGrid', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let wholeStores = [];
|
let wholeStores = [];
|
||||||
let wholeStoresSelected = true;
|
let onlyWholeStoresSelected = true;
|
||||||
for (const [store, count] of Object.entries(storeCounts)) {
|
for (const [store, selectedCount] of Object.entries(selectedStoreCounts)) {
|
||||||
if (me.storeCounts[store] === count) {
|
if (me.storeCounts[store] === selectedCount) {
|
||||||
wholeStores.push(store);
|
wholeStores.push(store);
|
||||||
} else {
|
} else {
|
||||||
wholeStoresSelected = false;
|
onlyWholeStoresSelected = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wholeStoresSelected) {
|
if (onlyWholeStoresSelected) {
|
||||||
return wholeStores;
|
return wholeStores;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user