You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2015/02/25 19:15:53 UTC
ambari git commit: AMBARI-9798. Alert Definition: request fails
trying to set float value to interval. (akovalenko)
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 <ak...@hortonworks.com>
Authored: Wed Feb 25 18:44:47 2015 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
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')
}),