]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
9 months agoui: add some missing `htmlEncode`s
Friedrich Weber [Tue, 25 Jul 2023 11:52:46 +0000 (13:52 +0200)]
ui: add some missing `htmlEncode`s

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
9 months agoui: active directory realm: expose case-sensitive option
Thomas Lamprecht [Tue, 25 Jul 2023 08:12:00 +0000 (10:12 +0200)]
ui: active directory realm: expose case-sensitive option

The case-sensitive option is not really something that should be CLI
only and is quite common for Microsoft AD setups, so add it to the UI
too as requested in the Forum [0], improving discoverability.

[0]: https://forum.proxmox.com/threads/74547/#post-575854

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 months agotest: fix names of .PHONY targets
Lukas Wagner [Thu, 20 Jul 2023 14:32:09 +0000 (16:32 +0200)]
test: fix names of .PHONY targets

They need to have the same name as the target.
Took the opportunity to move the .PHONY right next to the target recipe,
so that mistakes like these are hopefully easier caught.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
10 months agoui: sdn: zonedit: fix display && refactor
Alexandre Derumier [Sat, 17 Jun 2023 12:43:05 +0000 (14:43 +0200)]
ui: sdn: zonedit: fix display && refactor

move ipam selector to main items as it's non optional, and it's breaking
display if present in advanced.

move common id,mtu,nodes fields from modules to base

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 months agopve7to8: fix Ceph noout check
Fiona Ebner [Mon, 17 Jul 2023 08:38:19 +0000 (10:38 +0200)]
pve7to8: fix Ceph noout check

Commit 114e5f2c ("pve7to8: sync over from stable-7 branch")
accidentally got rid of the correct value 0 here and also the new TODO
message to improve the situation. But the TODO is actually easy,
because there already is the $upgraded variable. Just rely on that
instead of hard-coding and forgetting about it again.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
10 months agofix #4758: ui: lxc wizard: allow multiple ssh keys
Dominik Csapak [Mon, 17 Jul 2023 12:34:24 +0000 (14:34 +0200)]
fix #4758: ui: lxc wizard: allow multiple ssh keys

by converting the textfield into a textarea and validate the value
line wise (if there is more than one line)

also create a 'MultiFileButton' (mostly copied from extjs) that allows
to select multiple files at once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
10 months agofix #4364: pveceph: add confirmation dialogue for ceph installation
Max Carrara [Wed, 5 Jul 2023 18:02:40 +0000 (20:02 +0200)]
fix #4364: pveceph: add confirmation dialogue for ceph installation

Displays a confirmation dialogue if the user didn't explicitly
provide a valid ceph version via the `--version` flag and if
stdout is connected to a tty.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
10 months agofix #4551: ui: use gettext on hardcoded byte units
Noel Ullreich [Mon, 3 Jul 2023 12:15:59 +0000 (14:15 +0200)]
fix #4551: ui: use gettext on hardcoded byte units

Since some languages translate byte units like 'GiB' or write them in their
own script, this patch wraps units in the `gettext` function.

While most occurrences of byte strings can be translated within the
`format_size` function in `proxmox-widget-toolkit/src/Utils.js`, this patch
catches those instances that are not translated.

Signed-off-by: Noel Ullreich <n.ullreich@proxmox.com>
10 months agopve7to8: sync over from stable-7 branch
Thomas Lamprecht [Mon, 3 Jul 2023 11:19:13 +0000 (13:19 +0200)]
pve7to8: sync over from stable-7 branch

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobuildsys: ordering/style cleanups
Thomas Lamprecht [Mon, 3 Jul 2023 11:17:18 +0000 (13:17 +0200)]
buildsys: ordering/style cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agoupdate shipped appliance info index
Thomas Lamprecht [Fri, 30 Jun 2023 15:02:34 +0000 (17:02 +0200)]
update shipped appliance info index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agotry using 'pve-eslint' if it exists
Dominik Csapak [Fri, 23 Jun 2023 07:08:44 +0000 (09:08 +0200)]
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>
10 months agoui: migrate: fix disabled migrate button glitch
Dominik Csapak [Thu, 22 Jun 2023 12:15:12 +0000 (14:15 +0200)]
ui: migrate: fix disabled migrate button glitch

