]> git.proxmox.com Git - pve-manager.git/commitdiff
copy form/BondModeSelector.js from manager to manager5
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 3 Jul 2015 09:29:11 +0000 (11:29 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 3 Jul 2015 09:29:11 +0000 (11:29 +0200)
www/manager5/form/BondModeSelector.js [new file with mode: 0644]

diff --git a/www/manager5/form/BondModeSelector.js b/www/manager5/form/BondModeSelector.js
new file mode 100644 (file)
index 0000000..4504e8b
--- /dev/null
@@ -0,0 +1,48 @@
+Ext.define('PVE.form.BondModeSelector', {
+    extend: 'PVE.form.KVComboBox',
+    alias: ['widget.bondModeSelector'],
+  
+    openvswitch: false,
+
+    initComponent: function() {
+       var me = this;
+
+       if (me.openvswitch) {
+           me.data = [ 
+              ['active-backup', 'active-backup'],
+              ['balance-slb', 'balance-slb'],
+              ['lacp-balance-slb', 'LACP (balance-slb)'],
+              ['lacp-balance-tcp', 'LACP (balance-tcp)']
+          ];
+       } else {
+            me.data = [ 
+               ['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('PVE.form.BondPolicySelector', {
+    extend: 'PVE.form.KVComboBox',
+    alias: ['widget.bondPolicySelector'],
+
+    initComponent: function() {
+       var me = this;
+        me.data = [
+           ['layer2', 'layer2'],
+           ['layer2+3', 'layer2+3'], 
+           ['layer3+4', 'layer3+4']
+       ];
+       me.callParent();
+    }
+});
+