Commit Graph

452 Commits

Author SHA1 Message Date
Thomas Lamprecht
32b73cb2c6 ui: qemu/audio: submitValue is default true for combobox
this was previously a display field, where submitValue defaults to
false, so we required to enable it explicitly. As it changed to a
combo box we can drop that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-12 13:08:04 +01:00
Gilles Pietri
bf14dcd87f ui: qemu: add the none audio driver as an option
Signed-off-by: Gilles Pietri <contact+dev@gilouweb.com>
2021-01-12 12:53:37 +01:00
Dominic Jäger
410198ac83 ui: add netdevice: fix #3203: Use OS default model
In the VM create wizard we automatically set e1000 for Windows and virtio for
Linux.  We should also do this when adding a network device in the hardware
view.

OSDefaults.generic.networkCard (=e1000) is always available.  Hence, leave this
as default value for the field and then try to get the ostype via API and
overwrite the default e1000.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2021-01-12 11:47:02 +01:00
Stefan Reiter
c856bd1c22 ui: bootorder: add onlineHelp link
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-11-25 16:11:32 +01:00
Dominik Csapak
d3b3b4ad2a ui: fix 'no iommu found' message for setups
sometimes, the first device in the pci api call is not in a separate
iommu group (see e.g. [0]), but it is active and should work

instead of testing the first, test all, and only show the message
if no device has a set iommu group

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-20 15:34:27 +01:00
Stefan Reiter
6a073b92e9 ui: qemu: set correct disabled state for start button
If a guest's QEMU process is 'running', but QMP says 'shutdown' or
'prelaunch', the VM is ready to be booted anew, so we can show the
button.

The 'shutdown' button is intentionally not touched, as we always want to
give the user the ability to 'stop' a VM (and thus kill any potentially
leftover processes).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-11-05 13:31:29 +01:00
Thomas Lamprecht
d571f1f382 ui: boot order: handle cloudinit correctly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-22 18:45:31 +02:00
Thomas Lamprecht
eb4b9246a8 ui: boot order: eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-22 18:45:31 +02:00
Thomas Lamprecht
dd27ec6d3a ui: bootorder: show device type as icon for UX
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-16 14:47:10 +02:00
Thomas Lamprecht
595c30aa62 ui: bootorder: define all column widths flex
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-16 14:46:48 +02:00
Thomas Lamprecht
eacd918e0a ui: bootorder: set minHeight for grid to conceal the long load time a bit
as else the window is not centered if it only grows in size after
ExtJS rendered it completely once.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-16 14:45:39 +02:00
Thomas Lamprecht
9377540652 ui: bootorder: set common options using the defaults property
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-16 14:43:59 +02:00
Stefan Reiter
1cc7c672b7 ui: improve boot order editor
The new boot order property can express many more scenarios than the old
one. Update the editor so it can handle it.

Features a grid with all supported boot devices which can be reordered
using drag-and-drop, as well as toggled on and off with an inline
checkbox.

Support for configs still using the old format is given, with the first
write automatically updating the VM config to use the new one.

The renderer for the Options panel is updated with support for the new
format.

Note that it is very well possible to disable all boot devices, in which
case an empty 'boot: ' will be stored to the config file. I'm not sure
what that would be useful for, but there's no reason to forbid it
either, just warn the user that it's probably not what they want.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-10-14 12:31:14 +02:00
Dominik Csapak
c84c5c9ad7 ui: qemu/AgentIPView: also filter out 0:0:0:0:0:0
it seems that some guest-agents format an non-existant mac adress
differently (e.g. macos, see [0]) so filter that also out

0: https://forum.proxmox.com/threads/macos-vm-optischer-makel.76263/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-09-23 15:09:58 +02:00
Thomas Lamprecht
c081336c2e fixup: get fallback caps correctly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-26 10:20:20 +02:00
Mira Limbeck
044b08f255 change permissions for non-network cloudinit settings
With the introduction of VM.Config.Cloudinit we can set the user,
password and an SSH key without VM.Config.Network permission.
Keep the fallback for VM.Config.Network so custom roles don't break.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2020-06-26 09:43:00 +02:00
Stefan Reiter
7376c56edc ui: ProcessorEdit: allow modifications with inaccessible CPU model
An administrator can set a custom CPU model for a VM where the general user
does not have permission to use this particular model. Prior to this change
the ProcessorEdit component would be broken by this, since the store of the
CPU type selector did not contain the configured CPU model.

