5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-10 01:18:06 +03:00
Commit Graph

1009 Commits

Author SHA1 Message Date
Dominik Csapak
169ddf541d ui: prune: fix sending invalid parameters
the prune input panel is used in various contexts (add/editing a
prunejob, adding a datastore, executing a prune). These different api
calls don't all take the same parameters, so we have to correctly set
the `isCreate` to not send a `delete` paramter for those request if
there was an empty field.

Also set 'max-depth:0' only when recursive was not set *and* we can
set 'recursive', because for creating a datastore that is not supported
by the api, and for the prune job editing we override the whole
onGetValues anyway so that's not an issue there.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-07 10:30:40 +01:00
Dominik Csapak
3c8f974e88 ui: tape backup job: don't send delete value on creation
this is not a valid parameter for the create call. To do that in the
onGetValues method, we have to pass the 'isCreate' value through to the
input panels via cbind.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-07 10:30:40 +01:00
Dominik Csapak
19458d754e ui: metrics: don't send digest when creating a new influxdbupd host
we accidentally always tried to load an existing config, even when
creating a new entry. This returned the list of all configured ones plus
the digest (which gets set by the edit window). When the digest is set,
the edit window will send it along, but that does not exist for the
create api call, so it failed.

To fix it, guard the load behind the `serverid` property, which is only
set when we edit an existing entry.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-07 10:30:40 +01:00
Dominik Csapak
38fd54fbc8 ui: prune job edit: indent fix
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-07 10:30:40 +01:00
Dominik Csapak
9481cc26b4 ui: system config: fix deleting DNS entries
While PVE and PMG use a rather brittle "replace whole config" style on
their DNS entry CRUD API, the PBS one was made with a per-entry level
granularity, so that single entries can modified, or deleted, without
touching the others.

But the UI from the widget-toolkit was made for the older PVE/PMG
behavior and did  not sent along the delete-array of to-be-deleted
keys.