under certain circumstances, the migrate button stays disabled, even
when a valid target node was selected:
* the first node that gets autoselected (most likely the second)
  is not a valid migration target
* the user changes to a migration target that is a valid one

if that happens, the migration button would stay disabled.
switching once to a non valid target and would enable the button.

To fix it, we have to do two things here:

'checkQemuPreconditions' is actually an async function that awaits an
api call and uses the result to set the 'migration.allowedNodes'
property

'checkMigratePreconditions' calls 'checkQemuPreconditions' and uses the
'migration.allowedNodes' property afterwards.

but since 'checkMigratePreconditions' is not async, that happens before
the api call can return the valid data and thus leaves it empty, making
all nodes valid in the selector. (thus the initial selected node is
valid)

instead make 'checkMigratePreconditions' also async and await the result
of 'checkQemuPreconditions'

this unearthed another issue, namely we access an object that is
possibly undefined (worked out before due to race conditions) so
fallback to an empty object.

and lastly, since we want the 'disallowedNodes' set before actually
checking the qemu preconditions, we move the setting of that on
the node selector above the qemu preconditions check
(this is the only place where we set it anyway, and the source does not
change, we probably could move that out of that function altogether)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agobump version to 8.0.3
Thomas Lamprecht [Wed, 21 Jun 2023 17:55:58 +0000 (19:55 +0200)]
bump version to 8.0.3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agopve7to8: sync over from stable-7 branch
Thomas Lamprecht [Wed, 21 Jun 2023 17:52:59 +0000 (19:52 +0200)]
pve7to8: sync over from stable-7 branch

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agopve7to8: add check for systemd-boot presence where needed
Stoiko Ivanov [Wed, 21 Jun 2023 17:35:57 +0000 (19:35 +0200)]
pve7to8: add check for systemd-boot presence where needed

since the package won't get installed for systems upgraded from 7 to 8
we warn users who need systemd-boot - to be able to initialize new
ESPs - that they need to install it

The check for package installation is based on existance of the
changelog, since the package information used in pve7to8 comes from
the API-modules, which limit it to the pve-relevant packages.

tested in VMs with uefi and legacy mode, with existing
proxmox-boot-uuids both with and w/o systemd-boot being installed

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
11 months agopve7to8: avoid confusing warning about required setting 'storage' for vzdump
Fiona Ebner [Wed, 21 Jun 2023 15:02:01 +0000 (17:02 +0200)]
pve7to8: avoid confusing warning about required setting 'storage' for vzdump

It's required in the schema for notes-template and protected, but when
parsing vzdump.conf, it shouldn't matter whether the storage parameter
is set or not.

The warning is ugly and users might interpret it as something that
needs to be acted upon for the upgrade:
parse error in '/etc/vzdump.conf' - 'storage': missing property - 'notes-template' requires this property\nmissing property - 'protected' requires this property

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
(cherry picked from commit 517abd0cd28a613598e2a3a8d5d8d057578c14b6)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agopve7to8: remove outdated warning about retention
Fiona Ebner [Wed, 21 Jun 2023 15:02:00 +0000 (17:02 +0200)]
pve7to8: remove outdated warning about retention

It just talks about the default behavior since PVE 7. It's rather
confusing to mention this, because the behavior doesn't change anymore
in PVE 8.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
(cherry picked from commit b58348b1b60c6546b14323ec9303c91d5b1a29b7)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agopve7to8: content-dirs check: skip paths that cannot be resolved
Friedrich Weber [Thu, 15 Jun 2023 13:22:31 +0000 (15:22 +0200)]
pve7to8: content-dirs check: skip paths that cannot be resolved

The current inequality check for content-dirs does not correctly
handle the case in which `abs_path` returns undef. This can result in
confusing warnings:

  storage [...] uses directory  for multiple content types [...]

Fix this by skipping paths for which `abs_path` returns undef. This
matches the behavior of the actual content-dirs check in PVE 8 [0].

[0]: https://git.proxmox.com/?p=pve-storage.git;a=commit;h=09f1f847a

