[pve-devel] [PATCH proxmox-widget-toolkit 1/2] networkedit: bond: add bond-primary field

Alexandre Derumier aderumier at odiso.com
Wed Jan 8 04:31:39 CET 2020


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 node/NetworkEdit.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/node/NetworkEdit.js b/node/NetworkEdit.js
index c3ef63c..ca0011f 100644
--- a/node/NetworkEdit.js
+++ b/node/NetworkEdit.js
@@ -110,6 +110,13 @@ Ext.define('Proxmox.node.NetworkEdit', {
 		disabled: true
 	    });
 
+	    var primaryfield = Ext.createWidget('textfield', {
+		fieldLabel: gettext('bond-primary'),
+		name: 'bond-primary',
+		value: '',
+		disabled: true
+	    });
+
 	    column2.push({
 		xtype: 'bondModeSelector',
 		fieldLabel: gettext('Mode'),
@@ -120,9 +127,17 @@ Ext.define('Proxmox.node.NetworkEdit', {
 			if (value === 'balance-xor' ||
 			    value === '802.3ad') {
 			    policySelector.setDisabled(false);
+			    primaryfield.setDisabled(true);
+			    primaryfield.setValue('');
+			} else if (value === 'active-backup') {
+			    primaryfield.setDisabled(false);
+			    policySelector.setDisabled(true);
+			    policySelector.setValue('');
 			} else {
 			    policySelector.setDisabled(true);
 			    policySelector.setValue('');
+			    primaryfield.setDisabled(true);
+			    primaryfield.setValue('');
 			}
 		    }
 		},
@@ -130,6 +145,7 @@ Ext.define('Proxmox.node.NetworkEdit', {
 	    });
 
 	    column2.push(policySelector);
+	    column2.push(primaryfield);
 
 	} else if (me.iftype === 'OVSBond') {
 	    column2.push({
-- 
2.20.1




More information about the pve-devel mailing list