From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id AB0321FF15E for <inbox@lore.proxmox.com>; Tue, 6 May 2025 11:01:03 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 07CC54EA5; Tue, 6 May 2025 11:01:01 +0200 (CEST) From: Hannes Duerr <h.duerr@proxmox.com> To: pve-devel@lists.proxmox.com Date: Tue, 6 May 2025 11:00:41 +0200 Message-Id: <20250506090041.53080-4-h.duerr@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250506090041.53080-1-h.duerr@proxmox.com> References: <20250506090041.53080-1-h.duerr@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.048 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH pve-manager v4 1/1] ipam: add UI dialog for nautobot ipam plugin X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Cc: Jonatan Crystall <jonatan.crystall@gwdg.de> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.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