ui: fabrics: add model definitions for fabrics

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.goller@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Link: https://lore.proxmox.com/20250716130837.585796-59-g.goller@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Stefan Hanreich 2025-07-16 15:08:19 +02:00 committed by Thomas Lamprecht
parent 387cc48ac6
commit 29ebe4e8d4
2 changed files with 18 additions and 0 deletions

View file

@ -308,6 +308,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 \

View file

@ -0,0 +1,17 @@
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'],
});