On 03/16/2018 10:55 AM, Dominik Csapak wrote:
> this got mixed up during the change to the widget toolkit
> also set deleteEmpty and give a renderer
>
> Signed-off-by: Dominik Csapak <[email protected]>
> ---
> changes from v1:
> * add deleteEmpty
> * add renderer
>
> this needs the widget toolkit patch:
> [PATCH widget-toolkit] add an optional renderer for integer rows in ObjectGrid
> for the renderer to work
>
> www/manager6/grid/FirewallOptions.js | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/www/manager6/grid/FirewallOptions.js
> b/www/manager6/grid/FirewallOptions.js
> index 819ebb8d..4121f90f 100644
> --- a/www/manager6/grid/FirewallOptions.js
> +++ b/www/manager6/grid/FirewallOptions.js
> @@ -29,7 +29,13 @@ Ext.define('PVE.FirewallOptions', {
> me.add_boolean_row(name, text, { defaultValue: defaultValue });
> };
> var add_integer_row = function(name, text, minValue) {
> - me.add_boolean_row(name, text, { minValue: minValue });
> + me.add_integer_row(name, text, {
> + minValue: minValue,
> + deleteEmpty: true,
> + renderer: function(value) {
> + return value || Proxmox.Utils.defaultText;
> + }
this is a common integer add function, so what when
0 is a valid, non-default value?
It work now, as the both users of this function (nf_conntrack_max,
nf_conntrack_tcp_timeout_established) do not have 0 in their valid
range...
I'd rather have this in two changesets, the change to
add_integer_row and the rest...
> + });
> };
>
> var add_log_row = function(name, labelWidth) {
>
_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel