Commit Graph

489 Commits

Author SHA1 Message Date
Thomas Lamprecht
b49a0404be ui: vm hardware: module wide refactoring/cleanups/style changes/fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 16:46:30 +02:00
Thomas Lamprecht
0bb1e60d1a ui: vm hardware: fix add-menu itemId casing
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 16:41:44 +02:00
Thomas Lamprecht
aa8e5e7909 ui: vm: factor out add-HW menu handler to higher order fn
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 16:06:14 +02:00
Thomas Lamprecht
64bef8206e ui: qemu: switch memory icon to SVG
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-31 16:52:14 +02:00
Thomas Lamprecht
f9698f62cb ui: qemu: switch processor icon to SVG
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-31 15:43:40 +02:00
Aaron Lauterer
8c4ec1aef8 gui: add help button to qm guest agent window
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-03-16 15:32:34 +01:00
Thomas Lamprecht
36e97aa41d ui: vm boot order: move init logic into controller
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-14 08:40:46 +01:00
Thomas Lamprecht
87faaa0b93 ui: vm: improve validator for CPU share range
Allow the range for the old CGroup V1 one, as while deprecated,
that's still supported and a includes the range for v2 anyway.

With a next major release we may drop v1 support completely, probably
in PVE 8.0, then we can reduce this to the range of [1, 1000] that v2
supports.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-10 19:08:37 +01:00
Thomas Lamprecht
d20113ef7e ui: pci passthrough: fix labels of new id/vendor overrides
We do not use 'Set XYZ' anywhere else and it should be clear enough
from the PCI selector in the non-advanced section that the actual
device to get passed-through is chosen else where, but we still can
use the emptyText to avoid confusion where the (sub) vendor/id will
come from if a field is left empty.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-27 15:16:50 +01:00
Nicholas Sherlock
9a9be673d1 ui: pci passthrough: editor for pci-id overrides
Signed-off-by: Nicholas Sherlock <n.sherlock@gmail.com>
2022-01-25 11:17:05 +01:00
Thomas Lamprecht
523bc167d7 ui: vm create wizard: default to 4 GiB memory for win11 os type
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-12-09 17:41:45 +01:00
Thomas Lamprecht
b48c66655c ui: qemu: disk edit: drop label widths from advanced columns
this is a historical left over from the time when the bandwidth
limits weren't in their own, separate tab, as there we got quite
long labels and we synced the width up for the remaining fields to
avoid that it looks to much off.

Luckily not required anymore, so just drop it for non BW fields.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-16 14:19:00 +01:00
Dominik Csapak
f68d8b2c54 ui: qemu/HDEdit: add 'aio' advanced option
so that users can change it more easily if necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-16 14:05:06 +01:00
Thomas Lamprecht
d9d962999b ui: qemu: fix enabling SSD-emulation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-15 17:32:21 +01:00
Thomas Lamprecht
731c3253ec ui: qemu/HD edit: more modern assembly of bandwidth values
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-15 16:16:40 +01:00
Thomas Lamprecht
e4d8437819 ui: qemu: disk edit: expose read-only flag as advanced option
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-15 11:17:11 +01:00
Thomas Lamprecht
3f543d7ff7 ui: qemu: disk edit: refactor to more declarative style using bindings
would technically require a versioned dependency bump to widget
toolkit as the `clearOnDisable` flag is new in 3.4-2, but this is
really only for slight UX improvement, so avoid the hard dependency
bump..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-15 11:16:04 +01:00
Thomas Lamprecht
cc80f76528 ui: guest remove: modernize code and cleanup
drop only partially used intermediate value, use template strings,
reduce line bloat while trying to keep it readable.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-09 11:00:51 +01:00
Dominik Csapak
9dbc4dfa88 ui: add qemu/MultiHDEdit and use it in the wizard
uses the MultiDiskPanel as base and implements the necessary
functions/variables

