Commit Graph

204 Commits

Author SHA1 Message Date
Dominik Csapak
bf96f60deb use IntegerField from widget toolkit
there we implemented deleteEmpty, which we can use in some cases.
this also fixes a bug in the ControllerSelector where
an empty field would be allowed (but should not)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
dbed4c1c05 use TextField from proxmox-widget-toolkit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
76f56b02ad add spec-ctrl cpu flag checkbox
also make the mechanism for the flag checkboxes generic

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-17 09:10:10 +01:00
Wolfgang Bumiller
f7e1db3d53 readability fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-01-10 11:47:26 +01:00
Dominik Csapak
1eeb6f176a add PCID checkbox to ProcessorEdit
but not in wizard, and default is off
(because we do not know if the cpu supports it)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-10 11:46:48 +01:00
Emmanuel Kasper
ea54132130 Set Console Button icon style at definition time
This will allow the 'Upgrade' button to get an icon too.

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-20 14:33:30 +01:00
Emmanuel Kasper
ff5a8a9b44 Add a proper confirmation message when we detach an used disk
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-04 12:02:47 +01:00
Emmanuel Kasper
877fce5419 Fix #1526: Use 'detach' instead of 'remove' when the disk is used
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-04 12:02:47 +01:00
Emmanuel Kasper
72408db913 Fix JSLint type confusion warnings
The type confusion warnings arose from string and integer concatenation,
and object properties of the name which were alternatively set with
strings and integers.

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-04 12:02:47 +01:00
Emmanuel Kasper
0464b05279 Do not translate PC hardware specific terms
The SKU (Stock Keeping Unit) field was never translated anyway in our po files,
probably because nobody knew what the initials meant.

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-28 11:24:52 +01:00
Emmanuel Kasper
a1af3e3842 Do not translate Qemu specific terms
Multiqueue is the proper name as used by Qemu, as seen in
https://www.linux-kvm.org/page/Multiqueue

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-28 11:24:52 +01:00
Dominik Csapak
fb71c9a595 use DiskStorageSelector in qemu/HDMove.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
1490ff3d7e use DiskStorageSelector in qemu/Clone.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
c56689d0dd use DiskStorageSelector in qemu/HDEfi.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
771aec961f use DiskStorageSelector in qemu/HDEdit.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
9fe20b3f6a prevent visual flashing of button when changing element in the tree
when changing between elements in the tree, either the
start or shutdown buttons were visually flashing (meaning they are
enabled/disabled for a short time and change state shortly after)

this patch fixes that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Acked-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-10-31 12:43:26 +01:00
Emmanuel Kasper
7b2f6ac8af Update VM SCSI controller type after OS selection in Wizard
This was done previously without any kind of user visible feedback, so users
would not know that they had a Virtio SCSI controller as default controller
for Linux VMs.

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:24 +02:00
Emmanuel Kasper
2414ef153a Update VM SCSI type based on iothread value when inside the wizard
We keep the same logic as before: once the iothread option is selected,
the SCSI controller is switched to virtio-scsi-single, until iothread
is unselected again.

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:24 +02:00
Emmanuel Kasper
42bd655684 Add a field to show which SCSI controller type we are currently using
We use the field label 'SCSI Controller'. 'Type' is redundant, otherwise
we would have Network Card Type, Display Type, Network Card type, etc ...

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Emmanuel Kasper
7206af4b04 Do not use 'autoselect' as a boolean when preselecting a bus
The bus selector is displayed when we add a Hard Disk or CD Drive.
When it is displayed, we *always* preselect the next available
slot on the controller of our choice.
So this test is not needed.

We keep the test on the string value of 'autoselect' to select
a bus position when adding a CD Drive.

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Thomas Lamprecht
11480a8ca0 fix #1518: ui: qemu: add HA manage menu item to panel
Allows to add an unmanaged VM to HA or to edit the HA settings of a
managed one.

Fixes: #1518
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-19 09:24:46 +02:00
Thomas Lamprecht
757f4362c2 ui: qemu: combine system changing buttons
add a 'More' Button to the VM and CT Config Panel (its base panel)
and move all buttons which may result in config changes there.
After that we have separated power/migrate actions from system
affecting actions (clone, remove, convert to template).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-19 09:24:46 +02:00
Thomas Lamprecht
d24064e4d3 PVE.qemu.OSTypeEdit: declare static
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +02:00
Thomas Lamprecht
5f38c3fc81 wizard: merge CD/DVD and OS panels
We had a single column for the CD/DVD panel, fill the second column
with the now in size reduced OS type selector, as ISO selection and
OS type selection are tied together.

Reduces steps needed for creating a VM.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +02:00
Thomas Lamprecht
e41bb8b9b6 OSType edit: switch to combobox
Move from the radiogroup to two comboboxes, where the base OS and
then a specific Version can be choosen.

Avoids multiple occurences of strings like "Microsoft Windows" and
saves a lot of space - which will be used to merge this panel with
the ISO selector panel in the create wizard.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +02:00
Thomas Lamprecht
0f421616f1 refactor OSDefaults, OSTypeEdit: add and use getDefaults
encapuslation wise it makes sense to have a helper which assembles a
os specific setting object in the OSDefaults class, where those
settings are defined.

