170 Commits

Author SHA1 Message Date
Thomas Lamprecht
f1df7184bf use BondModeSelector & BondPolicySelector from widget toolkit
widget name stayed the same, so no need to change

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
b7c72c0e89 use LanguageSelector 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
Dominik Csapak
42ec18721b use Proxmox.Utils instead of PVE.Utils
some function are now in Proxmox.Utils instead, so we have to use that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:38 +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
Dominik Csapak
a87cf601d6 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
9c5bb73a8a use ComboGrid 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
6025e7b4a4 add defaultSize parameter for DiskStorageSelector and set it to 8 for lxc
we had it previously on 8GB for containers, but with the refactoring,
this got lost. this patch changes this back

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-11 12:01:23 +01:00
Emmanuel Kasper
46d1ca8428 Do not translate PC hardware specific terms
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-11-28 11:24:52 +01:00
Dominik Csapak
0425782641 reset FileSelector grid when changing the storage
otherwise, when the new storage returns an error, we show the content
of the old storage

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
002a44bdcd add new DiskStorageSelector.js
this is a wrapper for selecting a storage/disk image

it is a simple container with 4 form fields inside
which can be reused, whenever we need to select a storage for a disk,
image etc.

we have code similar to this four times already
(qemu image creation, lxc mp creation, qemu cloning, qemu efidisk
creation)

so it was time to refactor this and use the storage information from the
backend instead of hardcoding values in the frontend

for this we need to pass the format=1 parameter to the storage api call,
and to not load the fileselector when it is initially disabled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Emmanuel Kasper
9f67d8f117 Render full name of VirtIO Block controller
This will hopefully reduce confusion with SCSI VirtIO controller

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:24 +02: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
3566d3346f ui: add VM ComboSelector
this is a mixture of the multi select VMSelector and the single
select pveGuestIDSelector.
Useful when a single VM must be selected but also complementary
information should be shown to the user.

Most of the times the VMID is not really useful for an user as
numbers are harder to remember and to associate as names.
So a dialog which need a VMID (e.g. HA resource addition) forced the
user to lookup the Guest Name -> Guest VMID mapping and then enter it
correctly in the respective input field.

This can be improved by using a combo grid based selector which shows
additional information in the edit window itself, can be sorted and
filtered to quickly select a guest.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-16 14:54:00 +02:00
Dominik Csapak
3a738a3dea fix #1531: match nodename exactly for vmidselector
else we would get vms for wrong hosts if the nodename is a pre/postfix
of another nodename (e.g. 'abc' and 'abc123')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-16 11:23:20 +02:00
Dominik Csapak
6e198c8f49 add CephPoolSelector
this allows us to give the user a list of pve managed ceph pools

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-07 12:35:14 +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
a150a3d32e fix nodeselector when no element in the tree is selected
it can happen that nothing in the tree is selected,
then PVE.curSelectedNode is undefined, generating an exception there.
so we check if this is available

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-08-22 10:27:03 +02:00
Thomas Lamprecht
851c032d69 ComboGrid: open picker also when focusing an editable field
ComboBoxes provided by UI frameworks normally show their selection
possibilities once focused, ExtJS does this too but not on editable
(and thus filterable) input fields. Add a logic which allows this too
and streamlines the behavior of ComboGrid/Box like components.

To avoid a glitch, where clicking the "picker trigger" (the down
arrow which normally toggles the selection picker) would first focus
the element - thus expanding it - and only then causing a toggle
which collapses it again, we overwrite the 'Ext.form.trigger.Trigger'
onMouseDown so that we can skip a expansion on this event.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-07-26 15:37:05 +02:00
Thomas Lamprecht
9ecabc38e2 FileStore: make editable to allow filtering
Making this ComboGrid based component editable allows implicit
filtering the backing store.
This is quite helpful on file selection, as for example the ISO file
selector from the create wizard is.
Clear the filter (and its displayed value) on store selection change,
as there the filter becomes void - at least this is a simple and easy
solution without glitches.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-07-26 15:37:05 +02:00
Thomas Lamprecht
bff876ecb5 ComboGrid: improve setting 'editable' default value
This allows child classes to use another default, the initialConfig
didn't allowed that.
This is also the ExtJS like way to set defaults.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-07-26 15:37:05 +02:00
Thomas Lamprecht
4c96d9fa2b FileSelector: adapt combogrid total and column width
By default the "Size" column ellipsed a lot entries, which is just
annoying. Adapt it so that all sizes can be viewed comfortably.

Further increase the total width of this combogrid, a lot less could
be seen there since theme change from the 4.X era.
Use an new empirical found out good  working value.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-07-26 15:37:05 +02:00
Thomas Lamprecht
5b0419a08b replica: improve schedule format example
Add one more to show that also weekdays + intervals are possible

