[pve-devel] [PATCH manager] use correct settings for nf_conntrack options in firewall panel

Dominik Csapak d.csapak at proxmox.com
Fri Mar 16 14:58:39 CET 2018


this changes the FirewallOptions back like it was before we
changed to the widget toolkit

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
needs my patch
[PATCH widget-toolkit] add labelWidth to the fieldDefaults in add_*_row
to work correctly

 www/manager6/grid/FirewallOptions.js | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/www/manager6/grid/FirewallOptions.js b/www/manager6/grid/FirewallOptions.js
index e4a084a5..4c6dc5d0 100644
--- a/www/manager6/grid/FirewallOptions.js
+++ b/www/manager6/grid/FirewallOptions.js
@@ -28,8 +28,19 @@ Ext.define('PVE.FirewallOptions', {
 	var add_boolean_row = function(name, text, defaultValue) {
 	    me.add_boolean_row(name, text, { defaultValue: defaultValue });
 	};
-	var add_integer_row = function(name, text, minValue) {
-	    me.add_integer_row(name, text, { minValue: minValue });
+	var add_integer_row = function(name, text, minValue, labelWidth) {
+	    me.add_integer_row(name, text, {
+		minValue: minValue,
+		deleteEmpty: true,
+		labelWidth: labelWidth,
+		renderer: function(value) {
+		    if (value === undefined) {
+			return Proxmox.Utils.defaultText;
+		    }
+
+		    return value;
+		}
+	    });
 	};
 
 	var add_log_row = function(name, labelWidth) {
@@ -59,9 +70,9 @@ Ext.define('PVE.FirewallOptions', {
 	    add_boolean_row('nosmurfs', gettext('SMURFS filter'), 1);
 	    add_boolean_row('tcpflags', gettext('TCP flags filter'), 0);
 	    add_boolean_row('ndp', 'NDP', 1);
-	    add_integer_row('nf_conntrack_max', 'nf_conntrack_max', 32768);
+	    add_integer_row('nf_conntrack_max', 'nf_conntrack_max', 32768, 120);
 	    add_integer_row('nf_conntrack_tcp_timeout_established',
-			    'nf_conntrack_tcp_timeout_established', 7875);
+			    'nf_conntrack_tcp_timeout_established', 7875, 250);
 	    add_log_row('log_level_in');
 	    add_log_row('log_level_out');
 	    add_log_row('tcp_flags_log_level', 120);
-- 
2.11.0





More information about the pve-devel mailing list