Fixes: ea0a4f1943ffafe94282afc800d5720db45df198
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
(cherry picked from commit 20fb9aa3f15f9d3ef89bfc3784d72a791c55b757)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agopve7to8: add reminder comment for noout_wanted variable
Fiona Ebner [Wed, 21 Jun 2023 16:19:48 +0000 (18:19 +0200)]
pve7to8: add reminder comment for noout_wanted variable

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
11 months agoui: use common gettext for IOMMU-Group
Thomas Lamprecht [Wed, 21 Jun 2023 16:02:53 +0000 (18:02 +0200)]
ui: use common gettext for IOMMU-Group

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobump version to 8.0.2
Thomas Lamprecht [Wed, 21 Jun 2023 15:06:54 +0000 (17:06 +0200)]
bump version to 8.0.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/postinst: remove beta sources for real
Thomas Lamprecht [Wed, 21 Jun 2023 15:06:31 +0000 (17:06 +0200)]
d/postinst: remove beta sources for real

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobump version to 8.0.1
Thomas Lamprecht [Wed, 21 Jun 2023 14:00:11 +0000 (16:00 +0200)]
bump version to 8.0.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoapi: resource usb mapping: add missing proxyto_callback
Dominik Csapak [Wed, 21 Jun 2023 10:05:09 +0000 (12:05 +0200)]
api: resource usb mapping: add missing proxyto_callback

i have added it to the pci api call, but forgot to add it for usb
otherwise adding a mapped usb device only works on the node where the
gui is connected to

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: cloudinit: align default value for package upgrades with backend again
Fiona Ebner [Wed, 21 Jun 2023 10:04:33 +0000 (12:04 +0200)]
ui: cloudinit: align default value for package upgrades with backend again

The default in Proxmox VE 7 was true and it was decided to keep that
and avoid a breaking change.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
11 months agod/postins: fix condition for removal of pvetest added during beta
Thomas Lamprecht [Wed, 21 Jun 2023 09:08:13 +0000 (11:08 +0200)]
d/postins: fix condition for removal of pvetest added during beta

Reported-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobump version to 8.0.0
Thomas Lamprecht [Wed, 21 Jun 2023 07:35:36 +0000 (09:35 +0200)]
bump version to 8.0.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: pci/usb mapping: rework mapping panel for better user experience
Dominik Csapak [Wed, 21 Jun 2023 07:41:42 +0000 (09:41 +0200)]
ui: pci/usb mapping: rework mapping panel for better user experience

by removing the confusing buttons in the toolbar and adding them as
actions in an actioncolumn. There a only relevant actions are visible
and get a more expressive tooltip

with this, we now differentiate between 4 modes of the edit window:
* create a new mapping altogether
  - shows all fields
* edit existing mapping on top level
  - show only 'global' fields (comment, mdev), so no mappings
* add new host mapping
  - shows nodeselector, mapping (and mdev, but disabled)
    (informational only)
* edit existing host mapping
  - show selected node (displayfield) mdev and mappings, but only
    mappings are editable

we have to split the nodeselector into two fields, since the disabling
cbind does not pass through to the editconfig (and thus makes the form
invalid if we try that)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: pci map edit: fix typos in warnings and use gettexts
Dominik Csapak [Wed, 21 Jun 2023 07:41:41 +0000 (09:41 +0200)]
ui: pci map edit: fix typos in warnings and use gettexts

so they can be translated

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: pci/usb map edit: improve new host mappings dialog
Dominik Csapak [Wed, 21 Jun 2023 07:41:40 +0000 (09:41 +0200)]
ui: pci/usb map edit: improve new host mappings dialog

by disallowing nodes to be selected where a mapping already exists

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: pci map edit: reintroduce warnings checks
Dominik Csapak [Wed, 21 Jun 2023 07:41:39 +0000 (09:41 +0200)]
ui: pci map edit: reintroduce warnings checks

they got lost in my last rebase/refactor.

the onLoadCallBack is used to check by the window if there are iommu
groups at all, and the checkIsolated function checks if the selected
ones are in a separate group (in regards to the other devices)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: resource map tree: make 'ok' status clearer
Dominik Csapak [Wed, 21 Jun 2023 07:41:38 +0000 (09:41 +0200)]
ui: resource map tree: make 'ok' status clearer

by changing into 'mapping matches host data' which indicates that the
configured values matches the host information

also for the pci and usb map selectors

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoapi ceph: fix directory endpoint index
Thomas Lamprecht [Wed, 21 Jun 2023 07:30:09 +0000 (09:30 +0200)]
api ceph: fix directory endpoint index

