Add the three model definitions for SDN fabrics in a shared Common
module, so they can be accessed by all UI components for the SDN
fabrics.

Co-authored-by: Gabriel Goller <g.gol...@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanre...@proxmox.com>
---
 www/manager6/Makefile              |  1 +
 www/manager6/sdn/fabrics/Common.js | 36 ++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 www/manager6/sdn/fabrics/Common.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index fdf0e8165..efb016948 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -307,6 +307,7 @@ JSSRC=                                                      
\
        sdn/zones/SimpleEdit.js                         \
        sdn/zones/VlanEdit.js                           \
        sdn/zones/VxlanEdit.js                          \
+       sdn/fabrics/Common.js                           \
        storage/ContentView.js                          \
        storage/BackupView.js                           \
        storage/Base.js                                 \
diff --git a/www/manager6/sdn/fabrics/Common.js 
b/www/manager6/sdn/fabrics/Common.js
new file mode 100644
index 000000000..32e89a35b
--- /dev/null
+++ b/www/manager6/sdn/fabrics/Common.js
@@ -0,0 +1,36 @@
+Ext.define('Pve.sdn.Fabric', {
+    extend: 'Ext.data.Model',
+    idProperty: 'name',
+    fields: [
+       'id',
+       'protocol',
+       'ip_prefix',
+       'ip6_prefix',
+    ],
+});
+
+Ext.define('Pve.sdn.Node', {
+    extend: 'Ext.data.Model',
+    idProperty: 'name',
+    fields: [
+       'fabric_id',
+       'node_id',
+       'protocol',
+       'ip',
+       'ip6',
+       'area',
+    ],
+});
+
+Ext.define('Pve.sdn.Interface', {
+    extend: 'Ext.data.Model',
+    idProperty: 'name',
+    fields: [
+       'name',
+       'ip',
+       'ip6',
+       'hello_interval',
+       'hello_multiplier',
+       'csnp_interval',
+    ],
+});
-- 
2.39.5


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

Reply via email to