170 Commits

Author SHA1 Message Date
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
Dominik Csapak
fdfada20a1 rename alias of some form fields, and remove brackets
to be conform with the rest of the code

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-13 07:46:46 +02:00
Dominik Csapak
c68c743659 only use exact match in pveRealmSelector
store.findRecord returns the first match, and by default
matches the beginning of the strings not the whole

without this, with multple realms with the same name, but different
tfa settings, the login window can show the tfa input box even
when the selected realm has no tfa active

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-08-17 12:35:00 +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
6fb4c0a693 give comment in bridgeselector more space
change the default column widths, to give more space
to the comment column

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-07-12 14:43:54 +02:00
Dominik Csapak
e7a0c23d13 fix #757: show the bridge comment in the selector
this shows the comment of the bridge in the selector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-30 14:06:59 +02:00
Dominik Csapak
701cd8ca81 add globalsearchfield
this adds a field, the globalsearchfield

its use is to search across our resources (vm,nodes,storage,pools)
quickly and from everywhere

it filters by taking each word you write, and gives
points to resources based on how often the word matches or
if it is an exact match for a field (details in source), and
sorts after this relevance number

with enter or click on an entry, you go directly to the selected
resource

also supports key up/down selecting of the entries and
toggling the search globally with ctrl+space or ctrl+shift+f

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-21 10:23:38 +02:00
Dominik Csapak
db7d6c2cd9 make viewselector stateful
to save the view across browser refresh/sessions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-16 16:33:59 +02:00
Dominik Csapak
3f8ba9eb56 htmlEncode some comment fields
this adds Ext.String.htmlEncode as renderer
for some comment/description fields

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-09 17:40:03 +02:00
Emmanuel Kasper
39113202f7 Rename the SCSI VirtIO controller to better differenciate from VirtIO blk
Also fix casing to match VirtIO as displayed in Network Panel
2016-06-08 12:43:09 +02:00
Emmanuel Kasper
dc1fff7c06 Case fix for VMware
Closes: #778
2016-06-08 12:42:08 +02:00
Dominik Csapak
fd42059338 allow tagging of vlan 1 in gui
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-18 11:32:15 +02:00
Dominik Csapak
5ef690e497 change hotplugselector to checkboxes
the hotplugselector was not good to use,
and the options were confusing (empty was the default value, etc)

now we have checkboxes for each value, and if none are selected,
hotplug is disabled

also fixes the renderer when hotplug is set to '1' which
just means the default of 'disk,network,usb'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-17 06:15:53 +02:00
Dominik Csapak
1f0e036f3e rename enableAfterLoad to enableLoadMask
also add an explaining comment

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-03 11:19:35 +02:00
Dominik Csapak
1a379eb737 fix combogrid multiselect bug
this fixes a nasty combogrid/multiselect/storeload bug
in which the value of a combogrid gets set to a string instead
of an array, under certain circumstances

we overwrite the getRawValue method of our ComboGrid,
and on multiselect ComboGrids, we just get the value out of
me.rawValue, else we call the method of the parent class

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-03 06:01:09 +02:00
Dominik Csapak
a548bca990 jslint: fix access to uninitialized variable
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:09:17 +02:00
Dominik Csapak
67796bbcd6 jslint: change (x)?x:y to x || y
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:08:51 +02:00
Dominik Csapak
79786b96e5 jslint: fix missing or extra semicolon
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:07:42 +02:00
Dominik Csapak
14986f7491 jslint: remove trailing commas
before ECMA5 trailing commas in arrays and objects
are forbidden

in jslint this is an error and cannot be deactivated

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:06:34 +02:00
Dominik Csapak
1b51cd2a29 jslint: fix type confusion and property access
fix various type confusion, for example:
items: {} and items: []
style: string and style: {}

also fix object['property'] access with
object.property

also fix /=/ with either '=' or /\=/ where appropriate
(/=/ can be confused with /= according to jslint)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:06:23 +02:00
Dominik Csapak
0a9c8d7283 fix securitygroupselector
move the display and value field into class definition,
to make it work again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-26 12:02:15 +02:00
Dominik Csapak
acf0ff4553 do not disable a combogrid when it loads
instead of disabling a combogrid when its store loads,
we make the gridpanel bigger, to show its loading mask

since we do not disable/enable anymore, we have no reason
to suspend/resume the validitychange event anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-22 10:32:10 +02:00
Dominik Csapak
a76103de76 add enableKeyEvents to combogrid
to reenable the 'del' and 'backspace' keys

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-22 10:27:30 +02:00
Dominik Csapak
473353d146 fix #143: add disk/mem percent sort
previously, we had a disk/memory usage column in the resource grid,
whose raw data were the bytes used, but we added a renderer
to display it as percentage

with this, the columns sorted by bytes and not by percentage,
which made the column rather confusing

with this patch, we add a real percentage column (where the
data is a float from 0 to 1) so it sorts correctly

also make the old columns show the used size in B/KiB/etc.
by default we still only show the percentage column

since the disk usage part was always zero with qemu guests,
leave it empty there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-20 09:36:23 +02:00
Emmanuel Kasper
a9648afabe Recheck field validation after manually enabling the input field of a ComboGrid
Calling setDisabled(true) on a component makes it valid, but calling setDisabled(false) afterwards did not retrigger a validation check

