network view: pass generic editOptions config to edit window

Avoid the need to loop through every product specific feature
enablement, rather allow one to pass a generic object including them.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2024-11-16 16:37:14 +01:00
parent 358b98bf4f
commit 0988db8ffc

View File

@ -33,8 +33,8 @@ Ext.define('Proxmox.node.NetworkView', {
showApplyBtn: false,
// decides if VLAN IDs field for bridges is shown, depends on the product if needed
bridge_set_vids: false,
// for options passed down to the network edit window
editOptions: {},
initComponent: function() {
let me = this;
@ -103,7 +103,7 @@ Ext.define('Proxmox.node.NetworkView', {
nodename: me.nodename,
iface: rec.data.iface,
iftype: rec.data.type,
bridge_set_vids: me.bridge_set_vids,
...me.editOptions,
listeners: {
destroy: () => reload(),
},
@ -174,7 +174,7 @@ Ext.define('Proxmox.node.NetworkView', {
nodename: me.nodename,
iftype: iType,
iface_default: findNextFreeInterfaceId(iDefault ?? iType),
bridge_set_vids: me.bridge_set_vids,
...me.editOptions,
onlineHelp: 'sysadmin_network_configuration',
listeners: {
destroy: () => reload(),