actually drop the deprecated ones from the API routes index and
ensure the replacement /pool is returned (/cfg already was)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoupdate shipped aplliance info index
Thomas Lamprecht [Wed, 21 Jun 2023 07:26:38 +0000 (09:26 +0200)]
update shipped aplliance info index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoapi: ceph: remove deprecrated config and configdb endpoints
Aaron Lauterer [Thu, 15 Jun 2023 07:39:58 +0000 (09:39 +0200)]
api: ceph: remove deprecrated config and configdb endpoints

Both are superseeded by ceph/cfg/raw and ceph/cfg/db

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
11 months agoapi: ceph: remove deprecrated Pools path
Aaron Lauterer [Thu, 15 Jun 2023 07:39:57 +0000 (09:39 +0200)]
api: ceph: remove deprecrated Pools path

The replacement is Pool (singular).

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
11 months agoRevert "ui: add beta text with link to bugtracker"
Thomas Lamprecht [Wed, 21 Jun 2023 07:01:04 +0000 (09:01 +0200)]
Revert "ui: add beta text with link to bugtracker"

This reverts commit 44f9ab364d977aed0cc28322dd53678338cd893f.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/postinst: actively remove pvetest repository (added for beta) again
Dominik Csapak [Mon, 19 Jun 2023 09:13:34 +0000 (11:13 +0200)]
d/postinst: actively remove pvetest repository (added for beta) again

in theory we'd need to be more cautios but this was added only during
beta, which is when we do not really provided any stability
guarantee, further, it's rather unlikely that one added very
important repos that, when removed, break something (again *during*
beta).

The new APT repo management makes it also easy to see when one does
not gets any PVE updates, and one can add the pvetest repo there
again easily too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: resource mappings: remove border and add resize handle
Dominik Csapak [Mon, 19 Jun 2023 09:13:34 +0000 (11:13 +0200)]
ui: resource mappings: remove border and add resize handle

aka a 'splitter'. that way the user can determine how much of each panel
he wants to see himself

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: pci map edit: make top fields more clear
Dominik Csapak [Mon, 19 Jun 2023 09:13:33 +0000 (11:13 +0200)]
ui: pci map edit: make top fields more clear

by
* moving the node to the left column and changing the label
* moving the mdev filter to the right column
* show only the create button for new node mappings (otherwise we'd have
  a reset button here that cannot do anything useful)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: multi pci selector: indent functions multifunction devices
Dominik Csapak [Mon, 19 Jun 2023 09:13:32 +0000 (11:13 +0200)]
ui: multi pci selector: indent functions multifunction devices

when there is more than one function for a device, indent the individual
functions. This sets them visually apart from the 'pass all through as
one' entry

We have to use a html entity here, as extjs trims the normal whitespace.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: multi pci selector: reset the selection properly on nodename change
Dominik Csapak [Mon, 19 Jun 2023 09:13:31 +0000 (11:13 +0200)]
ui: multi pci selector: reset the selection properly on nodename change

and mdev change.

giving an empty array did not have the desired effect of resetting the
selection, but giving no parameter at all does.

this now also clears the selection when the mdev filter/config changed
(was just forgotten)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: fix pci map selector status column
Dominik Csapak [Mon, 19 Jun 2023 09:13:30 +0000 (11:13 +0200)]
ui: fix pci map selector status column

the 'errors' property changed to 'checks' so we have to adapt here too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agobump version to 8.0.0~9
Thomas Lamprecht [Mon, 19 Jun 2023 06:51:02 +0000 (08:51 +0200)]
bump version to 8.0.0~9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/control: bump versioned pve-doc-generator buil-dependency
Thomas Lamprecht [Mon, 19 Jun 2023 06:43:32 +0000 (08:43 +0200)]
d/control: bump versioned pve-doc-generator buil-dependency

for new resource mapping online help references

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/control: bump versioned pve-docs & ifupdown2 dependency
Thomas Lamprecht [Mon, 19 Jun 2023 05:42:19 +0000 (07:42 +0200)]
d/control: bump versioned pve-docs & ifupdown2 dependency

To ensure we got versions installed that can be even compatible with
current code and testing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/control: bump versioned qemu-server dependency
Thomas Lamprecht [Mon, 19 Jun 2023 05:41:34 +0000 (07:41 +0200)]
d/control: bump versioned qemu-server dependency

