From a4ca478df578c529166f9d4898c1570a6c6e7eb7 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 8 Aug 2012 14:36:28 -0700 Subject: [PATCH] cloudstack 3.0 UI - autoscale - add validation that scale policy duration can not be less than Polling Interval. --- ui/scripts/autoscaler.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js index 29a39ab90db..6c75b4b802a 100644 --- a/ui/scripts/autoscaler.js +++ b/ui/scripts/autoscaler.js @@ -793,6 +793,15 @@ return; } } + + if(args.data.scaleUpDuration < args.data.interval) { + args.response.error("Duration of Scale Up Policy can not be less than Polling Interval."); + return; + } + if(args.data.scaleDownDuration < args.data.interval) { + args.response.error("Duration of Scale Down Policy can not be less than Polling Interval."); + return; + } //validation (end) ***** var scaleVmProfileResponse = [];