3429304733
previously, the snapshot grid returned one of three possible types of values: * a list of snapshots * a list of datastores (if only whole datastores were selected) * the string 'all' (when all snapshots were selected) this led to some confusing and wrong code, especially the part: ``` if (source === 'all') { source = values.store; } ``` which basically set the selected *target* store as a source. (meaning it tried restoring a datastore with the selected target name, regardless if it existed or not) This fell through in testing, since we most often only restored to the same datastore anyway were the target and source name were the same. Rework the return value to return the empty array in case all snapshots are selected, since selecting none is not a valid anyway. This means we always get an array back, which makes the code a bit cleaner overall. At the same time, we now differentiate correctly the 'all selected' case, by setting the selected target as a default target. So instead of previously having `target=target` as datastore parameter, we now have `target` which is the correct behavior when we want to restore the whole media set anyway. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Tested-by: Mira Limbeck <m.limbeck@proxmox.com> |
||
---|---|---|
.. | ||
button | ||
config | ||
css | ||
dashboard | ||
data | ||
datastore | ||
form | ||
images | ||
panel | ||
tape | ||
window | ||
Application.js | ||
Dashboard.js | ||
DirectoryList.js | ||
index.hbs | ||
LoginView.js | ||
MainView.js | ||
Makefile | ||
NavigationTree.js | ||
NodeNotes.js | ||
OnlineHelpInfo.js | ||
Schema.js | ||
ServerAdministration.js | ||
ServerStatus.js | ||
Subscription.js | ||
SystemConfiguration.js | ||
Utils.js | ||
VersionInfo.js | ||
ZFSList.js |