Else we always need to check if the current OSType on the user side
of this class, which is against encapsulation.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +02:00
Thomas Lamprecht
4ad508efc9 ui: reuse ResourceStores default handling for guest description
First, there was an additional space between "'" and ")" which lead
me to this.
I could never trigger the case where vmname is undefined, and saw
that we have a almost same default handling in data/ResourceStore.js

So, just use that one instead here - it misses the single-quotes
inside the parentheses, but as there are already said parentheses
this is visually still very OK, IMO.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-22 10:41:57 +02:00
Matthias Urban
8ed196a408 VM.Snapshot.Rollback privilege added
VM.Snapshot.Rollback privilege added

Signed-off-by: Matthias Urban <matthias.urban@pure-systems.com>
2017-09-22 09:24:44 +02:00
Thomas Lamprecht
3695863919 disable discard for non-scsi disks
Adapted from: Dominik Csapak <d.csapak@proxmox.com> version

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Thomas Lamprecht
ed1ac8f4b3 create: clear iothread on disable
A user may set the `iothread` option and then change the bus type to
something which does not support it (sata, ide), while we disable
it the previously set value remains, which is confusing.
An user could think he coulkd trick the Wizard into using iothreads
for SATA/IDE but we just ignore the value in this case.

Set iothread to false in the case it gets disabled.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Emmanuel Kasper
2a2dce7037 Change the SCSI controller type when editing a harddisk only when creating a VM.
If not, the following could happen:
 * user has a VM with two disks attached to a LSI controller
 * adding a third disk, he notices the iothread option, and clicks it
 * the scsihw type for all disks is changed now to virtio-scsi-single
 * on next cold restart, STOP 0x0000007B INACCESSABLE_BOOT_DEVICE for a Windows VM

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Thomas Lamprecht
8722af4a58 remove unused variables
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Thomas Lamprecht
2d06e72392 HDEdit: push more items in the same call
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Thomas Lamprecht
79a14fbbd8 CreateWizard: remove title from confirm tabpanel
It isn't needed as its obvious that the table below show the
configuration. It just takes away space.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Dominik Csapak
8ad3421180 hide migrate in contextmenu when no cluster or no rights
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:42 +02:00
Dominik Csapak
6ecdb34077 hide not usable buttons for qemu
this hides not usuable buttons for qemu
e.g. start/shutdown for templates
migrate for non-cluster setups

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 09:59:48 +02:00
Thomas Lamprecht
9a8a573568 qemu/create: use 'virtio-scsi-single' if 'iothread' is set
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reported-by: Nils <gismo3303@gmail.com>
2017-08-22 10:49:57 +02:00
Thomas Lamprecht
7a6e0635cf qemu/HDEdit: whitespace cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-08-22 10:42:42 +02:00
Emmanuel Kasper
7da4966dc0 Select OS Type after selecting the Installation Media
This prepares for the future, in case we want to infer the
OS Type from the installation media name or content.
2017-07-11 13:25:25 +02:00
Emmanuel Kasper
8d4f1d4d2b Use a View Controller for making components react to each other
This allow to declare all the components inside the same items
array, and separate behaviour from view better.

No functional changes.
2017-07-11 13:24:48 +02:00
Emmanuel Kasper
85806e47d1 Use camel case for InputPanels aliases
Camel Case names for component alias follow Ext recommended practises
and are used otherwise everyelse in the code base.

No functionnal changes, aliases for these components were not used
anyway.
2017-07-11 13:23:38 +02:00
Emmanuel Kasper
1b6f87ab1d Add a Skip replication option on Disk Panel
This will allow to disable replication, when for instance we
add a disk on a non-replicatable storage.
The option is hidden in the wizard, because at that time no VM
replication has been set.
2017-06-27 10:49:35 +02:00
Dominik Csapak
d5a7996b13 fix reselection on vm/ct migrate in gui
there were a number of problems in how we reselected vms when they
migrated and selected:

we relied on the data in the configpanel to be static, but since
pveselnode is a reference, it actually changes when the resourcestore
changes
also, handling the reselection as a response to the statusstore failure
is very inconsistent, because we know exactly when a vm moves node in
the tree

this patch removes the whole configpanel vm migration code,
and lets the tree handle it
for this, we have to check if we have to reselect the entry,
deselect it manually and after the treeupdate reselect it

also in the right click selection check we have to check if it is
already selected, else the next selection will get canceled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-23 13:01:12 +02:00
Dominik Csapak
1d0293b8c0 show resume button when qmpstatus is 'suspended'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-22 12:24:03 +02:00
Dominik Csapak
cb6df20c2e add replication grid to lxc/qemu/node
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-14 07:34:48 +02:00
Dominik Csapak
ec3d837288 show hostpci devices in gui
so one can see which pci devices are assigned to which vm

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 16:06:16 +02:00
Dominik Csapak
2668ba649c use usbedit window to add/edit usb devices
the usb device button gets disabled when there are
already 5 usb devices

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 16:05:27 +02:00
Dominik Csapak
f46721af8e add usbselector and usb edit window for qemu
the edit window has 3 radiobuttons (spice,device,port)

and a checkbox for usb3 (which gets disabled and checked
if you choose a usb3 device)

also it makes use of the help feature

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 15:57:56 +02:00
Dominik Csapak
fa522e4867 show usb devices in qemu hardware view
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 15:57:56 +02:00
Dominik Csapak
461833217b add defaultButton and focus to snapshot window
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 16:16:51 +02:00