16 Commits

Author SHA1 Message Date
Dominik Csapak
1c3e19a745 fix #1635: correctly change maxIds in ControllerSelector in wizard
we want to change the maxIds value even when not rendered, since
in the wizard, the controller can change from a different panel in the
tabpanel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-31 14:03:39 +01:00
Dominik Csapak
9fcbafbece 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
Emmanuel Kasper
fcc7323452 Do not use the noVirtIO property to build the controller list
This property is only used for CDEdit, so we can deduce this from
the fact that autoselect is set to 'cdrom'

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Emmanuel Kasper
b5903795ed Save the components we found via down() in a variable for later reuse.
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Emmanuel Kasper
6f52be5c86 Remove unused noScsi parameter
SCSI is a valid bus for Disks and CD drives, so it should always
be appear in the bus list.

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Emmanuel Kasper
e3ec1b2ee4 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
4591404694 disk/controllerselector: adapt flex
The bus tye selector gets now 2/3 of the space and the bus number
spinner gets 1/3.

It looked a bit strange with both of them getting half of the space,
as on a lot of GUIs the spinner get less space (its just a number
(max 13) vs a wider text).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-01 11:07:43 +02:00
Dominik Csapak
9346100128 add pveIntegerField and use it
this adds a subclass of Ext.form.field.Number with the settings for
Integers (allowDecimals: false and allowExponential: false and default
step size 1)

and use it where we only accept integers

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-02 17:14:06 +01:00
Emmanuel Kasper
6c25fc85d1 Fix jslint warning: 'sortedList' is already defined
sortedList was defined twice in the function
remove the declaration at the beginning of function as declaring a var
just before using it is more similar to the rest of code
2016-10-11 07:02:57 +02:00
Emmanuel Kasper
e02ef3f592 Move bus priority list to OSDefaults
So a field container does not need to know if Linux likes SCSI.
2016-10-11 07:02:33 +02:00
Dietmar Maurer
74f4a7cf55 simplify code, improve sort order 2016-10-07 08:12:52 +02:00
Emmanuel Kasper
4b5a4f102f When adding a new hard disk, use the most used controller as suggested value
This is a complementary fix for #1105 (Create Linux VM Wizard: use scsi
as default bus/device) and add some logic to the list of controllers
presented in the ControllerSelector combo box

Since we can have IDE, SCSI, Virtio(blk) as a controller during installation,
based on OS detection and personal preferences, we can reasonably assume
on 80 % of cases it will be the same controller we want to use for the
next time we add a hardisk.

This allows backward compatibility for Linux guests which were proposed a
virtio-blk as first choice, and also helps newly created Linux VMs by proposing
SCSI.
2016-10-07 07:05:53 +02:00
Emmanuel Kasper
7c77d84811 USe PVE.qemu.OSDefaults statics to get defaults for NIC and Storage Controller 2016-07-21 12:50:27 +02:00
Emmanuel Kasper
07e905dc07 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
Dominik Csapak
e3b60008ab remove displayfield height hack
this did not work anymore,
instead overwrite css for displayfields to have correct
min-height

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-06 16:29:35 +02:00
Dietmar Maurer
bd5d277292 rename manager5 to manager6 2016-01-22 11:24:10 +01:00