Further improve wording + reduce translation needs for others entries.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-06-28 11:31:39 +02:00
Dominik Csapak
5d517deb0e add calendarevent form field
this is a freely editable combobox, which shows five usable examples and
their syntax, allowing users to deduct how the syntax works without
reading documentation

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-14 07:32:59 +02:00
Dominik Csapak
7a995680a2 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
20565f0c36 filter templates in bulk start/stop
because we cannot start/stop templates

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-04-20 06:22:22 +02:00
Dominik Csapak
a75f696f5b add skylake to cpu types
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-04-20 06:14:22 +02:00
Dominik Csapak
c5dc0be54c fix #1317: check wizard form also on validitychange
with the commit
    f4dffc882a88e77aced47677329e7690f9d7124e
we introduced a validator on the guestidselector, but did not
notice that the wizard checks the validity on the field change event,
but the selector gets valid/invalid in an api callback(so a little later)

with this patch, we now validate the field correctly with validate()
and also listen on the validitychange event to catch it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-03-27 08:33:50 +02:00
Thomas Lamprecht
8a3b1473d3 VMSelctor: add HA state and allow to filter with it
This allows also to filter after HA states, so one may bulk control
HA managed services more easily or do bulk actions just on unmanaged
VMs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-03-16 09:01:05 +01:00
Dominik Csapak
f4dffc882a use validator for GuestIDSelector and optimize labels
instead of using markInvalid, use a validator, which also marks the
field dirty and marks the form correctly invalid.

also optimize the label/error message assignments

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-03-09 10:55:31 +01:00
Dominik Csapak
09101cdd74 show nodeselector errors only if a node is selected
otherwise we get the error:

'Node seems to be offline'

if we do not have a node selected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-03-09 10:53:58 +01:00
Dominik Csapak
f130ed30e3 fix #1299: sort pools in poolselector by default
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-03-03 12:23:31 +01:00
Dominik Csapak
6fbae489ae fix gettext strings
we expect a gettext on a single line and to not contain any
variable/logic, so we remove the long text from it altogether (since we
do not want to translate that at the moment), and we rearrange the code
so that gettext only contains strings

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 12:14:12 +01:00
Dominik Csapak
cd371b8b61 show only relevant vms in bulk action window
this adds a default filter for bulk start and stop, so that only the
relevant vms are visible (stopped and started respectively)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 08:18:35 +01:00
Dominik Csapak
1d5b91a42f add vmselector form field
this is a form field which is a grid for selecting vms

if nodename is given, it will filter the vms only to the given node

you can filter the grid with the column header, and only the selected
and visible items are in the value of the field

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-05 15:58:41 +01:00
Dominik Csapak
c7cf5c25da validate nodeselector after store is loaded
this shows the validation status immediatly if no node is selected (for
instance because no node is online or you have only one node and open
the migration window)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-12-19 12:06:00 +01:00
Dominik Csapak
9d43cfefa3 set fixed height on global search window
the buffered renderer does not work with auto height, and was disabled.
to enable it, we set a fixed height

when nothing is found, display 'none' to indicate nothing was found

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-12-19 12:03:40 +01:00
Emmanuel Kasper
dd0f5ef3d5 Convert the VMIDSelector to a generic GuestIDSelector
This allows to display a 'CT', a 'VM', or a 'CT/VM' label
to be displayed, depending on the context.

Currently when restoring a CT backup or creating a CT via the
wizard, we are asked to enter a  *VM* ID, which is confusing.
2016-12-19 07:31:27 +01:00
Dominik Csapak
c7db4f54b2 make realmselector non-editable
since most people do not have many login realms to choose from, making
this search/editable makes no sense

but by making this non-editable, you can now click anywhere on the text
to open the options, instead of only the little arrow

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-12-09 10:20:19 +01:00
Dominik Csapak
7f898bcd2f fix #1176: sort user/group/realm selector
this adds a default sort for the user, group and realmselector
so that the entries are in a consistent order

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-12-09 10:20:07 +01:00
Dominik Csapak
9de96055fc fix kvcombobox validator
since we often use the kvcombobox not statically but load its store at
runtime, we need to check the store and not the comboItems

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-23 12:09:37 +01:00
Dominik Csapak
f5096e8e39 check for array in disallowednodes filter
extjs throws an error if disallowednodes is not an array,
so we need to check this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-22 16:38:29 +01:00
Thomas Lamprecht
b6eb65687b NodeSelector: add disallowedNodes configuration property
This can be used to mask out some nodes from the node selector.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-19 09:51:14 +01:00
Dominik Csapak
a7c2cda748 add kvcombobox validator
this enables validation of all kvcomboboxes, including
multiselect

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-18 10:30:08 +01:00
Dominik Csapak
e2636c7d0c only allow integers in memoryfield
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-02 17:14:54 +01: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