Since widget-toolkit commit 8d161ac ("dns: update comment to avoid
coupling to downstream dependency") the DNS edit window supports
opting into that by setting the new `deleteEmpty` config parameter.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: expand commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-04 14:50:10 +01:00
Stefan Sterz
9d66b5b5c3 ui: trim whitespaces when adding a subscription key
users that add the correct subscription key just get unnecessarily
confused with a "value does not match the regex pattern" error if
they accidentally have a stray whitespace at the end or beginning
otherwise.

Switch to using our `proxmoxtextfield` component that provides a
`trimValue` config option since widget-toolkit commit 5d7d30d ("text
field: add trimValue config") that was made just for this case.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
 [ TL: reference widget toolkit commit ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-01 10:44:40 +01:00
Thomas Lamprecht
deb33767d5 ui: tape inventory: do not translate UUID
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 11:06:08 +01:00
Gabriel Goller
19d02ed43b close #4819: ui: allow usernames shorter than 4 characters
This already works in pve and is also possible in pbs when using the
`proxmox-backup-manager user create` command.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2024-01-18 16:37:07 +01:00
Dominik Csapak
3657fa1ff3 ui: tape: add remove media button
this only removes media from the inventory, it does not touch the data

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-01-12 10:26:55 +01:00
Dominik Csapak
ee347f69ae ui: tape inventory: use uuid as id
and add it as a hidden column. This now displays all tapes even if there
are some with identical label-texts.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-01-12 10:26:43 +01:00
Philipp Hufnagl
4e45d84fb3 ui: Show if Filter includes or excludes
To make the UI compatible, the Group Filter dialogue has been extended
by a second list, so it now features a list for all include filter and
one for all exclude filters.

Internally, all include as well as exclude filter are managed into one
list. The 2 list view is just for a cleaner representation in the UI.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
2024-01-10 10:13:45 +01:00
Fiona Ebner
50abd38a70 fix #5117: ui: node info: avoid invalid array access for certain foreign kernels
with custom build date format, which would prevent the panel from loading.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-12-14 13:52:07 +01:00
Gabriel Goller
0cac699e0c ui: datastore summary handle non-existent values
Correctly display missing 'avail' and 'used' attributes in the
datatstore summary. This simply sets it to 0, so that we don't get any
errors in the console.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2023-12-11 13:08:51 +01:00
Dominik Csapak
6ee8e0917d ui: fix deleting datastore without 'keep-job-configs'
without any default value in the viewModel, the resulting url would be:

`<id>?destroy-data=<value>&keep-job-configs=`

which is missing the actual value, so add the default

Fixes: e9979a1a ("ui: add 'keep configs' checkbox to datastore removal window")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
2023-11-30 10:18:15 +01:00
Thomas Lamprecht
6685122c3b tree-wide: fix various typos
found with codespell

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 18:32:07 +01:00
Thomas Lamprecht
dc4f8964b5 ui: dashboard: increase panel height a bit
to make the system load/status summary one look less cramped, as that
got recently the boot-mode information line added.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 17:52:19 +01:00
Dominik Csapak
a662274e69 ui: add fingerprint also to the 'show connection information' window
by globally calling the 'status' api once and saving the fingerprint
into the global Proxmox variable.

since not all users might have that permission, ignore errors for that,
and don't show the fingerprint in this case

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-29 17:12:41 +01:00
Dominik Csapak
4ea89615ae ui: add 'show connection information' button for datastores
this has a similar functionality as the 'show fingerprint' button,
but for repository strings that are needed e.g. for the cli

included with and without the current user for convenience

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: squash in window title rename and iconCls fix for light-mode ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 17:12:41 +01:00
Thomas Lamprecht
f5d5b454a4 ui: datastore content: add menu separator above forget entry
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 17:05:46 +01:00
Gabriel Goller
487922752b ui: dashboard: nicely display kernel version
Extract and display the build version and kernel
release nicely.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-29 15:31:35 +01:00
Gabriel Goller
220f3c1cd9 ui: dashboard: show the bootmode
Shows the bootmode of the instance. Options are Legacy BIOS,
EFI, or EFI(Secure Boot).

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-29 15:31:35 +01:00
Hannes Laimer
6de99d3040 ui: disable rate-limit for local sync jobs
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-29 14:51:53 +01:00
Hannes Laimer
e9979a1ac6 ui: add 'keep configs' checkbox to datastore removal window
... since the API already accepts a boolean for that.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
[ DC: actually send the option to the api ]
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-29 10:36:08 +01:00
Thomas Lamprecht
13ef537025 Revert "ui: sync job edit: fix showing value for target store upon edit of local sync job"
This reverts commit 3940f48c47 as it's
bogus and was already fixed on master, so that's why testing this
change made it look like it was working now compared to the previous
version.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-29 08:57:36 +01:00
Fiona Ebner
3940f48c47 ui: sync job edit: fix showing value for target store upon edit of local sync job
when editing a local sync job, the field would be empty because of
this and not be set to the previously configured remote-store.

The binding is already used for the local datastore, not sure why it
should even be applied to the target where it might not even be valid.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-11-28 18:50:04 +01:00
Markus Frank
e0dfdd143c fix #3690: ui: enable wipe-disk feature in system disk view
Set `supportsWipeDisk` to true to enables the wipe button in the web
UI.

The entry for override_task_descriptions is copied from pve-manager.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
2023-11-28 18:39:45 +01:00
Hannes Laimer
eed57dfce1 ui: fix changing remote to local sync job
Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-28 17:35:21 +01:00
Thomas Lamprecht
f74f3cc2d7 ui: update online help info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-28 17:34:56 +01:00
Dominik Csapak
771250a720 ui: datastore content: add context menu to groups and snapshots
and show the relevant actions. They will be forwarded to the controller,
so we can reuse that code without big refactoring them into another
class/place.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-28 15:57:04 +01:00
Hannes Laimer
fbee479979 ui: fix local sync job edit
... since the store field was cleared when the window opened.

Reported-by: Lukas Wagner <l.wagner@proxmox.com>
Fixes: 9039d6709e
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-28 14:13:35 +01:00
Hannes Laimer
9039d6709e ui: fix sync job initial loading of local datastores
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2023-11-27 14:44:26 +01:00
Thomas Lamprecht
c884061623 ui: avoid single-line if in optional-remote renderer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-25 17:13:47 +01:00
Hannes Laimer
535ca853c2 ui: add support for optional Remote in SyncJob
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Tested-by: Gabriel Goller <g.goller@proxmox.com>
2023-11-25 17:07:42 +01:00
Maximiliano Sandoval
053b29416f TapeInventory: Fix string missing 'in'
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-11-24 14:54:21 +01:00
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
Dominik Csapak
4206d6fadb 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>
2023-11-10 13:00:00 +01:00
Dominik Csapak
be79c2bb6e ui: tape: mark incomplete media-sets as such
by counting the returned tapes and compare it to the sequence number.
If the tape count is lower than the highest sequence number plus one,
there must be a tape missing.

Mark it in the text and add the proxmox-warning-row class.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-08 16:36:42 +01:00
Markus Frank
e86549f376 ui: add Remove button for DirectoryList
With this patch it is possible to remove systemd mount units via the webui.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-07 10:32:05 +01:00
Thomas Lamprecht
e5dc7fef05 ui: system config: fix leading whitespace in translation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-29 13:18:53 +01:00
Thomas Lamprecht
24323c0903 ui: update generated OnlineHelpInfo map
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-13 17:22:19 +02:00
Thomas Lamprecht
fb7c608112 ui: renamed pmx-faded to pmx-opacity-75
"Nomen est omen" and go for three quarter while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-13 17:17:32 +02:00
Philipp Hufnagl
ba558d105f fix #4260: ui: fallback to note of last snapshot for backup group comment
When there is no comment for a backup group, the comment of the last
(most recent) snapshot in this group will be shown as dimmed text, as
long as the back group is collapsed.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
2023-10-13 16:58:06 +02:00
Dominik Csapak
344db2d6f6 ui: tape restore: fix default namespace mapping
the ui shows the default 'root' namespace as target, but this only
worked when no namespace was selected. as soon as one source datastore
had a target namespace selected, the others datastores would be
skipped as there was no namespace mapping for them. To fix that, we
simply send a default namespace mapping for each source datastore
without a target (no target means 'root')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
2023-10-03 13:17:18 +02:00
Dominik Csapak
38c71b721e ui: don't show reset button on zfs creation
the reset button only makes sense for editing existing entries,
not for creating new.

This brings it inline with the ZFS create window from PVE.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-09-07 17:46:12 +02:00
Dominik Csapak
9bf4ff8409 ui: user view: fix refresh for totp locked column
by adding the 'totp-locked' column to the model

a diff store can only know if a column has changed if the column is
defined in the model, otherwise it'll only load it the first time
(when the 'load' called on the diff store)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-27 13:30:45 +02:00
Wolfgang Bumiller
e01b9c45c5 ui: add missing unlockTfa handler
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-27 13:30:32 +02:00
Thomas Lamprecht
988a177da8 ui: user view: fix eslint error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 20:09:06 +02:00
Wolfgang Bumiller
f905e05cff ui: add TFA lock status and unlock button
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-26 19:47:16 +02:00
Dominik Csapak
5e082e4fb6 try using 'pve-eslint' if it exists
but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: move into www/manager Makefile directly]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-24 17:49:44 +02:00
Dominik Csapak
73bd988c42 ui: tape: fix restore datastore mapping parameter construction
We recently took into account the selected datastore when restoring
from tape, but the snapshot grids value may not only be a single
datastore, it can also be a list of snapshots, datastores or 'all'.

Handle these cases and extract the source datastore correctly.

This fixes tape restoration when not a whole datastore is selected.

Reported in the forum:
https://forum.proxmox.com/threads/restore-from-lto-parameter-verification-errors-store.128445

Fixes: df881ed0 ("ui: tape: fix restoring a single datastore")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-06 13:12:43 +02:00