for the new x86-64-vN cpu models

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/control: bump versioned libpve-guest-common dependency
Thomas Lamprecht [Mon, 19 Jun 2023 05:40:46 +0000 (07:40 +0200)]
d/control: bump versioned libpve-guest-common dependency

for the mapping infrastructure

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoapi: mappings: cleanup perl imports
Thomas Lamprecht [Mon, 19 Jun 2023 05:33:48 +0000 (07:33 +0200)]
api: mappings: cleanup perl imports

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoapi: cluster jobs: fix perl module not ending with a true value
Thomas Lamprecht [Mon, 19 Jun 2023 05:16:29 +0000 (07:16 +0200)]
api: cluster jobs: fix perl module not ending with a true value

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoapi: PCI mappings: code/style cleanups
Thomas Lamprecht [Mon, 19 Jun 2023 05:15:14 +0000 (07:15 +0200)]
api: PCI mappings: code/style cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoapi: PCI mappings: rename errors to checks in response
Thomas Lamprecht [Mon, 19 Jun 2023 05:13:19 +0000 (07:13 +0200)]
api: PCI mappings: rename errors to checks in response

as it contains warnings too, so having it named errors might be
confusing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoapi: PCI mappings: complete return schema
Thomas Lamprecht [Mon, 19 Jun 2023 04:58:33 +0000 (06:58 +0200)]
api: PCI mappings: complete return schema

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: improve permission handling for hardware
Dominik Csapak [Fri, 16 Jun 2023 13:05:41 +0000 (15:05 +0200)]
ui: improve permission handling for hardware

qemu/HardwareView:

with the new Hardware privileges, we want to adapt a few places where
we now allow to show the add/edit window with those permissions.

form/{PCI,USB}Selector:

increase the minHeight property of the PCI/USBSelector, so that
the user can see the error message if he has not enough permissions.

data/PermPathStore:

add '/hardware' to the list of acl paths

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: guest migrate: allow mapped devices for offline migrations
Dominik Csapak [Fri, 16 Jun 2023 13:05:40 +0000 (15:05 +0200)]
ui: guest migrate: allow mapped devices for offline migrations

if the migration is an offline migration and when the mapping on the
target node exists, otherwise not

this does not change the behaviour for 'raw' devices in the config
those can still be forced to be migrated, like before

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: allow configuring pci and usb mapping
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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: add ResourceMapTree
Dominik Csapak [Fri, 16 Jun 2023 13:05:38 +0000 (15:05 +0200)]
ui: add ResourceMapTree

this will be the base class for trees for the individual mapping types,
e.g. pci and usb mapping.

there are a few things to configure, but the overall code sharing is
still significant, and should work out fine for future mapping types

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: add edit window for usb mappings
Dominik Csapak [Fri, 16 Jun 2023 13:05:37 +0000 (15:05 +0200)]
ui: add edit window for usb mappings

very similar to the PCIMapEdit window, but we only ever allow one
mapping per host

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: add edit window for pci mappings
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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: form: add MultiPCISelector
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.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: qemu/USBEdit: add 'mapped' device case
Dominik Csapak [Fri, 16 Jun 2023 13:05:34 +0000 (15:05 +0200)]
ui: qemu/USBEdit: add 'mapped' device case

to be able to select 'mapped' usb devices

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: qemu/PCIEdit: rework panel to add a mapped configuration
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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: form: add USBMapSelector
Dominik Csapak [Fri, 16 Jun 2023 13:05:32 +0000 (15:05 +0200)]
ui: form: add USBMapSelector

similar to PCIMapSelector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: form: add PCIMapSelector
Dominik Csapak [Fri, 16 Jun 2023 13:05:31 +0000 (15:05 +0200)]
ui: form: add PCIMapSelector

akin to the PCISelector, but uses the api for mapped devices

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: form/USBSelector: make it more flexible with nodename
Dominik Csapak [Fri, 16 Jun 2023 13:05:30 +0000 (15:05 +0200)]
ui: form/USBSelector: make it more flexible with nodename

similar to the pciselector, make it accept a plain nodename,
or no node at all and provide a setNodename function

