[pve-devel] [PATCH pve-manager v4 1/1] ipam: add UI dialog for nautobot ipam plugin
Hannes Duerr
h.duerr at proxmox.com
Tue May 6 11:00:41 CEST 2025
Co-authored-by: Jonatan Crystall <jonatan.crystall at gwdg.de>
Co-authored-by: Lou Lecrivain <lou.lecrivain at wdz.de>
Signed-off-by: Hannes Duerr <h.duerr at 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
More information about the pve-devel
mailing list