Updated Branches:
  refs/heads/autoscale 15499dabb -> 0ad5838b4

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/0ad5838b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0ad5838b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0ad5838b

Branch: refs/heads/autoscale
Commit: 0ad5838b4d74741c9a3d22ad6ba165d6e84acb21
Parents: 15499da
Author: Jessica Wang <[email protected]>
Authored: Wed Aug 8 14:36:28 2012 -0700
Committer: Jessica Wang <[email protected]>
Committed: Wed Aug 8 14:48:25 2012 -0700

----------------------------------------------------------------------
 ui/scripts/autoscaler.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0ad5838b/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 = [];

Reply via email to