[Kimchi-devel] [V1 1/2] Fibre Channel SCSI Storage Pool UI

Yu Xin Huo huoyuxin at linux.vnet.ibm.com
Mon Feb 17 08:23:07 UTC 2014


On 2/14/2014 10:04 PM, Crístian Viana wrote:
> Am 14-02-2014 10:00, schrieb huoyuxin at linux.vnet.ibm.com:
>> + kimchi.getHostPCIDevices(function(data){
>> +            if(data.length>0){
>> +                options.push({
>> +                    label : i18n.KCHSP6001M,
>> +                    value : "scsi"
>> +                });
>> +                for(var i=0;i<data.length;i++){
>> +                    data[i].label = data[i].name;
>> +                    data[i].value = data[i].name;
>> +                }
>> +                $('#scsiAdapter').selectMenu();
>> +                $("input", "#scsiAdapter").val(data[0].name);
>> +                $('#scsiAdapter').selectMenu("setData", data);
>> +            }
>> +            $('#poolTypeId').selectMenu("setData", options);
>> +        });
> Please add an error handler to the function "getHostPCIDevices".
Check kimchi.getHostPCIDevices in kimchi.api.js, there is a default 
error handler defined to get rid of code duplication.
Only when new special error handler is needed, then pass in a error 
handler to overwrite the default.




More information about the Kimchi-devel mailing list