Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 93b82b11e -> 0f4686249


AMBARI-9798. Alert Definition: request fails trying to set float value to 
interval. (akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f468624
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f468624
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f468624

Branch: refs/heads/branch-2.0.0
Commit: 0f46862496a03a1ce7f94c4351d6ca7b559eaeda
Parents: 93b82b1
Author: Aleksandr Kovalenko <[email protected]>
Authored: Wed Feb 25 18:45:08 2015 +0200
Committer: Aleksandr Kovalenko <[email protected]>
Committed: Wed Feb 25 20:16:23 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/models/alert_config.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f468624/ambari-web/app/models/alert_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/alert_config.js 
b/ambari-web/app/models/alert_config.js
index c76417e..2a78d4c 100644
--- a/ambari-web/app/models/alert_config.js
+++ b/ambari-web/app/models/alert_config.js
@@ -240,8 +240,7 @@ App.AlertConfigProperties = {
     isValid: function () {
       var value = this.get('value');
       if (!value) return false;
-      value = ('' + value).trim();
-      return !isNaN(value) && value >= 1;
+      return String(value) === String(parseInt(value, 10)) && value >= 1;
     }.property('value')
   }),
 

Reply via email to