From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id D40F26C273 for ; Mon, 22 Feb 2021 11:16:27 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C89DD2D8C8 for ; Mon, 22 Feb 2021 11:16:27 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 2FD9B2D8BE for ; Mon, 22 Feb 2021 11:16:27 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E8C3941F20 for ; Mon, 22 Feb 2021 11:16:26 +0100 (CET) From: Aaron Lauterer To: pve-devel@lists.proxmox.com Date: Mon, 22 Feb 2021 11:16:25 +0100 Message-Id: <20210222101626.19240-1-a.lauterer@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.019 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager 1/2] ui: FirewallRules: make columns flexible X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2021 10:16:27 -0000 Changing the width definitions to use flex will make better use on larger monitors. Changing the `width` parameter to `minWidth` ensures that on smaller screens it is still usable, though some horizontal scrolling might be necessary. Signed-off-by: Aaron Lauterer --- www/manager6/grid/FirewallRules.js | 38 ++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js index c3b8fa53..5a2241a0 100644 --- a/www/manager6/grid/FirewallRules.js +++ b/www/manager6/grid/FirewallRules.js @@ -627,7 +627,8 @@ Ext.define('PVE.FirewallRules', { // similar to xtype: 'rownumberer', dataIndex: 'pos', resizable: false, - width: 42, + minWidth: 42, + flex: 1, sortable: false, align: 'right', hideable: false, @@ -658,7 +659,8 @@ Ext.define('PVE.FirewallRules', { me.updateRule(data); }, }, - width: 50, + minWidth: 50, + flex: 2, }, { header: gettext('Type'), @@ -666,7 +668,8 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('type', value, metaData, record); }, - width: 50, + minWidth: 50, + flex: 2, }, { header: gettext('Action'), @@ -674,7 +677,8 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('action', value, metaData, record); }, - width: 80, + minWidth: 80, + flex: 3, }, { header: gettext('Macro'), @@ -682,7 +686,8 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('macro', value, metaData, record); }, - width: 80, + minWidth: 80, + flex: 3, }, ]; @@ -693,7 +698,8 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('iface', value, metaData, record); }, - width: 80, + minWidth: 80, + flex: 3, }); } @@ -704,7 +710,8 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('source', value, metaData, record); }, - width: 100, + minWidth: 100, + flex: 4, }, { header: gettext('Destination'), @@ -712,7 +719,8 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('dest', value, metaData, record); }, - width: 100, + minWidth: 100, + flex: 4, }, { header: gettext('Protocol'), @@ -720,7 +728,8 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('proto', value, metaData, record); }, - width: 100, + minWidth: 100, + flex: 3, }, { header: gettext('Dest. port'), @@ -728,7 +737,8 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('dport', value, metaData, record); }, - width: 100, + minWidth: 100, + flex: 4, }, { header: gettext('Source port'), @@ -736,7 +746,8 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('sport', value, metaData, record); }, - width: 100, + minWidth: 100, + flex: 3, }, { header: gettext('Log level'), @@ -744,12 +755,13 @@ Ext.define('PVE.FirewallRules', { renderer: function(value, metaData, record) { return render_errors('log', value, metaData, record); }, - width: 100, + minWidth: 100, + flex: 3, }, { header: gettext('Comment'), dataIndex: 'comment', - flex: 1, + flex: 6, renderer: function(value, metaData, record) { return render_errors('comment', Ext.util.Format.htmlEncode(value), metaData, record); }, -- 2.20.1