Commit Graph

978 Commits

Author SHA1 Message Date
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
Stefan Sterz
18c2110b38 ui: main view: rename "Theme" selector to "Color Theme"
this is already the case in Proxmox VE so just use the same wording
here too to stay consistent

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-05-17 11:39:54 +02:00
Dominik Csapak
df881ed0fc ui: tape: fix restoring a single datastore
if the user selected a single datastore to restore from tape on a
media-set that includes more than one, the ui suggests (and is
intended to) that only that datastore will be restored on the selected
target.

The logic to construct the store mapping parameter did not consider that
case, and simply gave the target as default store, which meant all
datastores were restored onto the target.

To fix that, we have to get the source datastore from the field, and
construct the correct parameter ("source=target").

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-17 11:28:23 +02:00
Dominik Csapak
84a91c5b93 ui: tape: fix code style/formatting
this is a separate statement, it should be on a separate line

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-17 11:28:08 +02:00
Dominik Csapak
0763ac140c ui: dashboard: show tape backups/restores on task summary
for that we have to increase the panel height a bit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-17 11:23:54 +02:00
Dominik Csapak
21ff6e593b ui: dashboard: fix missing prune jobs on task summary
we want to count types 'prune' and 'prunejobs' for this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-05-17 11:23:54 +02:00
Thomas Lamprecht
214e187d4f ui: fix reloading subscription info after key upload
ExtJS has a `listeners` but no `listener` config, so add the missing
`s` to ensure the upload window destroy event callback is triggered.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-17 08:17:45 +02:00
Stefan Hanreich
73b53e4af5 ui: sync job: add transfer-last parameter
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-04-24 15:19:07 +02:00
Dominik Csapak
73d471e90f ui: tape: prevent mislabeling tapes in changers
when labeling a tape in a changer, we pre-fill the label field with
the one from the barcode (if it exists). Letting the user change
the label here does not make much sense, since we assume that they are
the same (e.g. for move operations etc.)

So instead simply display the label to protect users from accidentally
changing it. If a user really needs to have a different label than the
suggested one, it's still possible on the cli.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-04-24 10:02:20 +02:00
Thomas Lamprecht
15b5e60568 ui: user edit: rework interaction of realm and view model
avoid accessing private members directly but rather try to use the
public API, this then allows us do drop declaring a reference on the
realm combobox, which was not directly used and thus a bit subtle.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-28 18:46:43 +02:00
Thomas Lamprecht
cc45a16322 ui: user edit: fix filtering out pam realm on user-add
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-28 18:21:02 +02:00
Dominik Csapak
5f97b9ce16 ui: dark mode: add dark mode colors to the datastore usage charts
For the `Datastore -> Summary` overview for all configured datastores.

Fix is adapted from the PVE's ceph's status details or performance
runningCharts, which are both similar (but not really the same)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: expand commit message to note that this is adapted from PVE ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-28 15:24:41 +02:00
Stefan Sterz
4fbbc6cd3e ui: remove white backgrounds from package versions and system report
removes the style that gets added directly to the element of the
package versions and system report views. this makes them harder to
style through css as normal selectors cannot override the element's
style. since they behave properly without these styles anyway, remove
them.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-09 08:04:18 +01:00
Stefan Sterz
a443dd5c52 proxy/ui: implement theme switcher
adds a theme switcher to the ui and handles the necessary cookies in
the backend.

this requires a bump of the widget toolkit so the necessary widgets
are present.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-09 08:04:18 +01:00
Thomas Lamprecht
ad531be561 ui: subscription: use downloadAsFile helper from widget-toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-02 15:13:17 +01:00
Thomas Lamprecht
fe5b6a05bb ui: subscription: code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-02 15:13:17 +01:00
Thomas Lamprecht
63599af160 fix #4534: add clear trigger for simpler clearing schedule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-02-17 12:27:04 +01:00
Lukas Wagner
2d492a9ca9 docs: add documentation for LDAP realms
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-02-10 12:46:19 +01:00
Lukas Wagner
73757fe2df server: add LDAP realm sync job
This commit adds sync jobs for LDAP user sync. As of now, they
can only be started manually.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-02-10 12:46:19 +01:00
Lukas Wagner
e0f660fd90 ui: add 'realm' field in user edit
This allows specifying a user's realm when adding a new user.
For now, adding users to the PAM realm is explicitely disabled

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-02-10 12:46:19 +01:00
Thomas Lamprecht
867ce3587b ui: verify jobs: set/improve min-width for datastore and namespace columns
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-04 11:19:29 +01:00
Thomas Lamprecht
b2a9d6a71c fix #4448: ui: verify jobs: add namespace and max-depth columns
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-04 11:14:06 +01:00
Thomas Lamprecht
25f7d2a91a fix #4448: ui: prune jobs: rename Store to Datastore for consitency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-04 11:03:40 +01:00
Dominik Csapak
b0e3095594 ui: metricserver: fix enable column
we use 'enable' property here with a default of true, so change
the dataIndex and the renderer to reflect that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-30 17:44:08 +01:00
Thomas Lamprecht
e1a311f91c ui: datastore options: fix default for prune notify render
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-29 10:28:10 +01:00
Dominik Csapak
8e8e603cdc ui: datastore tuning: show correct default option
the default in the backend is really 'inode' not 'none', so show that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-28 15:59:55 +01:00
Thomas Lamprecht
ef4956f5aa ui: datastore: override maintenance icon if currently destroying
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-28 15:56:39 +01:00
Thomas Lamprecht
834bae5575 ui: datastore: allow to destroy all underlying data on removal
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-28 15:56:39 +01:00
Thomas Lamprecht
4fbec4c02a ui: datastore: factor out safe datastore destroy
will extend it for data-destroy flag in a next commit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-28 15:56:39 +01:00
Thomas Lamprecht
e198127e4c ui: prune job edit: set correct onlineHelp reference
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-28 14:43:13 +01:00
Thomas Lamprecht
8f373d0718 ui: datastore options: use new onSetValues over setValues
The `onSetValues` (pedant to `onGetValues`) got added relatively
recently to widget toolkits input panel. Using it avoids the need to
hard-code some "dynamic override" calling semantics.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-28 14:00:18 +01:00
Thomas Lamprecht
85f1419313 ui: datastore options: code style line reduction
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-28 13:59:51 +01:00