From 8ece25c1f2bd6d0126c2a22b42e1c4da65fc2856 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 30 May 2013 16:27:36 -0700 Subject: [PATCH] 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. --- ui/scripts/configuration.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 43dd68f65d8..8a4aa7d0b89 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -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);