Add it in manually if this situation occurs (with 'Unknown' vendor, since
we cannot retrieve it from the API), but warn the user that changing it
would be an irreversible action.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-06-17 15:51:11 +02:00
Stefan Reiter
b839766e7d ui: ProcessorEdit: fix total core calculation and use view model
Clean up the code in ProcessorEdit with a view model and fix a bug while at
it - previously, pressing the 'Reset' button on the form would always set
the value of the total core count field to 1, so mark 'totalcores' with
'isFormField: false' to avoid reset.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-06-17 15:51:11 +02:00
Thomas Lamprecht
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Thomas Lamprecht
bc92b15f84 ui: vm/options: increase localtime edit window width
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-26 19:12:57 +02:00
Fabian Ebner
0beff18b8e Fix 2718: GUI: handle localtime option correctly
The backend treats an undefined value and 0 differently. If the option
is undefined, it will still be set for Windows in config_to_command.
Replace the checkbox with a combobox covering all options.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-05-26 19:09:21 +02:00
Thomas Lamprecht
433645160f ui: qemu: stop pending changes in correct scope
I saw some cases where the pending changes just continued to get
triggered for some VMs, even if they shouldn't anymore - effectively
resulting in 3 - 4 concurrent pending changes call at a time.

It could be this, or not, but it's cleaner this way so go for it

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-22 17:16:37 +02:00
Thomas Lamprecht
63308ba742 ui: memory field: third time's a charm...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-09 18:17:35 +02:00
Thomas Lamprecht
050d86a8b0 ui: also set minimum memory's maxValue to higher default initially
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-07 23:15:44 +02:00
Thomas Lamprecht
77496e1be3 fix #2708: ui: increase default memory in VM create wizard to 2GiB
as nowadays a lot of VMs won't even start the installer with 512 MB.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-07 15:09:29 +02:00
Thomas Lamprecht
6386068d0e ui: call more update store functions in the store scope
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-09 16:45:22 +02:00
Thomas Lamprecht
17b777914a ui: rng edit: drop useless gettext for integer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-31 18:05:27 +02:00
Stefan Reiter
4ba4c7c616 qemu: change virtio-rng icon to die
'die' as in 'dice', not what Perl does

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-03-06 18:19:39 +01:00
Stefan Reiter
6c1d8ead7a qemu: add virtio-rng option to GUI
Warn the user when selecting /dev/random or disabling speed limits.

'hardware_counts' is used since technically more than one RNG could be
attached to a QEMU machine. It is limited to 1 however, since the
usefulness of such a setup is more than questionable, considering the
linux kernel only ever uses one hwrng at a time anyway.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-03-06 18:19:39 +01:00
Stefan Reiter
e08c232118 qemu: fix icon alignment in "Add Hardware" menu
It was ever so slightly off.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-03-06 18:19:39 +01:00
Stefan Reiter
5b23d68382 gui: pci passthrough: fix 'Add PCI' dialog for new devices
Commit f36240c507 (gui: pci passthrough: consider domain in PCISelector)
used 'values.host' without checking if it's set, resulting in an error
when the dialog was opened for a new device (where values.host is
undefined).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-02-17 15:34:38 +01:00
Dominik Csapak
b06d011e31 fix #2572: gui: make snapshot panel visible for VM.Audit
with the now rewritten panels, this works as expected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Dominik Csapak
5b1b9360eb gui: refator SnapshotTree
using the better View, ViewModel, Controller style,
while doing this, make it generic so that we can use it for qemu and lxc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Dominik Csapak
4e0e6b77e9 gui: refactor snapshot window
using an Proxmox.window.Edit, which does many of the things we did
manually, also rewrite is in such way that we can use it for qemu
and lxc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Thomas Lamprecht
aa85713036 manager: startIPStore: status can be null/undef
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-27 19:09:10 +01:00
Dominik Csapak
67847d54fa gui: qemu: HardwareView: improve button disable code
this improves following behaviours:
* do not loop over items multiple times
  (we iterated one time extra for efidisk)
