proxmox-widget-toolkit/form/BondModeSelector.js
Thomas Lamprecht 05a977a227 make eslint 100% happy
lots of churn and changes but will allow to enforce linting again in
the build system.

Also switch over from var to let.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 17:16:22 +02:00

43 lines
857 B
JavaScript

Ext.define('Proxmox.form.BondModeSelector', {
extend: 'Proxmox.form.KVComboBox',
alias: ['widget.bondModeSelector'],
openvswitch: false,
initComponent: function() {
let me = this;
if (me.openvswitch) {
me.comboItems = Proxmox.Utils.bond_mode_array([
'active-backup',
'balance-slb',
'lacp-balance-slb',
'lacp-balance-tcp',
]);
} else {
me.comboItems = Proxmox.Utils.bond_mode_array([
'balance-rr',
'active-backup',
'balance-xor',
'broadcast',
'802.3ad',
'balance-tlb',
'balance-alb',
]);
}
me.callParent();
},
});
Ext.define('Proxmox.form.BondPolicySelector', {
extend: 'Proxmox.form.KVComboBox',
alias: ['widget.bondPolicySelector'],
comboItems: [
['layer2', 'layer2'],
['layer2+3', 'layer2+3'],
['layer3+4', 'layer3+4'],
],
});