[pve-devel] [RFC manager] When adding a new hard disk, use the most used controller as suggested value

Emmanuel Kasper e.kasper at proxmox.com
Wed Sep 28 10:58:44 CEST 2016


On 09/22/2016 02:09 PM, Dietmar Maurer wrote:
> I would not change the order when displaying the list. Just select 
> the default ...
> 

the clist we sort here is actually only used for setting the value of
the comboBox, we call setValue() on the first element of the list
further down

	    Ext.Array.each(clist, function(controller) {

==>		me.down('field[name=controller]').setValue(controller);
		for (i = 0; i <= PVE.form.ControllerSelector.maxIds[controller]; i++) {
		    confid = controller + i.toString();
		    if (!Ext.isDefined(me.vmconfig[confid])) {
			me.down('field[name=deviceid]').setValue(i);
			return false; // break
		    }
		}
	    });

the actual ordering of items in the dropdown list is defined somewhere
else ( in pveBusSelector )




More information about the pve-devel mailing list