* do not check every item for cloudinit
  (we even checked non-disk types)
* make the counts more generic using an object
* also disable cloudinit button when you have one pending
* also disable serial/net button when at limit or the user has
  not the right priviliges

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-24 10:10:48 +01:00
Dominik Csapak
9d8553982d gui: qemu HardwareView: specify hardware counts in Utils
this also fixes the issue that we only showed 4 hostpci devices in
the gui despite raising the limit in the backend to 16

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-24 10:10:48 +01:00
Dominik Csapak
d790a1b45e fix #2334: gui/cloudinit: enable edit button only when editor is set
when a user does not have the right privileges for cloudinit (e.g.
VM.Config.Network), we do not set an editor, which results in a button
that does nothing when pressed

fix this by enabling the button only when there is an editor set

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-09 17:42:34 +01:00
Thomas Lamprecht
5d7c0d9729 followup: code cleanup/nitpicking
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-18 19:40:09 +01:00
Stefan Reiter
c17ecca28d ui/vnc: reload IFrame-embedded noVNC on VM startup
Avoids having to do the 'Console' -> 'Summary' -> 'Console' dance
everytime the VM is started and the Console window is currently open.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-18 17:55:57 +01:00
Stefan Reiter
d6ba66e13a ui/qemu: cleanup pveSelNode to variable
'vm' has been in use further down anyway, let's move it up.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-18 17:55:57 +01:00
Thomas Lamprecht
56054937a6 followup: clarify which storage is used for automatic
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-11 09:18:58 +01:00
Thomas Lamprecht
4fe2c21c00 followup: avoid a doc-gen bump, use general QM chapter as onlineHelp
doc was just bumped, there's no real content, I don't want to bump it
just for this, so replace with link to QM and a fixme comment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-11 09:01:12 +01:00
Dominik Csapak
ab84ee7415 ui: make vmstatestorage configureable
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-11 08:55:15 +01:00
Thomas Lamprecht
8717893448 ui: vm/HDEdit: really™ fix backup checkbox default
By ensuring we delete the property if it's true (the backend default)
and set it is false, i.e., like originally (pre, mine and Aaron's
patch), but with reversed user input.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-10 11:29:13 +01:00
Thomas Lamprecht
20d3180b3a ui: vm/HDEdit: fix backup checkbox default
The recent change transformed this checkbox from a negative "No
Backup" to a positive "Backup" did not accounted for changing the
default fallback for the parseBoolean call.

As this would had suggested that disk are backed-up which aren't
backup, it could lead to pretty devastating results...

fixes commit 8e1df0acc5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-09 15:46:47 +01:00
Thomas Lamprecht
0bead056b1 followup: rename to "Backup" but add tooltip
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-09 15:11:08 +01:00
Aaron Lauterer
8e1df0acc5 ui: hdedit: change nobackup to include in backup
Change the behavior from having to activate the `No backup` checkbox to
exclude a disk from backups to having a `Include in backup` checkbox
that is checked by default.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-12-09 14:45:14 +01:00
Dominik Csapak
df0875c20e gui: refactor {lxc, qemu}/Summary to panel/GuestSummary
they are both similar enough to have it only once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-09 14:20:37 +01:00
Thomas Lamprecht
4b07ffdd1f ui: vm/hw: be more specific what VM state this is
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 18:14:33 +01:00
Thomas Lamprecht
59bce2875c ui: vm/hw: order VM state last and add extra warning
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 18:12:28 +01:00
Thomas Lamprecht
b2a5aa1812 ui: vm/hw: make extra message from deletion flexible
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 18:12:08 +01:00
Dominik Csapak
23dfddc637 gui: qemu/HardwareView: show vmstate and allow removal
so that a user can remove the 'suspended' state without resuming it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-30 17:50:10 +01:00
Oguz Bektas
b8f34731da add reboot button to right-click menu for VMs
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-11-30 14:31:22 +01:00
Dominik Csapak
f36240c507 gui: pci passthrough: consider domain in PCISelector
but remove the default domain '0000' before sending to the backend,
and add it if no domain is given in the config

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-20 19:43:31 +01:00
Dominik Csapak
e4e36020aa gui: qemu/HDEdit: use propertyStringSet helper
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Dominik Csapak
18f57a2319 gui: qemu/HardwareView: use builtin reload function
ObjectGrid (an ancestor of PendingObjectGrid) does already have
a 'reload' function which does exactly the same, so get rid
of the local one here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Thomas Lamprecht
417f904f78 ui: pending revert: detect parent pending grid automatically
but cache it to avoid frequent, potential costly, up() calls

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 15:49:31 +01:00
Thomas Lamprecht
3ee15859b2 ui: pending revert: rename baseurl config to apiurl
makes more sense and avoids confusion

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 15:48:33 +01:00
Thomas Lamprecht
591efb6725 ui: factor out pending changes revert button
makes no sense to have the, more or less, exact same 25 line method 5
times..

