From 8e778151e1cc6064ea46b457be266a8ec3afc7d7 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Maharana Date: Thu, 7 Jan 2016 16:57:54 +0530 Subject: [PATCH] CLOUDSTACK-9229: Autoscale policy creation failing in VPC due to zoneid missing in createAutoScaleVmProfile Added a conditon to check whether the zoneid in networks is undefined, If that is undefined, it gets the zoneid from ipaddresses argument. Fixed a localization issue. --- ui/scripts/autoscaler.js | 2 +- ui/scripts/ui-custom/autoscaler.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js index bbd6d9ac977..e8ac0443662 100644 --- a/ui/scripts/autoscaler.js +++ b/ui/scripts/autoscaler.js @@ -1116,7 +1116,7 @@ var apiCmd, apiCmdRes; if (!('multiRules' in args.context)) { //from a new LB var data = { - zoneid: args.context.networks[0].zoneid, //get zoneid from args.context.networks[0] instead of args.context.ipAddresses[0] because args.context.ipAddresses is null when adding AutoScale rule from Add Load Balancer tab in Network page + zoneid: args.context.networks[0].zoneid ? args.context.networks[0].zoneid : args.context.ipAddresses[0].zoneid, //get zoneid from args.context.networks[0]. If it is not null then get it from args.context.ipAddresses[0] because args.context.ipAddresses is null when adding AutoScale rule from Add Load Balancer tab in Network page serviceofferingid: args.data.serviceOfferingId, templateid: args.data.templateNames, destroyvmgraceperiod: args.data.destroyVMgracePeriod, diff --git a/ui/scripts/ui-custom/autoscaler.js b/ui/scripts/ui-custom/autoscaler.js index ca37bea3ce3..52eb5ea334b 100644 --- a/ui/scripts/ui-custom/autoscaler.js +++ b/ui/scripts/ui-custom/autoscaler.js @@ -333,7 +333,7 @@ var $loading = $('
').addClass('loading-overlay').appendTo($autoscalerDialog); $autoscalerDialog.dialog({ - title: 'label.autoscale.configuration.wizard', + title: _l('label.autoscale.configuration.wizard'), width: 825, height: 600, draggable: true,