Commit Graph
19 Commits
Author SHA1 Message Date
dualfroz 91a785703f fix #5608: ui: resource mappings: validate the name like the API does
The API only accepts resource mapping IDs in the 'pve-configid' format,
but the name field of the PCI, USB and directory mapping windows takes
any value. A name like 'gpu@node1' is thus only rejected after
submitting, with a generic "invalid configuration ID" error that does
not tell which characters are allowed.

Use the existing 'ConfigId' vtype, so the field is marked invalid right
away and its tooltip lists the allowed characters.

Signed-off-by: Michal Fox <me@dualfroz.com>
Link: https://lore.proxmox.com/20260929141313.2873638-1-me@dualfroz.com
2026-09-30 11:44:39 +02:00
upstream 8814724567 Upstream proxmox-git/pve-manager state of the touched files before 55c76c2746 2026-09-29 16:13:13 +02:00
dualfroz 11c2368e04 fix #8015: ui: download url: let the user choose the .img image format
Like for the upload, '.raw' was appended to the name of '.img' images
downloaded as import content, which breaks importing images in other
formats, such as the qcow2 based Ubuntu cloud images.

After querying the URL of such an image, show a format selector and
append the extension of the selected format to the file name instead.

Signed-off-by: Michal Fox <me@dualfroz.com>
Link: https://lore.proxmox.com/20260929135840.2748665-3-me@dualfroz.com
2026-09-30 11:39:38 +02:00
upstream 42ab0e5059 Upstream proxmox-git/pve-manager state of the touched files before ebf648ddce 2026-09-29 15:58:40 +02:00
dualfroz baaeedd60a fix #8015: ui: upload: let the user choose the .img image format
When uploading a '.img' file as import content, '.raw' is appended to
the file name, so the image is always treated as a raw image. But the
'.img' extension is also commonly used for other formats, for example
the Ubuntu cloud images are qcow2 images. Such an image is then
imported as raw disk, which results in a disk with the size of the
qcow2 file and a guest that does not boot.

The format cannot be derived from the '.img' extension, so show a
format selector for such files and only append the extension of the
selected format to the file name. The upload stays disabled until a
format is selected, so the choice is always an explicit one.

Signed-off-by: Michal Fox <me@dualfroz.com>
Link: https://lore.proxmox.com/20260929135840.2748665-2-me@dualfroz.com
2026-09-30 11:39:38 +02:00
dualfroz f353e94052 fix #6475: ui: upload: only show the file name of the selected file
For privacy reasons, browsers do not expose the real path of a selected
file and prefix its name with 'C:\fakepath\' instead, on every
platform. The file field of the upload window shows this value as is,
which confuses users on Linux or macOS clients.

Show the name of the selected file object instead. Only the displayed
value changes, the upload itself uses the file object and is not
affected.

Signed-off-by: Michal Fox <me@dualfroz.com>
Reviewed-by: Max R. Carrara <m.carrara@proxmox.com>
Tested-by: Max R. Carrara <m.carrara@proxmox.com>
Link: https://lore.proxmox.com/20260926084935.7-1-me@dualfroz.com
2026-09-30 11:27:01 +02:00
upstream 2f1b95ec37 Upstream proxmox-git/pve-manager state of the touched files before e42092eaee 2026-09-26 08:49:35 +00:00
dualfroz 4dfc7eb30c fix #6516: api: backup jobs: limit the job ID length on creation
All backup job API calls that take an existing job ID use the
'pve-backup-jobid' option, which is limited to 50 characters. The
create call uses its own 'id' parameter without that limit, so a longer
ID can be created, but the job can then neither be read, updated nor
deleted through the API or the web UI, and has to be removed from
jobs.cfg by hand.

Apply the same limit when creating the job.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 11:31:04 +02:00
upstream bc569c5258 Upstream proxmox-git/pve-manager state of the touched files before 52a2c5c37c 2026-09-25 11:31:04 +02:00
dualfroz 7143720659 fix #6516: ui: backup job: limit the job ID length
The API only allows backup job IDs of up to 50 characters, so mark
longer values as invalid in the edit window already, instead of failing
on submit.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 11:31:04 +02:00
upstream f1b3e41dcd Upstream proxmox-git/pve-manager state of the touched files before b402cc05ea 2026-09-25 11:31:04 +02:00
dualfroz d033dfa51b fix #7623: ui: backup: only list guests of the selected pool
The guest list in the backup job editor filters the resource store by
the selected pool. With a plain string value, ExtJS matches any pool
that starts with it, ignoring case, so selecting 'Clients' also listed
the guests of 'Clients/Client1', 'Clients/Client2' and 'clients'.

The job itself only backs up the guests of the selected pool, so the
editor suggested that guests are covered which are not.

Match the pool id exactly and case-sensitively.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 10:04:45 +02:00
upstream a982dab632 Upstream proxmox-git/pve-manager state of the touched files before 9545f20670 2026-09-25 10:04:45 +02:00
dualfroz 85bc6aeedb fix #6874: ui: node selectors: sort memory usage by percentage
The memory usage column of the node selector, used e.g. in the
migration dialog, and of the HA node priority selector shows a
percentage, but uses the raw 'mem' bytes as data index. Sorting by that
column thus sorts by used bytes, which does not match the displayed
values as soon as the nodes have a different amount of memory.

Add a calculated 'memuse' field, like the resource store already has,
and use it for the column. This also makes the percentage renderer
receive a ratio here, like everywhere else, which allows dropping its
bytes fallback in a follow-up.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 07:15:08 +02:00
upstream 92f8784d03 Upstream proxmox-git/pve-manager state of the touched files before cf848bda29 2026-09-25 07:15:08 +02:00
dualfroz c09a3d7d49 fix #7860: api: backup info: skip jobs with invalid guest selection
A backup job in pool mode keeps referencing its pool after the pool got
deleted. Resolving the guests of such a job dies with "pool '<name>'
does not exist", and since get_included_vmids() did not catch this, the
whole /cluster/backup-info/not-backed-up call failed. The GUI then hides
the "Show guests without backup job" button, so users lose exactly the
overview that would tell them some guests are no longer backed up.

Catch the error per job, warn about it and continue with the remaining
jobs. The broken job does not back up anything, so its guests correctly
show up as not covered by any backup job.

Add a test for get_included_vmids() covering this case.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 07:15:08 +02:00
upstream ac62170ae2 Upstream proxmox-git/pve-manager state of the touched files before 453c245e58 2026-09-25 07:15:08 +02:00
dualfroz 0e587291d6 fix #7224: ui: utils: show memory usage above 100% correctly
render_mem_usage_percent() treated any value above 1 as a byte count
and recalculated the percentage from 'mem' and 'maxmem'. But the memory
usage ratio of a guest can legitimately exceed 1, for example when the
reported usage is the host-side memory of the QEMU process, which
includes its own overhead. In the reported case, 'mem' was 2222472192
with a 'maxmem' of 2147483648, so the ratio of about 1.035 got taken as
bytes and the search and resource grids showed 0.0 % instead of 103.5 %.

All users of the renderer now pass the usage as a ratio, so drop the
bytes fallback and always render the value as percentage.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 07:15:08 +02:00
upstream 8cb3c7079c Upstream proxmox-git/pve-manager state of the touched files before 87f04ef76a 2026-09-25 07:15:08 +02:00