could be moved to widget TK, but that's for another time.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 11:48:03 +01:00
Oguz Bektas
141aba6b62 ui: qemu: update grid button status with events from correct store
as we noticed at the container side, we should use diffStore in order
to update the button status without delay.

Effectively alls ObjectGrids, and thus their descendants,
PendingObjectGrids use a DiffStore, where we have two effective
stores, a remote store and a local, in-memory, proxy store.

Co-developed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 09:00:50 +01:00
Tim Marx
9d7d6ed71a gui: reset cdimage selector on change
to improve UX, disabled child fields shouldn't show validation errors
when the parent widget (radiofield) isn't selected anymore.

Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-10-25 17:40:48 +02:00
Dominik Csapak
4143529241 gui: qemu: allow move disk for EFI Disk again
with commit 0ea3b8499b we changed how
we define isUsedDisk, which was true for efidisks before, but not
after

use the existing 'isEfi' varable to include them for the move_btn
(but not the resize_btn)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-10-11 12:22:50 +02:00
Thomas Lamprecht
ea6a4b5251 ui: vm opts: clarify QGA option
To make it more clear that PVE does not somehow magically injects a
QHA into the VM, but that this can be set if one has installed the
QGA in the VM themself.

So slightly adapt the label by prepending "Use" and adding a hint for
further details.

Also ensure we call it the real name everywhere, i.e., "QEMU Guest
Agent", this makes it a bit more consistent and easier to find
information for users.

Suggested-by: Aaron Lauterer <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-10 17:50:23 +02:00
Thomas Lamprecht
cd8f0fc54b ui: refactor pveQemuBiosEdit widget
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-10 17:25:12 +02:00
Stoiko Ivanov
f71b7c28ff change .pve-hint to .pmx-hint css-class
With introducing pmx-hint to pmg as well, by adding a 'pmx-hint' css-class
to proxmox-widget-toolkit, it makes sense to use the definition everywhere.
this patch drops the .pve-hint class from pve's css and replaces all occurences
in the GUI-source.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-09 09:11:04 +02:00
Aaron Lauterer
9c22da325d ui: vm-options: add spice enhancements
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-10-07 16:16:34 +02:00
Stefan Reiter
06dd1330df Make CPU Model Selector a searchable grid view
Uses a ComboGrid with search feature and a column for vendor. Can be
sorted by both columns.

Default sort is as given in this file, I tried to align it as
* AMD
* Intel
* Other
alphabetically and in QEMU order (as before, seems to be release date?)
within those "groups".

Doesn't work with value set in widget definition (would need to be
preferredValue), but we always call setValue() anyway (and if we don't,
value will be '', aka the default, which is correct too), so just remove
that from ProcessorEdit.js.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-02 13:35:44 +02:00
Thomas Lamprecht
c570b6a96e ui: vm/efi: always allow to add EFI disk even if OVMF is not yet set
As this is annoying else, especially if the change from default to
ovmf BIOS is already a pending change..

A simple hint is enough, we do not do anything with the EFI disk if
OVMF is not set to be used anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-01 09:30:06 +02:00
Aaron Lauterer
536336130a ui: qemubiosedit: add gettext to efi disk hint
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-30 16:46:17 +02:00
Aaron Lauterer
0d077e8150 ui: vm/usbedit: simplify USB3 handling
Enable USB3 by default. There are no restrictions anymore that the speed
of the dev must match the USB3 speed. The xhci controller can deal with
USB 2 and 1 devices. USB3 devices can be plugged in a USB2 (ehci)
controller. As discussed in [0]

