this is a major rework of the memory inputpanel
previously we had to select fixed/variable and
could set shares/ballooning, depending on what was selected
now the panel is much simpler:
non advanced:
memory: the target maximum memory
advanced:
min-memory: the minimum memory, if different from the memory field
we have 'dynamic' memory
shares, only if we have 'dynamic' memory
ballooning-device: better naming, deactivates the ballooning device
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
instead of directly setting the minvalue when the maxvalue is lower
we invalidate it and only on blur we set the minvalue
without this we lose the minvalue when editing only the maxvalue
e.g.:
Max: 2048
Min: 1024
if we now edit the maxvalue to 4096, on pressing the '4', we are
setting the minvalue to '4' because 4 is lower than 1024
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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>
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>
when using fixed memory size, we implicitly deleted shares and
ballon, which removed a (manually) set balloon: 0,
to be able to set this via the gui, we add a checkbox to the fixed
memory edit (using variable memory always needs ballooning)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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>
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.
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>
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>