CLOUDSTACK-681: deployment planner - create compute offering dialog - deployment planner dropdown - add blank option and make it as default option. Not pass anything to API call when blank option is selected.

This commit is contained in:
Jessica Wang 2013-05-30 16:27:36 -07:00
parent da53ef1aed
commit 8ece25c1f2
1 changed files with 10 additions and 5 deletions

View File

@ -151,7 +151,7 @@
url:createURL('listDeploymentPlanners'),
dataType:'json',
success:function(json){
var items=[];
var items=[{id: '', description: ''}];
var plannerObjs = json.listdeploymentplannersresponse.deploymentPlanner;
$(plannerObjs).each(function(){
items.push({id: this.name, description: this.name});
@ -208,10 +208,15 @@
storageType: args.data.storageType,
cpuNumber: args.data.cpuNumber,
cpuSpeed: args.data.cpuSpeed,
memory: args.data.memory,
deploymentplanner: args.data.deploymentPlanner
};
memory: args.data.memory
};
if(args.data.deploymentPlanner != null && args.data.deploymentPlanner.length > 0) {
$.extend(data, {
deploymentplanner: args.data.deploymentPlanner
});
}
var array1 =[];
if(args.data.deploymentPlanner == "ImplicitDedicationPlanner" && args.data.plannerMode != ""){
array1.push("&serviceofferingdetails[0].ImplicitDedicationMode" + "=" + args.data.plannerMode);