Commit Graph

12 Commits

Author SHA1 Message Date
Stefan Reiter
43798244a9 Utils: add is_windows and use in MachineEdit
A bit more future proof and reuseable than a regex match.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-03-08 11:05:13 +01:00
Stefan Reiter
cfdb6ac69c ui/machine: fix eslint warning (unnecessary parentheses)
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-03-08 11:05:13 +01:00
Stefan Reiter
34aec3514c ui/machine: fix Windows pinning and detect "pc" as non-pinned
We need to detect "isWindows" before splitting a pinned version into
.version/.machine, otherwise .machine will always be "pc" or "q35", and
the check in "isWindows" will succeed even for pinned versions. This
resulted in "5.1" being shown even if a different version has been set
for a Windows machine.

Also alias "pc" directly to "__default__", as they have the same
meaning, but "pc" is not a valid entry in the "machine" combobox,
leading to an invalid state when editing the (valid) configuration of
"machine: pc" on a VM.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-03-08 11:05:13 +01:00
Thomas Lamprecht
6c2bc32631 ui: vm/machine: show autopinned version for win VM
and improve switchting machine type and keeping same version for
the windows based VMs, as we cannot do the same as for other
OS-Types, just select the "latest" magic version.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 22:23:19 +01:00
Thomas Lamprecht
432639a82a ui: vm/machine: show notice about effects of machine version change
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Thomas Lamprecht
1fe7de1a5e ui: vm/machine: allow blank to avoid invalidity and show Latest as empty text
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Thomas Lamprecht
aeb61a525b ui: vm/machine: only set advanced temporary visible for pinned machines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Thomas Lamprecht
c0cb5eee2e ui: vm/machine: avoid showing latest for windows VMs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Thomas Lamprecht
60cc233a10 ui: style followup cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Thomas Lamprecht
1b344da292 ui: vm/machine: adapt to API changes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Stefan Reiter
a51b2c335d ui: MachineEdit: add option for machine version pinning
Hidden behind "Advanced" options, as to not confuse inexperienced users.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Stefan Reiter
9dbddec75b ui: create MachineEdit window
no functional change intended

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00