proxmox-backup/www
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
..
button ui: administration: set icons for tabs 2020-10-31 09:11:11 +01:00
config ui: user view: fix refresh for totp locked column 2023-06-27 13:30:45 +02:00
css ui: renamed pmx-faded to pmx-opacity-75 2023-10-13 17:17:32 +02:00
dashboard ui: dashboard: show tape backups/restores on task summary 2023-05-17 11:23:54 +02:00
data ui: running tasks: update limit to 100 2020-07-11 12:53:32 +02:00
datastore ui: renamed pmx-faded to pmx-opacity-75 2023-10-13 17:17:32 +02:00
form fix #4534: add clear trigger for simpler clearing schedule 2023-02-17 12:27:04 +01:00
images ui: tape drive icon: invert 2021-03-08 15:51:49 +01:00
panel ui: dark mode: add dark mode colors to the datastore usage charts 2023-03-28 15:24:41 +02:00
tape fix #4977: ui: tape: restore: rework snapshot selection logic 2023-11-10 13:00:08 +01:00
window ui: don't show reset button on zfs creation 2023-09-07 17:46:12 +02:00
Application.js ui: app: fix openID helper usage and rework style 2021-07-03 23:12:08 +02:00
Dashboard.js ui: dashboard: show tape backups/restores on task summary 2023-05-17 11:23:54 +02:00
DirectoryList.js ui: add Remove button for DirectoryList 2023-11-07 10:32:05 +01:00
index.hbs proxy/ui: implement theme switcher 2023-03-09 08:04:18 +01:00
LoginView.js ui: fix default language display 2022-09-12 09:42:01 +02:00
MainView.js ui: main view: rename "Theme" selector to "Color Theme" 2023-05-17 11:39:54 +02:00
Makefile try using 'pve-eslint' if it exists 2023-06-24 17:49:44 +02:00
NavigationTree.js ui: datastore: override maintenance icon if currently destroying 2022-11-28 15:56:39 +01:00
NodeNotes.js fix #3067: ui: add a separate notes view for longer markdown notes 2022-04-25 08:39:39 +02:00
OnlineHelpInfo.js ui: update generated OnlineHelpInfo map 2023-10-13 17:22:19 +02:00
Schema.js ui: add MetricServerView and use it 2022-06-13 10:01:05 +02:00
ServerAdministration.js ui: server administration: repos: add online help 2021-07-22 10:09:53 +02:00
ServerStatus.js ui: remove white backgrounds from package versions and system report 2023-03-09 08:04:18 +01:00
Subscription.js ui: fix reloading subscription info after key upload 2023-05-17 08:17:45 +02:00
SystemConfiguration.js ui: system config: fix leading whitespace in translation 2023-10-29 13:18:53 +01:00
Utils.js server: add LDAP realm sync job 2023-02-10 12:46:19 +01:00
VersionInfo.js ui: minimally increase font-size of product title and version 2021-07-03 23:13:33 +02:00
ZFSList.js ui: some more eslint auto-fixes 2020-09-25 18:34:54 +02:00