Repository: ambari Updated Branches: refs/heads/trunk b06cbccbc -> f55736f49
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/f55736f4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f55736f4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f55736f4 Branch: refs/heads/trunk Commit: f55736f4956bd3bdf60fd0e77a383363bf36d091 Parents: b06cbcc Author: Aleksandr Kovalenko <[email protected]> Authored: Wed Feb 25 18:44:47 2015 +0200 Committer: Aleksandr Kovalenko <[email protected]> Committed: Wed Feb 25 20:15:04 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/f55736f4/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') }),
