public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Duerr <h.duerr@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Jonatan Crystall <jonatan.crystall@gwdg.de>
Subject: [pve-devel] [PATCH pve-manager v4 1/1] ipam: add UI dialog for nautobot ipam plugin
Date: Tue,  6 May 2025 11:00:41 +0200	[thread overview]
Message-ID: <20250506090041.53080-4-h.duerr@proxmox.com> (raw)
In-Reply-To: <20250506090041.53080-1-h.duerr@proxmox.com>

Co-authored-by: Jonatan Crystall <jonatan.crystall@gwdg.de>
Co-authored-by: Lou Lecrivain <lou.lecrivain@wdz.de>
Signed-off-by: Hannes Duerr <h.duerr@proxmox.com>
---
 www/manager6/Makefile                  |  1 +
 www/manager6/Utils.js                  |  5 +++
 www/manager6/sdn/ipams/NautobotEdit.js | 62 ++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 www/manager6/sdn/ipams/NautobotEdit.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index fdf0e816..e873e6c5 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -296,6 +296,7 @@ JSSRC= 							\
 	sdn/IpamView.js					\
 	sdn/ipams/Base.js				\
 	sdn/ipams/NetboxEdit.js				\
+	sdn/ipams/NautobotEdit.js			\
 	sdn/ipams/PVEIpamEdit.js			\
 	sdn/ipams/PhpIpamEdit.js			\
 	sdn/DnsView.js					\
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 1f6778cd..a95c21ce 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -942,6 +942,11 @@ Ext.define('PVE.Utils', {
 	    ipanel: 'PhpIpamInputPanel',
 	    faIcon: 'th',
 	},
+	nautobot: {
+	    name: 'Nautobot',
+	    ipanel: 'NautobotInputPanel',
+	    faIcon: 'th',
+	},
     },
 
     sdndnsSchema: {
diff --git a/www/manager6/sdn/ipams/NautobotEdit.js b/www/manager6/sdn/ipams/NautobotEdit.js
new file mode 100644
index 00000000..46162d98
--- /dev/null
+++ b/www/manager6/sdn/ipams/NautobotEdit.js
@@ -0,0 +1,62 @@
+Ext.define('PVE.sdn.ipams.NautobotInputPanel', {
+    extend: 'PVE.panel.SDNIpamBase',
+
+    onlineHelp: 'pvesdn_ipam_plugin_nautobot',
+
+    onGetValues: function(values) {
+        var me = this;
+
+	if (me.isCreate) {
+	    values.type = me.type;
+	} else {
+	    delete values.ipam;
+	}
+
+	return values;
+    },
+
+    initComponent: function() {
+	var me = this;
+
+	me.column1 = [
+	    {
+		xtype: me.isCreate ? 'textfield' : 'displayfield',
+		name: 'ipam',
+		maxLength: 10,
+		value: me.zone || '',
+		fieldLabel: 'ID',
+		allowBlank: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'token',
+		fieldLabel: gettext('Token'),
+		allowBlank: false,
+	    },
+	];
+	me.column2 = [
+	    {
+		xtype: 'textfield',
+		name: 'url',
+		fieldLabel: gettext('URL'),
+		allowBlank: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'namespace',
+		fieldLabel: gettext('Namespace'),
+		allowBlank: false,
+	    },
+	];
+	me.columnB = [
+	    {
+		xtype: 'pmxFingerprintField',
+		name: 'fingerprint',
+		value: me.isCreate ? null : undefined,
+		deleteEmpty: !me.isCreate,
+	    },
+	];
+
+	me.callParent();
+    },
+});
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-05-06  9:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06  9:00 [pve-devel] [PATCH pve-network v4 1/2] ipam: add Nautobot plugin Hannes Duerr
2025-05-06  9:00 ` [pve-devel] [PATCH pve-network v4 2/2] ipam: add test cases for nautobot plugin Hannes Duerr
2025-05-06  9:00 ` [pve-devel] [PATCH pve-docs v4 1/1] add documentation for nautobot ipam plugin Hannes Duerr
2025-05-06  9:00 ` Hannes Duerr [this message]
2025-05-07  9:17 ` [pve-devel] [PATCH pve-network v4 1/2] ipam: add Nautobot plugin - range workaround questions Lou Lecrivain via pve-devel
     [not found] ` <FR2PPF45D006270C594040B87F6E418E7548588A@FR2PPF45D006270.DEUP281.PROD.OUTLOOK.COM>
2025-05-09  8:46   ` [pve-devel] SPAM: " Hannes Duerr
2025-05-09  9:34     ` [pve-devel] [!!ACHTUNG extern!!] - " Lou Lecrivain via pve-devel
     [not found]     ` <FR2PPF45D0062706987369A6C23E8E8DF74858AA@FR2PPF45D006270.DEUP281.PROD.OUTLOOK.COM>
2025-05-12  8:38       ` [pve-devel] SPAM: " Hannes Duerr
2025-05-14 14:00         ` [pve-devel] [!!ACHTUNG extern!!] - " Lou Lecrivain via pve-devel
2025-05-26 12:14 [pve-devel] [PATCH pve-network v4 1/2] ipam: add Nautobot plugin Hannes Duerr
2025-05-26 12:14 ` [pve-devel] [PATCH pve-manager v4 1/1] ipam: add UI dialog for nautobot ipam plugin Hannes Duerr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250506090041.53080-4-h.duerr@proxmox.com \
    --to=h.duerr@proxmox.com \
    --cc=jonatan.crystall@gwdg.de \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal