You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2015/05/21 14:45:16 UTC

[3/4] stratos git commit: adding validation for the integer in autoscaling policy Threshold values

adding validation for the integer in autoscaling policy Threshold values


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8967147e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8967147e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8967147e

Branch: refs/heads/master
Commit: 8967147e73ceaa9ca09bb9e45b0d5c258db8e3b5
Parents: 5ca86e9
Author: reka <rt...@gmail.com>
Authored: Thu May 21 17:57:00 2015 +0530
Committer: reka <rt...@gmail.com>
Committed: Thu May 21 18:15:00 2015 +0530

----------------------------------------------------------------------
 .../schema/configure/autoscaling-policies.json    | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8967147e/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
index d880c9f..4c086d8 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
@@ -56,12 +56,14 @@
                     },
                     "properties":{
                         "threshold": {
-                            "type":"number",
+                            "type":"string",
                             "id": "root/loadThresholds/requestsInFlight/threshold",
                             "title": "Threshold",
                             "name": "Threshold",
+                            "description" : "You need to enter number for the Requests In Flight Threshold",
+                            "format" : "number",
                             "default":30,
-                            "format": "number",
+                            "pattern": "^[0-9]+$",
                             "required":false
                         }
                     }
@@ -78,12 +80,14 @@
                     },
                     "properties":{
                         "threshold": {
-                            "type":"number",
+                            "type":"string",
                             "id": "root/loadThresholds/memoryConsumption/threshold",
                             "title": "Threshold",
+                            "description" : "You need to enter number for the Memory Consumption Threshold",
+                            "format" : "number",
+                            "pattern": "^[0-9]+$",
                             "name": "Threshold",
                             "default":80,
-                            "format": "number",
                             "required":false
                         }
                     }
@@ -100,12 +104,14 @@
                     },
                     "properties":{
                         "threshold": {
-                            "type":"number",
+                            "type":"string",
                             "id": "root/loadThresholds/loadAverage/threshold",
                             "title": "Threshold",
+                            "format" : "number",
+                            "description" : "You need to enter number for the Load Average Threshold",
+                            "pattern": "^[0-9]+$",
                             "name": "Threshold",
                             "default":100,
-                            "format": "number",
                             "required":false
                         }
                     }