Commit Graph

397 Commits

Author SHA1 Message Date
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