This allows the user to select a specific network type which will be
used for the ospf interface.

Signed-off-by: Gabriel Goller <[email protected]>
---
 .../sdn/fabrics/ospf/InterfacePanel.js        | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/www/manager6/sdn/fabrics/ospf/InterfacePanel.js 
b/www/manager6/sdn/fabrics/ospf/InterfacePanel.js
index 29f0502fac36..d7f722be5055 100644
--- a/www/manager6/sdn/fabrics/ospf/InterfacePanel.js
+++ b/www/manager6/sdn/fabrics/ospf/InterfacePanel.js
@@ -1,3 +1,52 @@
+Ext.define('PVE.sdn.Fabric.Ospf.NetworkTypeSelector', {
+    extend: 'Proxmox.form.ComboGrid',
+    alias: ['widget.pveOspfNetworkTypeSelector'],
+
+    valueField: 'name',
+    displayField: 'name',
+
+    emptyText: 'auto',
+
+    listConfig: {
+        columns: [
+            {
+                header: gettext('NetworkType'),
+                dataIndex: 'name',
+                hideable: false,
+                sortable: true,
+                flex: 3,
+            },
+        ],
+        width: 360,
+    },
+
+    store: {
+        fields: ['name'],
+        data: [
+            {name: 'broadcast'},
+            {name: 'non-broadcast'},
+            {name: 'point-to-multipoint'},
+            {name: 'point-to-point'},
+        ],
+    },
+});
+
 Ext.define('PVE.sdn.Fabric.Ospf.InterfacePanel', {
     extend: 'PVE.sdn.Fabric.InterfacePanel',
+
+    additionalColumns: [
+        {
+            text: gettext('Network Type'),
+            xtype: 'widgetcolumn',
+            dataIndex: 'network_type',
+            flex: 1,
+            widget: {
+                xtype: 'pveOspfNetworkTypeSelector',
+                isFormField: false,
+                bind: {
+                    disabled: '{record.isDisabled}',
+                },
+            },
+        },
+    ],
 });
-- 
2.47.3




Reply via email to