[PATCH pve-manager v5 40/46] ui: sdn: add prefix list selector

Stefan Hanreich
2026-05-05T15:43:38Z

A UI component that provides a dropdown for selecting prefix lists.
This will be used in various places that allow defining a prefix
lists, e.g. when applying route filtering to fabric settings.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
www/manager6/Makefile | 1 +
www/manager6/sdn/PrefixListSelector.js | 31 ++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
create mode 100644 www/manager6/sdn/PrefixListSelector.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index ed380b632..615e68662 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -310,6 +310,7 @@ JSSRC= \
sdn/IpamEdit.js \
sdn/OptionsPanel.js \
sdn/RouteMapSelector.js \
+ sdn/PrefixListSelector.js \
sdn/controllers/Base.js \
sdn/controllers/EvpnEdit.js \
sdn/controllers/BgpEdit.js \
diff --git a/www/manager6/sdn/PrefixListSelector.js b/www/manager6/sdn/PrefixListSelector.js
new file mode 100644
index 000000000..e871c3a39
--- /dev/null
+++ b/www/manager6/sdn/PrefixListSelector.js
@@ -0,0 +1,31 @@
+Ext.define('PVE.sdn.PrefixListSelector', {
+ extend: 'Proxmox.form.ComboGrid',
+ alias: 'widget.pveSDNPrefixListSelector',
+
+ displayField: 'id',
+
+ deleteEmpty: true,
+ editable: false,
+ allowBlank: true,
+ autoSelect: false,
+
+ store: {
+ autoLoad: true,
+ model: 'PVE.sdn.PrefixList',
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/cluster/sdn/prefix-lists',
+ },
+ },
+ listConfig: {
+ columns: [
+ {
+ header: gettext('Name'),
+ dataIndex: 'id',
+ hideable: false,
+ flex: 1,
+ },
+ ],
+ },
+});
+
--
2.47.3