cloudstack 3.0 UI - autoscale - existing LB - configure AutoScale - fix a JS bug "otherdeployparams is undefined".

This commit is contained in:
Jessica Wang 2012-08-07 14:09:40 -07:00
parent 38a269c1bf
commit 15d1e57b92
1 changed files with 11 additions and 9 deletions

View File

@ -137,15 +137,17 @@
var diskOfferingId, securityGroups;
var otherdeployparams = autoscaleVmProfile.otherdeployparams;
var array1 = otherdeployparams.split('&');
$(array1).each(function(){
var array2 = this.split('=');
if(array2[0] == 'diskofferingid')
diskOfferingId= array2[1];
if(array2[0] == 'securitygroupids')
securityGroups = array2[1];
});
if(otherdeployparams != null && otherdeployparams.length > 0) {
var array1 = otherdeployparams.split('&');
$(array1).each(function(){
var array2 = this.split('=');
if(array2[0] == 'diskofferingid')
diskOfferingId= array2[1];
if(array2[0] == 'securitygroupids')
securityGroups = array2[1];
});
}
var originalAutoscaleData = {
templateNames: autoscaleVmProfile.templateid,
serviceOfferingId: autoscaleVmProfile.serviceofferingid,