From 45f8b8f553404444000aa727da219c133ab8ee0d Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 7 Aug 2012 13:20:52 -0700 Subject: [PATCH] cloudstack 3.0 UI - autoscale - for regular user - fix a bug that createAutoScaleVmProfile API fails because autoscaleuserid is undefined. --- ui/scripts/autoscaler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js index 860c8fe852d..8967d6a8608 100644 --- a/ui/scripts/autoscaler.js +++ b/ui/scripts/autoscaler.js @@ -1071,7 +1071,7 @@ array1.push("&destroyvmgraceperiod=" + args.data.destroyVMgracePeriod); array1.push("&snmpcommunity=" + args.data.snmpCommunity); array1.push("&snmpport=" + args.data.snmpPort); - if(args.data.username != "") + if(args.data.username != null && args.data.username.length > 0) array1.push("&autoscaleuserid=" + args.data.username); $.ajax({