[pve-devel] [PATCH manager] firewall: add scope field to IPRefSelector

Leo Nunner l.nunner at proxmox.com
Wed Jun 7 12:17:51 CEST 2023


and send the scoped value to the firewall when choosing new values.
This happens for both IPSets and aliases.

Signed-off-by: Leo Nunner <l.nunner at proxmox.com>
---
 www/manager6/form/IPRefSelector.js | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/www/manager6/form/IPRefSelector.js b/www/manager6/form/IPRefSelector.js
index 9ccc2fe10..69bb139d6 100644
--- a/www/manager6/form/IPRefSelector.js
+++ b/www/manager6/form/IPRefSelector.js
@@ -8,7 +8,7 @@ Ext.define('PVE.form.IPRefSelector', {
 
     ref_type: undefined, // undefined = any [undefined, 'ipset' or 'alias']
 
-    valueField: 'ref',
+    valueField: 'scope',
     displayField: 'ref',
     notFoundIsValid: true,
 
@@ -65,17 +65,27 @@ Ext.define('PVE.form.IPRefSelector', {
 		hideable: false,
 		width: 140,
 	    },
+	    {
+		header: gettext('Scope'),
+		dataIndex: 'scope',
+		hideable: false,
+		width: 140,
+	    },
 	    {
 		header: gettext('Comment'),
 		dataIndex: 'comment',
 		renderer: Ext.String.htmlEncode,
+		minWidth: 60,
 		flex: 1,
 	    },
 	);
 
 	Ext.apply(me, {
 	    store: store,
-            listConfig: { columns: columns },
+            listConfig: {
+		columns: columns,
+		width: 500,
+	    },
 	});
 
 	me.on('change', disable_query_for_ips);
-- 
2.30.2






More information about the pve-devel mailing list