proxmox-backup/www/tape
Dominik Csapak 3429304733 fix #4977: ui: tape: restore: rework snapshot selection logic
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>
2023-11-10 13:00:08 +01:00
..
form ui: tape: DriveSelector: make wider and fine-tune column flex 2021-06-07 16:57:45 +02:00
window fix #4977: ui: tape: restore: rework snapshot selection logic 2023-11-10 13:00:08 +01:00
BackupJobs.js ui: fix group-filter property name 2021-11-22 09:13:32 +01:00
BackupOverview.js ui: tape: mark incomplete media-sets as such 2023-11-08 16:36:42 +01:00
ChangerConfig.js ui: tape: increase tapestore interval 2021-03-10 11:00:10 +01:00
ChangerStatus.js ui: tape/ChangerStatus: adding parameter selection to inventory 2022-10-20 13:22:46 +02:00
DriveConfig.js ui: tape: increase tapestore interval 2021-03-10 11:00:10 +01:00
DriveStatus.js ui: tape: reload drive status on user actions 2021-04-23 16:25:17 +02:00
EncryptionKeys.js ui: use shorter datetime format for encryption key creation time 2021-03-04 17:57:40 +01:00
PoolConfig.js ui: tape: retention/allocation are Policies, note so 2021-03-28 13:28:36 +02:00
TapeInventory.js ui: hyphenate "Media-Set" to make it clearer that its one noun 2021-05-21 15:53:50 +02:00
TapeManagement.js ui: tape panel: add/use icons 2021-03-08 14:35:36 +01:00