When using a USB device for SPICE passthrough my tests showed that USB2
devices connecting to the xhci controller work but a USB3 device passed
via Spice cannot connect to an ehci controller (no USB3 enabled).

qemu-server 6.0-9 supports USB3 also for Spice USB passthrough. See
commit 733234b [1].

All this means we can get rid of the separate handling of USB3 and non
USB3 devices and leave the decision to the user if USB3 should be
enabled or not.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-September/039131.html
[1]: https://git.proxmox.com/?p=qemu-server.git;a=commitdiff;h=733234be04d585febd74c655d8b82d17ebf9e133

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-26 17:02:23 +02:00
Thomas Lamprecht
d155bbc960 ui: usbselector/usbedit: make widths a bit larger
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-26 16:39:02 +02:00
Aaron Lauterer
cc9c5af4aa ui: vm/usbedit: add gettext to label
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-26 07:31:18 +02:00
Thomas Lamprecht
17f6a3f6f4 ui: vm/usbedit: don't use getUSBValue to avoid possible duplicate "usb3"
As getUSBValue() always added the "usb3" property if the selected
device was recognized as USB3. But we can now also pass such a device
as USB2 so lift this restriction - which also fixes a bug for USB3
selected devices with the USB3 checkbox set.

The solution also avoids the me.down query, which is nice too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 17:08:08 +02:00
Thomas Lamprecht
2e8f031f99 ui: vm/usbedit: code & indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 10:01:27 +02:00
Thomas Lamprecht
7c72eb5112 ui: vm/usbedit: cleanup and refactor usb selector change
split the long ternary operation into a common if/else, to make it
readable.

Also, remove the usb3field.isDisabled check as:
1. we do not disable it anywhere anymore
2. if we would, it makes sense to do this anyhow

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 08:42:25 +02:00
Thomas Lamprecht
4292a318ee ui: vm/usbedit: use simple bind for radio button changes
reduces code and is more expressive

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 08:18:15 +02:00
Thomas Lamprecht
410313f8b2 ui: vm/usbedit: omit usb3 changes for spice completely
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 08:17:56 +02:00
Aaron Lauterer
4d51f6572b usb: Enable USB3 for Spice USB passthrough
Instead of having two times the check if the USB3 setting needs to be
added to the config string it is now checked at one place only.

If USB3 is checked for a non USB3 device it will be attached to the USB2
root hub of the xhci controller.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-23 07:44:57 +02:00
Aaron Lauterer
e7d6f69490 ui: Add online help reference to VM bios settings
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-19 15:07:34 +02:00
Aaron Lauterer
d2d16a78b8 ui: Add online help reference to VM display settings
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-19 15:07:17 +02:00
Thomas Lamprecht
f07d8e6050 ui: power menu: add more tooltips
For reset and reboot.
Shutdown and pause is pretty self-explanatory, so omit that

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-19 14:12:38 +02:00
Dominik Csapak
c48535b16c gui: qemu: add reboot button
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-19 13:21:17 +02:00
Thomas Lamprecht
e30cddd254 ui: vm memory: correctly set initial maxValue for balloon
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-08-22 14:08:50 +02:00
Thomas Lamprecht
0ea3b8499b ui: vm/Hardware: do not depent mapping of cdrom, cloudinit, .. on the CSS class
This was pretty brittle to begin with, on should not attach logic to
CSS class names or the like, if possible.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-24 18:08:12 +02:00
Thomas Lamprecht
a032a91a48 ui: vm/Hardware: convert more icons from bitmap to font awesome
since commit 03558174ef we can use the
Font Awesome icons without them being shown in the remove dialog, so
convert more to them - they are vectors and look a bit better.

Also ensure that all icons are rendered as fixed width, with fa-fw

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-24 10:48:19 +02:00
Thomas Lamprecht
fa9cdaa135 ui: vm/HW: use more font awesome icons and fix color
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 19:18:15 +02:00
Thomas Lamprecht
700434b2f6 pveAudioInputPanel: comment out onlineHelp doc reference for now
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 19:03:50 +02:00
Aaron Lauterer
171ca270a0 Add audio device to HardwareView
Adds the following:

