Dominik Csapak [Fri, 16 Jun 2023 13:05:39 +0000 (15:05 +0200)]
ui: allow configuring pci and usb mapping
uses the new ResourceMapTree to add the CRUD interfaces for the
mappings.
We add both of them into a single panel, since the datacenter menu
already has many entries, and without a proper summary for the group, we
cannot really put them in a category
Dominik Csapak [Fri, 16 Jun 2023 13:05:36 +0000 (15:05 +0200)]
ui: add edit window for pci mappings
This contains the window to edit a PCI mapping for a single host.
It is designed to work in 3 modes:
* without an id and a nodename: for new mappings
* with an id but without nodename: for adding new host mappings to an
existing one
* with id and nodename: when editing an existing host mapping
Dominik Csapak [Fri, 16 Jun 2023 13:05:35 +0000 (15:05 +0200)]
ui: form: add MultiPCISelector
this is a grid field for selecting multiple pci devices at once, like we
need for the mapped pci ui. There we want to be able to select multiple
devices such that one gets selected automatically
we can select a whole slot here, but that disables selecting the
individual functions of that device.
Dominik Csapak [Fri, 16 Jun 2023 13:05:33 +0000 (15:05 +0200)]
ui: qemu/PCIEdit: rework panel to add a mapped configuration
reworks the panel to use a controller, so that we can easily
add the selector for mapped pci devices
shows now a selection between 'raw' and 'mapped' devices, where
'raw' ones work like before, and 'mapped' ones take the values
form the hardware map config
Dominik Csapak [Fri, 16 Jun 2023 13:05:28 +0000 (15:05 +0200)]
api: add resource map api endpoints for PCI and USB
this adds the typical section config crud API calls for
USB and PCI resource mapping to /cluster/mapping/{TYPE}
the only special thing that this series does is the list call
for both has a special 'check-node' parameter that uses the
'proxyto_callback' to reroute the api call to the given node
so that it can check the validity of the mapping for that node
in the future when we e.g. broadcast the lspci output via pmxcfs
we drop the proxyto_callback and directly use the info from
pmxcfs (or we drop the parameter and always check all nodes)
Dominik Csapak [Wed, 14 Jun 2023 08:46:07 +0000 (10:46 +0200)]
pvesh: fix parameters for proxyto_callback
in pve-http-server the proxyto_callback always has a complete list of
parameters, not only the ones in the url, so adapt the implementation
here to do the same
Thomas Lamprecht [Wed, 14 Jun 2023 15:37:45 +0000 (17:37 +0200)]
ui: realm sync job: clarify the function of the two enable checkboxes
Most of the time this isn't an issue for job edits, but here we have
two "enable" checkboxes that control enabling newly synced users and
enabling the job itself, try to be absolutely clear on both to avoid
potential confusion.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 14 Jun 2023 15:33:38 +0000 (17:33 +0200)]
ui: realm: clarify that the sync jobs really are for the realm
it's somewhat redundant as onbe is already at the realm view, but for
panel titles it slightly helps if one doesn't have to string together
such "clues" oneself, i.e., it's easier to see where one is - e.g.,
if switching from some other task back to the web UI again, and we
have enough space here, so we ain't winning anything if keeping it
short.
Also add an emptyText to the grid, mostly as view's without anything
always look a bit off (like an error happened on load and one forgot
to mask)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
One must not call gettext on the already formatted string, as we
cannot translate it for any possible value, rather the format string
it self needs to be gettext'd, then the translator can position the
variable template placeholders however it's correct for their
language without having to care about any value this could be called
with.
Fixes: d057929f ("ui: user view: fix calling order of gettext") Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Christoph Heiss [Thu, 23 Mar 2023 11:02:47 +0000 (12:02 +0100)]
ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup
Adds a default-on checkbox to the QEMU Guest Agent feature selector
controlling the 'fs-freeze-on-backup' option. If unchecked, an
additional warning is displayed that backups can potentially corrupt
with this setting off.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
api: backup: check param permission before pool for consistency
Like it did here before 9f65a584 ("api: backup: update: check
permissions of delete params too") and like it does in the create
case.
This should not have a practical effect, it's mostly for consistency
and to avoid anybody reading anything into the different orders of
checks between update and create.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fiona Ebner [Wed, 16 Nov 2022 14:04:34 +0000 (15:04 +0100)]
api: backup: require Datastore.Allocate on storage
In particular this ensures that the user is allowed to remove data on
the storage, because configuring low retention results in removed
older backups. Of course setting the storage itself also needs to
require the same privilege then.
This is a breaking API change, but it seems sensible to require
permissions on the affected storage too.
Jobs with a dumpdir setting can be configured by root only.
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Dominik Csapak [Wed, 7 Jun 2023 07:18:48 +0000 (09:18 +0200)]
ui: firewall: refactor privilege checks and prevent double click
factor out the relevant privilege checks in a variable and reuse that,
also add the check in the run_editor (or wrap it with a check) so that
the edit windows don't open with a double click without those privileges
Christoph Heiss [Wed, 3 May 2023 09:50:40 +0000 (11:50 +0200)]
ui: clean up remnants of in-tree font-awesome files
Commit e97c2601 ("change to debian font-awesome") removed the usage of
the in-tree font-awesome files, replacing them with the Debian package.
Thus clear out these leftovers out, as they are completely usused.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
ui: ceph install: add pmx-hint class to hint field-label
looks a bit odd as the background it produces goes over the text, but
is the least invasive method to apply something like this, and
highlighting the whole thing is too flashy here.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
ui: ceph install: add hints depending on selected repo and subscriptions
None hint required if all nodes have subscriptions and enterprise
repo is selected, but otherwise give some hints for better UX and to
(hopefully) reduce the chance for mishaps.
We might want to highlight the label to improve visibility tough.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
With Proxmox VE 8, we'll have support for a enterprise ceph repo,
accessed through Proxmox VE subscriptions, to provide more broadly
tested ceph updates for production setups.
Replace the test-repository parameter with an actual enum of
selectable repo types for:
- test (same as previously selected through setting test-repository)
- no-subscription (the previous default, then named "main")
- enterprise (new and the default now, recommended for production)
Note that writing the auth-part is a bit hacky and might/should be
improved.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>