to keep backwards compatibility, also check pveSelNode for the nodename

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: parser: add helper for lists of property strings
Dominik Csapak [Fri, 16 Jun 2023 13:05:29 +0000 (15:05 +0200)]
ui: parser: add helper for lists of property strings

namely the filtering while preserving the original string,
it's just one line, but having a shorthand for it still makes it a bit
nicer

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoapi: add resource map api endpoints for PCI and USB
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)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agopvesh: fix parameters for proxyto_callback
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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agofirewall: add scope field to IPRefSelector
Leo Nunner [Tue, 13 Jun 2023 12:06:34 +0000 (14:06 +0200)]
firewall: add scope field to IPRefSelector

and send the scoped value to the firewall when choosing new values.
This happens for both IPSets and aliases.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
11 months agoui: realm sync job: code cleanup run-now handlers
Thomas Lamprecht [Wed, 14 Jun 2023 15:41:49 +0000 (17:41 +0200)]
ui: realm sync job: code cleanup run-now handlers

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: realm sync job: clarify the function of the two enable checkboxes
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>
11 months agoui: realm: clarify that the sync jobs really are for the realm
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>
11 months agoui: realm sync: add 'run now' button
Dominik Csapak [Tue, 13 Jun 2023 08:44:01 +0000 (10:44 +0200)]
ui: realm sync: add 'run now' button

by simply passing the sync job config to the 'sync' api endpoint, like
we do for vzdump jobs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: realm: move sync job panel into realm panel
Dominik Csapak [Tue, 13 Jun 2023 08:44:00 +0000 (10:44 +0200)]
ui: realm: move sync job panel into realm panel

and make it collapsible, so that users can hide it if they're not
interested in it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: realm sync: change enabled column rendering
Dominik Csapak [Tue, 13 Jun 2023 08:43:59 +0000 (10:43 +0200)]
ui: realm sync: change enabled column rendering

to make it consistent with the repositories ui, since having a checkbox
that is not clickable is confusing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: realm sync edit: improve ux when there is no ldap/ad realm
Dominik Csapak [Tue, 13 Jun 2023 08:43:58 +0000 (10:43 +0200)]
ui: realm sync edit: improve ux when there is no ldap/ad realm

by adding an empty text to the dropdown, and disabling the other
possibly invalid fields, so that it's clear why the panel is invalid

as soon as there is an ldap/ad realm, it gets autoselected anyway and
the fields get re-enabled.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
11 months agoui: user list: fine-tune width-flex of group and comment column
Thomas Lamprecht [Wed, 14 Jun 2023 14:17:39 +0000 (16:17 +0200)]
ui: user list: fine-tune width-flex of group and comment column

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agofix #4739: ui: user list: add column for group memberships
Dominik Csapak [Wed, 14 Jun 2023 12:31:31 +0000 (14:31 +0200)]
fix #4739: ui: user list: add column for group memberships

To get a fast overview in which groups each user is add a column that
shows all groups they are a member of.

To get that info we need to pass the 'full=1' parameter to the API
endpoint, which then adds tokens and groups for each user to the result.

This is basically only increasing transmission size a bit, as the
backend doesn't needs to do any extra parsing for this information.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: Reword commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: sdn: consistent usage of VNet & VLAN without gettext
Thomas Lamprecht [Wed, 14 Jun 2023 12:10:17 +0000 (14:10 +0200)]
ui: sdn: consistent usage of VNet & VLAN without gettext

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoqemu: processor : set x86-64-v2-AES as default cputype for create wizard
Alexandre Derumier [Thu, 8 Jun 2023 09:51:06 +0000 (11:51 +0200)]
qemu: processor : set x86-64-v2-AES as default cputype for create wizard

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 months agoui: add permissions management for "localnetwork" zone
Alexandre Derumier [Wed, 7 Jun 2023 12:03:57 +0000 (14:03 +0200)]
ui: add permissions management for "localnetwork" zone

add a default virtual zone called 'localnetwork' in the ressource tree,
and handle permissions like a true sdn zone

(no conflict with true sdn zone is possible, as they have 8 characters max)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 months agoui: add vnet permissions panel
Alexandre Derumier [Wed, 7 Jun 2023 12:03:56 +0000 (14:03 +0200)]
ui: add vnet permissions panel

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 months agocluster resources: correctly filter 'localnetwork'
Fabian Grünbichler [Mon, 12 Jun 2023 11:03:07 +0000 (13:03 +0200)]
cluster resources: correctly filter 'localnetwork'

