[pve-devel] [PATCH pve-manager 1/1] sdn: controllers: add isis controller

Alexandre Derumier aderumier at odiso.com
Wed Sep 13 13:38:42 CEST 2023


---
 www/manager6/Makefile                    |  1 +
 www/manager6/Utils.js                    |  5 ++
 www/manager6/sdn/controllers/IsisEdit.js | 61 ++++++++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 www/manager6/sdn/controllers/IsisEdit.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 59a5d8a7..6d6d8b1e 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -277,6 +277,7 @@ JSSRC= 							\
 	sdn/controllers/Base.js				\
 	sdn/controllers/EvpnEdit.js			\
 	sdn/controllers/BgpEdit.js			\
+	sdn/controllers/IsisEdit.js			\
 	sdn/IpamView.js					\
 	sdn/ipams/Base.js				\
 	sdn/ipams/NetboxEdit.js				\
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 6d4842df..77c5f91c 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -895,6 +895,11 @@ Ext.define('PVE.Utils', {
 	    ipanel: 'BgpInputPanel',
 	    faIcon: 'crosshairs',
 	},
+	isis: {
+	    name: 'isis',
+	    ipanel: 'IsisInputPanel',
+	    faIcon: 'crosshairs',
+	},
     },
 
     sdnipamSchema: {
diff --git a/www/manager6/sdn/controllers/IsisEdit.js b/www/manager6/sdn/controllers/IsisEdit.js
new file mode 100644
index 00000000..2e333fa5
--- /dev/null
+++ b/www/manager6/sdn/controllers/IsisEdit.js
@@ -0,0 +1,61 @@
+Ext.define('PVE.sdn.controllers.IsisInputPanel', {
+    extend: 'PVE.panel.SDNControllerBase',
+
+    onlineHelp: 'pvesdn_controller_plugin_evpn',
+
+    onGetValues: function(values) {
+        var me = this;
+
+        if (me.isCreate) {
+            values.type = me.type;
+	    values.controller = 'isis' + values.node;
+        } else {
+            delete values.controller;
+        }
+
+        return values;
+    },
+
+    initComponent: function() {
+	var me = this;
+
+	me.items = [
+	    {
+		xtype: 'pveNodeSelector',
+		name: 'node',
+		fieldLabel: gettext('Node'),
+		multiSelect: false,
+		autoSelect: false,
+		allowBlank: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'isis-domain',
+		fieldLabel: 'Domain',
+		allowBlank: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'isis-net',
+		fieldLabel: 'Network entity title',
+		allowBlank: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'isis-ifaces',
+		fieldLabel: gettext('Interfaces'),
+		allowBlank: false,
+	    },
+	];
+
+	me.advancedItems = [
+	    {
+		xtype: 'textfield',
+		name: 'loopback',
+		fieldLabel: gettext('Loopback Interface'),
+	    },
+	];
+
+	me.callParent();
+    },
+});
-- 
2.39.2





More information about the pve-devel mailing list