* Menu entry to create a new audio device
  only clickable if:
    * permissions are there
    * no audio device exists
* listing in the hardwarew view

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-07-23 18:29:05 +02:00
Aaron Lauterer
da97bd3d88 Add edit dialog for audio device
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-07-23 18:29:05 +02:00
Stefan Reiter
0cd3abab50 fix #2265: enable discard for virtio-blk
QEMU 4.0 supports this. Guest needs to have at least Kernel 5.0 for it
to be used.

SSD emulation is still not supported AFAICT, so no change here.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-07-23 08:08:36 +02:00
Thomas Lamprecht
7b7ca5e1f8 ui: qemu/HWView: cloudinit: use the font-awesome provided cloud symbol
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-17 13:28:20 +02:00
Thomas Lamprecht
83b4bfc314 ui: qemu/HWView: small code cleanup for remove dialog
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-17 13:27:35 +02:00
Thomas Lamprecht
03558174ef ui: qemu/HWView: only render icon when in grid
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-17 13:26:59 +02:00
Dominik Csapak
3098f188b3 gui: fix debug-mode error
setData on an 'empty' store does not work in extjs debug mode
setting store to '{}' here does create a store on component creation
so the store is not 'empty'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-17 13:01:31 +02:00
Thomas Lamprecht
2711037a6f gui: smbios: followup: make declaration fully static
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-11 18:08:01 +02:00
Christian Ebner
150ad74a2c fix #2190: Base64 encode SMBIOS value strings in order to allow more characters
On some occasions e.g. license checking, the manufacturer string in the
SMBIOS settings edit has to allow characters such as whitespaces.
https://forum.proxmox.com/threads/proxmox-and-windows-rok-license-for-dell.53236/
In principle SMBIOS allows to pass any zero terminated string to the
corresponding fields in the structure type 1 (System Information).

By base64 encoding the values clashing of the config is avoided.

Relies on the corresponding patch to qemu-server to pass parameter verification
and correct parsing.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-06-11 17:42:33 +02:00
Thomas Lamprecht
06064872c2 gui: vm: add CPU flag selector with tri-state awareness
This allows to select the tri-state (enforce on, enforce off, default
from QEMU+CPU Model) for each CPU flag independently.

For this a grid with a widgetcolumn is used hosting tree radio
buttons for each state. They're marked '+' for enforce on, '-' for
enforce off and the default has no label, as it isn't easy to add in
such a way that it does not confuses people and does not looks
completely ugly.. But, to help people which have a hard time figuring
out what the states mean, a fake column was added showing the current
selected state's outcome in words.

For show casing the new nice interface add all currently supported
flags from out API-
It could be worth to add some selected CPU model awareness, so that
flags are only enabled if they can make sense with the selected
model. But one should be able to add this relative easily with this
as base.

The hardcoded flag lists is not ideal, we should try to generate this
in the future, but here already qemu-server is lacking and this is
rather independent of the fact and can be done later one just fine
too.

Note that this /is/ an *advanced* feature so not visible for all
directly, while I try to document in short what a flag does it surely
isn't perfect and to short to explain all nuances, they should give
enough pointers to know if it's relevant at all (amd / intel cpu) and
for what one should research

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 92572ead6d)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-07 17:45:33 +02:00
Dominik Csapak
2e1a8291d6 fix #2223: fix set_button_status isCDRom
value is not always a string (depending on the value that changed),
so we have to convert it to a string to have a 'match' function

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-31 11:03:58 +02:00
Thomas Lamprecht
10525ed71e fix #2197: ui: editing CDROM doesn't require VM.Config.Disk rights
A user which just has the default role PVEVMUser on a VM is able to
edit the CDROM, either to no media or if storage permissions are
available also to other ISOs, through the API. So reflect this again
for the WebUI. We could add a check for "VM.Config.CDROM", but that's
not really worth, if we keep in mind that the Ext.Caps state is
heuristically only.

fixes commit d35b5b2afb

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-13 17:27:49 +00:00