Commit Graph

48 Commits

Author SHA1 Message Date
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
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01: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
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
e4e36020aa gui: qemu/HDEdit: use propertyStringSet helper
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01: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
Dominik Csapak
471d03aa6b gui: add system panel to the vm creation wizard
for this we have to adapt the scsiController logic slightly, so that
the ostype change sets the viewmodel, which in turn changes the
bound fields (one one the system tab, and the displayfield on the hd tab)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-28 17:04:06 +01:00
Nick Chevsky
75357e9f0d Enable "Discard" option for IDE and SATA drives
Even though QEMU supports the discard feature for both ATA [1] and
SCSI drives, the "Discard" checkbox in Proxmox VE is artificially
restricted to SCSI drives. This change expands availability of the
"Discard" checkbox to all drive types supported by QEMU, leaving
VirtIO Block as the only remaining exclusion.

Combined with the new "SSD emulation" option [2], enabling discard
on IDE/SATA drives allows reclaiming of free space on thin-provisioned
storage with guests that do not support our SCSI controllers.

[1] d353fb72f5
[2] https://git.proxmox.com/?p=pve-manager.git;a=commit;h=f9261fde2134cec35a5ec7c3ebbee5daa4d67ec7

Signed-off-by: Nick Chevsky <nchevsky@gmail.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-14 09:21:12 +01:00
Nick Chevsky
f9261fde21 Add "SSD emulation" property to IDE, SATA, and SCSI drives
When enabled, the "SSD emulation" feature exposes drives as
solid-state (rather than rotational) by enabling the new `ssd`
qm.conf flag [1] on the drives, which in turn sets QEMU's
`rotation_rate` property [2, 3] on the underlying devices.

This change also moves the "Discard" option out of the advanced
section and promotes it to the top of the dialog box, as proposed
by Thomas Lamprecht [4].

[1] https://git.proxmox.com/?p=qemu-server.git;a=commit;h=6c875f9f315f2dc7a0a3a988622c2efdf089b171
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1498042
[3] https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg00698.html
[4] https://pve.proxmox.com/pipermail/pve-devel/2018-November/034327.html

Signed-off-by: Nick Chevsky <nchevsky@gmail.com>
2018-11-09 09:33:26 +01:00
Wolfgang Link
7cb345b816 fix #1691: use asynchronous API call for HD create
It should use an asynchronous API call to create an image,
because some storages may need longer to alloc an image.

If a storage needs more than 30 sec
the proxy will timeout and we have an orphan image.

Also, it is possible to increase the timeout for some
storages if an asynchronous call is used
2018-04-20 11:03:47 +02:00
Dominik Csapak
c2233c8fc2 qemu/HDEdit: move diskthrottling to advanced options
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Dominik Csapak
546d09c24e qemu/HDEdit.js: move some fields into advanced options
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Thomas Lamprecht
ef4ef788d5 use InputPanel from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
9fccc702ec use windowEdit from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
09cacce778 use KVCombobox from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
896c0d5019 use Checkbox from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +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
771aec961f use DiskStorageSelector in qemu/HDEdit.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01: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
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
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
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
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
Emmanuel Kasper
d5e771ce51 Rename 'create' to 'isCreate' in pveWindowEdit and subclasses
This fixes around 20 jslint type confusion warnings.
Also reduce the scope and document jslint warnings along the way.
No functional changes.
2017-03-02 10:36:35 +01:00
Dietmar Maurer
c8802a60b7 use auto-generated block IDs to reference online docu. 2016-10-13 11:26:06 +02:00
Emmanuel Kasper
c149681d61 fix #1113: preserve LSI controller for legacy Oses
The SCSI HW type handling will be made in the Wizard class, removing from here.
2016-09-20 17:18:19 +02:00
Emmanuel Kasper
eca87c69bc virtio-scsi-pci as default SCSI for new VMS fix #1106 2016-09-15 11:36:35 +02:00
Emmanuel Kasper
42902182c0 Rename Wizard Component aliases using camelCase
this is ExtJS recommended practise, follows most of our
conventions and is necessary for querying
components with Ext.ComponentQuery.query() without escaping the
dots in the component widget name.
2016-07-21 12:44:13 +02:00
Emmanuel Kasper
8aa37826e7 Add online help for some complex Qemu InputPanels 2016-06-01 12:39:11 +02:00
Dietmar Maurer
9cac6b7594 HDEdit: cleanup, move logic to view controller 2016-05-04 13:06:13 +02:00
Dietmar Maurer
180d7ef5b4 fix #973: disable iothread for non-virtio drives
this patch disables the iothread field, whenever the disk
is not a virtio disk, or the selected controller is not
virtio
2016-05-04 12:48:18 +02:00
Dietmar Maurer
6a0b8c26c9 GUI: use raw format for DRBD images 2016-04-15 08:23:32 +02:00
Dietmar Maurer
185a77e555 reduce translation overhead 2016-04-05 11:10:52 +02:00
Dominik Csapak
ac7db8f761 ext6migrate: change default values
since KVCombobox expects __default__ as default value
change to this in

DisplayEdit
HDEdit
KeyboardEdit
ProcessorEdit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-21 11:16:27 +01:00
Dominik Csapak
2e52404d05 ext6migrate: fix HDEdit, HDMove, HDResize
the StorageSelector fires the change event one time before data is there,
this patch catches that

also make the hdresize window wider because of the bigger font

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-18 16:09:42 +01:00
Dominik Csapak
ca6372bda7 ext6migrate: fix KVCombobox behaviour in qemu
for details see commit:
f2782813cd

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-18 16:08:50 +01:00
Dietmar Maurer
df15b3da37 copy qemu/HDEdit.js from manager to manager6 2016-03-16 09:12:22 +01:00