An edit window for updating / creating WireGuard fabrics and expose
the WireGuard specific configuration options (currently only
PersistentKeepAlive interval). Disable IPv4/6 prefix fields for now,
as they are currently not required and IPs are currently configured
per-interface.

Signed-off-by: Stefan Hanreich <[email protected]>
---
 www/manager6/Makefile                         |  1 +
 .../sdn/fabrics/wireguard/FabricEdit.js       | 29 +++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 www/manager6/sdn/fabrics/wireguard/FabricEdit.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index a0f06024a..e3a704d9d 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -335,6 +335,7 @@ JSSRC=                                                      
\
        sdn/fabrics/ospf/FabricEdit.js                  \
        sdn/fabrics/wireguard/InterfacePanel.js         \
        sdn/fabrics/wireguard/NodeEdit.js               \
+       sdn/fabrics/wireguard/FabricEdit.js             \
        storage/ContentView.js                          \
        storage/BackupView.js                           \
        storage/Base.js                                 \
diff --git a/www/manager6/sdn/fabrics/wireguard/FabricEdit.js 
b/www/manager6/sdn/fabrics/wireguard/FabricEdit.js
new file mode 100644
index 000000000..0a46b2b88
--- /dev/null
+++ b/www/manager6/sdn/fabrics/wireguard/FabricEdit.js
@@ -0,0 +1,29 @@
+Ext.define('PVE.sdn.Fabric.WireGuard.Fabric.Edit', {
+    extend: 'PVE.sdn.Fabric.Fabric.Edit',
+
+    subject: 'WireGuard',
+    onlineHelpX: 'pvesdn_wireguard_fabric',
+
+    extraRequestParams: {
+        protocol: 'wireguard',
+    },
+
+    // handled in the interface configuration (for now)
+    hasIpv4Support: false,
+    hasIpv6Support: false,
+
+    additionalItems: [
+        {
+            xtype: 'proxmoxintegerfield',
+            fieldLabel: gettext('Persistent Keepalive'),
+            name: 'persistent-keepalive',
+            minValue: 1,
+            maxValue: 65535,
+            labelWidth: 120,
+            allowBlank: true,
+            cbind: {
+                deleteEmpty: '{!isCreate}',
+            },
+        },
+    ],
+});
-- 
2.47.3



Reply via email to