[pve-devel] [PATCH] first bridge device is selected by default

tgrodzinski t.grodzinski at profihost.ag
Fri Sep 14 13:58:09 CEST 2012


Signed-off-by: tgrodzinski <t.grodzinski at profihost.ag>
---
 www/manager/form/BridgeSelector.js |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/www/manager/form/BridgeSelector.js b/www/manager/form/BridgeSelector.js
index cae1d6d..45829b2 100644
--- a/www/manager/form/BridgeSelector.js
+++ b/www/manager/form/BridgeSelector.js
@@ -16,7 +16,15 @@ Ext.define('PVE.form.BridgeSelector', {
 	    url: '/api2/json/nodes/' + me.nodename + '/network?type=bridge'
 	});
 
-	me.store.load();
+	me.store.load({
+	    scope: this,
+	    callback: function(records, operation, success) {
+		if(success && records.length) {
+		    me.setValue(me.store.getAt(0).data.iface);
+		}
+	    }
+	});
+
     },
 
     initComponent: function() {
-- 
1.7.9.5




More information about the pve-devel mailing list