add missing BondModeSelector to widget toolkit

this is needed for the node/NetworkEdit.js

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-11-14 11:17:03 +01:00 committed by Dietmar Maurer
parent 621b567f21
commit fa6dc53bcc
2 changed files with 43 additions and 0 deletions

View File

@ -30,6 +30,7 @@ JSSRC= \
form/LanguageSelector.js \
form/ComboGrid.js \
form/RRDTypeSelector.js \
form/BondModeSelector.js \
button/Button.js \
button/HelpButton.js \
grid/ObjectGrid.js \

42
form/BondModeSelector.js Normal file
View File

@ -0,0 +1,42 @@
Ext.define('Proxmox.form.BondModeSelector', {
extend: 'Proxmox.form.KVComboBox',
alias: ['widget.bondModeSelector'],
openvswitch: false,
initComponent: function() {
var me = this;
if (me.openvswitch) {
me.comboItems = [
['active-backup', 'active-backup'],
['balance-slb', 'balance-slb'],
['lacp-balance-slb', 'LACP (balance-slb)'],
['lacp-balance-tcp', 'LACP (balance-tcp)']
];
} else {
me.comboItems = [
['balance-rr', 'balance-rr'],
['active-backup', 'active-backup'],
['balance-xor', 'balance-xor'],
['broadcast', 'broadcast'],
['802.3ad', 'LACP (802.3ad)'],
['balance-tlb', 'balance-tlb'],
['balance-alb', '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']
]
});