it should only be displayed if sdn entries are requested, or all resource
types.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
11 months agoapi2: cluster: ressources: add "localnetwork" zone
Alexandre Derumier [Wed, 7 Jun 2023 12:03:53 +0000 (14:03 +0200)]
api2: cluster: ressources: add "localnetwork" zone

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
11 months agobump version to 8.0.0~8
Thomas Lamprecht [Fri, 9 Jun 2023 09:11:49 +0000 (11:11 +0200)]
bump version to 8.0.0~8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: qemu: show progress bar for resize task
Fiona Ebner [Fri, 9 Jun 2023 08:25:50 +0000 (10:25 +0200)]
ui: qemu: show progress bar for resize task

The API call was changed to spawn a task now.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
11 months agoapi: mark batch-execute api calls root-only
Thomas Lamprecht [Fri, 9 Jun 2023 08:47:43 +0000 (10:47 +0200)]
api: mark batch-execute api calls root-only

This is weird and buggy and breaches the unpriv./priv. separation of
our api daemons, so root-only for now and possibly removal soon.

note that this had several limitations already anyway, like running
in sync context and thus failing after 30s.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: fixup lost closing parenthesis
Thomas Lamprecht [Fri, 9 Jun 2023 07:55:43 +0000 (09:55 +0200)]
ui: fixup lost closing parenthesis

...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: user view: fix calling order of gettext
Thomas Lamprecht [Fri, 9 Jun 2023 07:52:42 +0000 (09:52 +0200)]
ui: user view: fix calling order of gettext

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>
11 months agod/postinst: remove re-generation of unique machine-ID for old ISOs
Thomas Lamprecht [Fri, 9 Jun 2023 06:26:12 +0000 (08:26 +0200)]
d/postinst: remove re-generation of unique machine-ID for old ISOs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/postinst: setup pvetest repo for beta
Thomas Lamprecht [Fri, 9 Jun 2023 06:23:00 +0000 (08:23 +0200)]
d/postinst: setup pvetest repo for beta

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoupdate shipped aplliance info index
Thomas Lamprecht [Thu, 8 Jun 2023 16:41:51 +0000 (18:41 +0200)]
update shipped aplliance info index

and pull it from the Proxmox VE 8 index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agopve7to8: sync over from stable-7 branch
Thomas Lamprecht [Thu, 8 Jun 2023 11:07:05 +0000 (13:07 +0200)]
pve7to8: sync over from stable-7 branch

for after-upgrade checks

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoui: ceph: pool: add pool number as column
Aaron Lauterer [Wed, 22 Mar 2023 09:23:24 +0000 (10:23 +0100)]
ui: ceph: pool: add pool number as column

The pool number is shown in a few places, having it easily accessible
can help to understand which pool a warning/error refers to.

For example, the PG ID consists of '{pool nr}.{pg nr}' and is shown in
every warning concerning that PG.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
11 months agoui: override description for resize task
Fiona Ebner [Tue, 30 May 2023 13:52:05 +0000 (15:52 +0200)]
ui: override description for resize task

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
11 months agoapi: replication job status: allow querying disabled jobs too
Fiona Ebner [Tue, 30 May 2023 11:32:52 +0000 (13:32 +0200)]
api: replication job status: allow querying disabled jobs too

Rather than failing with an error claiming that the job doesn't exist.
The disabled status will be visible in the result of the call.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
11 months agoui: qga: Add option to turn off QGA fs-freeze/-thaw on backup
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>
11 months agofix #3428: cloud-init: add toggle for automatic upgrades
Leo Nunner [Thu, 4 May 2023 10:55:02 +0000 (12:55 +0200)]
fix #3428: cloud-init: add toggle for automatic upgrades

to control the newly introduced "ciupgrade" config parameter.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
11 months agoui: cloudinit: match backend privilege checks
Fabian Grünbichler [Wed, 3 May 2023 07:52:01 +0000 (09:52 +0200)]
ui: cloudinit: match backend privilege checks

the cloudinit options except for ipconfig are all modifiable with just
"VM.Config.Cloudinit".

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>