--- Begin Message ---
From: Lou Lecrivain <lou.lecriv...@wdz.de>
Co-authored-by: Jonatan Crystall <jonatan.cryst...@gwdg.de>
Co-authored-by: Lou Lecrivain <lou.lecriv...@wdz.de>
Signed-off-by: Hannes Duerr <h.du...@proxmox.com>
Signed-off-by: Lou Lecrivain <lou.lecriv...@wdz.de>
---
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 85f9268d..43ecbdba 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -301,6 +301,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 c48ee0b2..851a5267 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -939,6 +939,11 @@ Ext.define('PVE.Utils', {
ipanel: 'NetboxInputPanel',
faIcon: 'th',
},
+ nautobot: {
+ name: 'Nautobot',
+ ipanel: 'NautobotInputPanel',
+ faIcon: 'th',
+ },
phpipam: {
name: 'PhpIpam',
ipanel: 'PhpIpamInputPanel',
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.47.3
--- End Message ---