cloudstack 3.0 UI - autoscale - add validation that scale policy duration can not be less than Polling Interval.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/3d754ed4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/3d754ed4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/3d754ed4 Branch: refs/heads/master Commit: 3d754ed42914f2d43e2ef8043e2f9de912ad7273 Parents: 28513fa Author: Jessica Wang <[email protected]> Authored: Wed Aug 8 14:36:28 2012 -0700 Committer: Vijay Venkatachalam <[email protected]> Committed: Fri Nov 16 10:56:49 2012 +0530 ---------------------------------------------------------------------- ui/scripts/autoscaler.js | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3d754ed4/ui/scripts/autoscaler.js ---------------------------------------------------------------------- diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js index 4d06813..54a1646 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 = [];
