From e137f22d50ca2c3650d06861d3c577c20b6ca85d Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 20 Aug 2012 16:14:33 -0700 Subject: [PATCH] CS-15955: cloudstack 3.0 UI - autoscale - validation - convert type of scale policy duration and polling interval when comparing them (Reviewed-by: Brian) --- ui/scripts/autoscaler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js index 9aa622c8a2c..f36ae27715a 100644 --- a/ui/scripts/autoscaler.js +++ b/ui/scripts/autoscaler.js @@ -793,7 +793,7 @@ args.response.error("Duration of Scale Up Policy should be a number."); return; } - if(args.data.scaleUpDuration < args.data.interval) { + if(parseInt(args.data.scaleUpDuration) < parseInt(args.data.interval)) { args.response.error("Duration of Scale Up Policy must be greater than or equal to Polling Interval."); return; } @@ -811,7 +811,7 @@ args.response.error("Duration of Scale Down Policy should be a number."); return; } - if(args.data.scaleDownDuration < args.data.interval) { + if(parseInt(args.data.scaleDownDuration) < parseInt(args.data.interval)) { args.response.error("Duration of Scale Down Policy must be greater than or equal to Polling Interval."); return; }