This fixes a serious bug which was happening in the following
conditions, for instance in the template tab of LXC Wizard:
1) user selects a storage
2) this triggers a reload of a related combogrid
3) this combogrid is marked valid, although its value is empty and it had allowedBlank: false
2016-04-12 17:10:50 +02:00
Dominik Csapak
c92d382579 change minValue of VLAN tag to 2
since linux bridges have untagged traffic on vlan1,
we cannot set this value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-08 16:58:48 +02:00
Dominik Csapak
6ad9d884fb change order of weekdays
to be consistent with the grid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-07 16:57:35 +02:00
Dominik Csapak
c800ce6769 add weekdays to comboitems at runtime
the translation of extjs has not been applied
at the time of class declaration, so that
the weekdays were always "Sunday", "Monday", etc.

when we declare them in initComponent, the translations are there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-06 16:36:29 +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
Thomas Lamprecht
d0f1b9ab78 IPRefSelector: fix selection
move valueField and displayField to class config, else the value
of the selection wont show up when selecting it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-04-01 13:25:00 +02:00
Dominik Csapak
44a64147c6 move valueField and displayField to class config
if we do not do this, we cannot select items
(used in the clone window for example)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-01 13:22:43 +02:00
Dominik Csapak
5ce8f81f3b fix compression selection in backup window
we wrongly assumed, that no compression argument for
vzdump meant 'no compression', instead it means 'lzo'

this patch mirrors that behaviour on the gui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-31 17:10:10 +02:00
Dominik Csapak
ad1b482b2d ext6migrate: add Haswell and Broadwell noTSX
these were missing in manager6

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-21 11:16:13 +01:00
Dominik Csapak
8744c4a6d8 ext6migrate: Qemu Bios Selector fixes
add render function for Qemu Bios,
and change data to comboItems and '' to '__default__'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-21 11:15:50 +01:00
Dietmar Maurer
cd7c40e6b4 copy form/QemuBiosSelector.js from manager to manager6 2016-03-18 15:42:36 +01:00
Dominik Csapak
60fdf1975a formatting and trailing whitespaces fix
fix format of commit
0a58709503d3dd2e444d00f9d205a231545302f1
(space before 'load')

also fix trailing whitespaces in those files

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-15 16:31:02 +01:00
Dominik Csapak
0a58709503 ext6migrate: fix store load race condition
when we click on a node/container/vm and quickly
click on something else, there might be a race condition,
where the store finished loading and we try to change
dom elements, which are not there anymore

so we change the store.on to me.mon, which
deletes the handler when the component is gone

in the logview panel we use API2Request, where
we cannot do this, so we check if the component
is destroyed manually

also we change this whenever we change a dom element
in a callback

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-14 17:16:37 +01:00
Dominik Csapak
e62beb78a9 ext6migrate: fix trailing whitespaces
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-08 11:26:29 +01:00
Dominik Csapak
bff3359e1d ext6migrate: fix NodeSelector
the intial value of the node selector is null,
but when the store is loaded, it becomes an empty array

this triggers the 'dirtychanged' event and causes
the edit windows to enable the OK/Submit Button,
even when no change is made

this fix sets the default value to an empty array,
which fixes the mentioned behaviour

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-08 11:25:57 +01:00
Dominik Csapak
b70f975672 ext6migrate: fix User and Role selector
we have to move the static fields to the class
configuration, otherwise the combobox does not work

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-08 11:25:17 +01:00
Dominik Csapak
0cf07745ea ext6migrate: fix typo in ContentTypeSelector
it is comboItems not comboItem

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-08 11:24:58 +01:00
Emmanuel Kasper
548b29644d adapt KVComboBoxes to pass store items using 'comboItems' parameter
we used a custom 'data' property to pass around the items to
add to the store, but this property is now used by ExtJS to
store content for the component template

also move to declarative style, saves lines
2016-03-04 06:17:25 +01:00
Dominik Csapak
5fcb5c8c6f ext6migrate: fix selection of ComboGrid
if one selected an item in a ComboGrid which was already selected,
the ComboGrid would not close (as expected), this patch fixes this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-04 06:13:22 +01:00
Emmanuel Kasper
4cf02a6a14 move component properties to prototype body
this is needed for 'displayField'

also remove redundant truthiness test which is also
taking place at the beginning of setNodeName()
2016-02-29 16:52:27 +01:00
Emmanuel Kasper
f8cde33a63 adapt BondSelector to our ExtJS6 KVComboBox parameters 2016-02-29 16:52:12 +01:00
Dominik Csapak
7515e62236 ext6migrate: fix model behaviour for KVComboBox
we used an empty value for the Key-Value ComboBox for defaults.
With extjs6, if the idProperty of a model is empty, they generate
a name for it, which breaks our logic for submitting
(currently we checked if this is empty, and send a delete command
to our api)
instead, we use the value 'default' and check for it when we submit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-02-29 15:27:15 +01:00
Emmanuel Kasper
ad6569d8b2 load the store later, move non-dynamic properties and methods to class body
this fixes two problems:
 * we were loading the store before the parent ComboGrid class could put
  a listener on the load event
  * displayField must now be set in class body, take opportunity to move out
  what we can of the mega initComponent()

this two fixes allow the HA GroupEdit  Window to properly display the
existing members of a HA Group when editing group membership
2016-02-26 07:38:50 +01:00
Emmanuel Kasper
a0b5883841 change xtype name to follow ExtJS and our own conventions
this also fixes the problem that the method
Ext.ComponentQuery.query() was outputting a warning
since it did not know if it should perform a  lookup
for a class name or a xtype
2016-02-26 07:37:29 +01:00