From 3d754ed42914f2d43e2ef8043e2f9de912ad7273 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 4d06813861d..54a1646ab79 100644 --- a/ui/scripts/autoscaler.js +++ b/ui/scripts/autoscaler.js @@ -798,6 +798,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 = [];