this allows now to create a vm also without any disk

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2021-11-05 09:50:36 +01:00
Dominik Csapak
cef0b24cff ui: qemu/SystemEdit: add spacing and heading for 'firmware' options
So that they are more visually seperated from the rest of the options.
Use the same style as in the realm sync panel.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-03 17:05:26 +01:00
Thomas Lamprecht
7d21fd936a ui: clarify labels for EFI/TPM storage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-21 13:41:06 +02:00
Stefan Reiter
a9175b0ba1 ui: add 'win11' ostype and set defaults in wizard
Windows 11 requires a TPM and secure boot, so try to auto-enable both.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
2021-10-21 12:41:30 +02:00
Stefan Reiter
b0a0b17dbc ui: SystemEdit: promote advanced settings to normal
and reorder the panel a bit, as otherwise I found it *very* cluttered.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
2021-10-21 12:41:25 +02:00
Thomas Lamprecht
78b3c3df99 ui: vm create: allow configuring a TPM in wizard
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-05 20:11:21 +02:00
Thomas Lamprecht
fd12adfb32 ui: efi: default to new 4MB format and allow pre-enrolled keys
to allow "real" secure boot, at least real enough for Windows 11 ;)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-05 20:11:21 +02:00
Thomas Lamprecht
80ddbcdf53 ui: efi/tpm: propagate disabled to child items
we'll need that soon once this is used int the wizard

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-05 20:03:21 +02:00
Stefan Reiter
6d084964b3 ui: add support for adding TPM devices
Inspired by HDEfi for efidisks. Extends the DiskStorageSelector to allow
hiding the format, since tpmstate can only be stored in 'raw' format
(even on directory storages).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-10-05 07:12:19 +02:00
Dominik Csapak
e05c2d4989 ui: qemu/OSTypeEdit: set ostype in viewmodel
so that we can retrieve it in the MultiDiskPanel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Dominik Csapak
eb7075d05e ui: qemu/OSTypeEdit: drop throwing an error on multiple widgets
we will have multiple panels with the same widget. Instead
of raising an error in that case, simply ignore it, since
we normally only want to set the default initially, not when
users configured something else

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Dominik Csapak
9d0fc15540 ui: qemu/HDEdit: fire an event when the disk id changes
e.g. from scsi0 to scsi1 or from scsi0 to virtio0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Dominik Csapak
ef82a0b1a7 ui: qemu/HDEdit: use me instead of this
more in line with our remaining code style

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Dominik Csapak
74c0b9a907 ui: qemu/HDEdit: move Bandwidth options to a different tab
for that we have to nest the now two tabs in a tabpanel into an inputpanel.
to prevent the options to be collected twice, we override the
'getValues' function of the 'sub-inputpanels' to return an empty object.
(we could make that an option for the inputpanel, but not necessary for
now)

also we have to move the 'bodyPadding' of the wizard to the 'defaults'
so we can override it for specific panels

and we have to manually set the width of the edit window since it
believes we only have a single column ('twoColumns' could also be an
option of the edit window should we need that again)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Dominik Csapak
4f0d4294cf ui: qemu/PCIEdit: change onlineHelp link to vm config section
link the user directly to the vm config section of the pci
passthrough docs, since that is whats happening on that panel.

It still is on the same page as the whole passthrough docs, so
the remaining info is still there.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-30 14:49:14 +02:00
Thomas Lamprecht
56bc50b8a8 ui: adapt task-history icon, use same as in PBS
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 02:41:02 +02:00
Thomas Lamprecht
897c1fc84c ui: qemu/HW: reformat comment to better use awailable text-width
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 11:46:01 +02:00
Dominik Csapak
c313af0f6d {qemu, lxc}/Config: adapt to new proxmoxNodeTasks
by adding a preFilter and extraFilter

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-28 17:51:50 +02:00
Dominik Csapak
b235a53821 fix #3470: ui: qemu/CmdMenu: fix confirm message for 'pause' cmd
while the command itself is 'suspend', the task description
is 'qmpause', so simply add a parameter and overwrite it for the pause
menu item

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-18 17:21:52 +02:00
Thomas Lamprecht
a7ec3666b1 ui: qemu/PCI Edit: code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 12:29:29 +02:00
Dominic Jäger
61e0576823 ui: qemu: eslint fixes
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2021-05-19 12:12:36 +02:00
Thomas Lamprecht
978ee37981 fixup! ui: qemu/context cmd: code cleanup/refactoring/modernize 2021-05-19 10:18:48 +02:00
Thomas Lamprecht
4cb5c258d2 ui: qemu/context cmd: factor out confirmed VM command
could be also a generator (higher order fn), but it's easier to
grasp the scope and the like this way

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 10:00:40 +02:00
Thomas Lamprecht
5e83a90d81 ui: qemu/context cmd: code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 10:00:40 +02:00
Thomas Lamprecht
4f73992703 ui: qemu/OS defaults: code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:53:22 +02:00
Dominic Jäger
f09f1c27ad ui: eslint: Miscellaneous eslint fixes
Function syntax, raw words, string templates, no prototype builtins

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
91a47a766f ui: eslint: State equalities more precisely
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
f1374bff13 ui: eslint: Remove useless escapes
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
55ee6ba132 ui: eslint: No unused or duplicate variables
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
46d9a35c33 ui: eslint: fix usage of 'me'
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Lorenz Stechauner
963bb5c91f ui: cloudinit: use PVE.Parser.parseSSHKey
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-05-17 15:42:11 +02:00
Dominik Csapak
a8ea1b6876 ui: use some icons from widget-toolkit
we moved them there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 18:34:34 +02:00