You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2015/01/06 02:50:37 UTC
[2/2] ambari git commit: AMBARI-8697-2. Alerts UI: thresholds
validation.(xiwang)
AMBARI-8697-2. Alerts UI: thresholds validation.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c6ccbf42
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c6ccbf42
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c6ccbf42
Branch: refs/heads/trunk
Commit: c6ccbf427843e42eea8797e2834974ae6e5c0713
Parents: 1d1ebb4
Author: Xi Wang <xi...@apache.org>
Authored: Mon Jan 5 17:15:27 2015 -0800
Committer: Xi Wang <xi...@apache.org>
Committed: Mon Jan 5 17:49:01 2015 -0800
----------------------------------------------------------------------
ambari-web/app/models/alert_config.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c6ccbf42/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 990963f..c20ac48 100644
--- a/ambari-web/app/models/alert_config.js
+++ b/ambari-web/app/models/alert_config.js
@@ -355,7 +355,7 @@ App.AlertConfigProperties = {
valueWasChanged: function () {
var displayValue = this.get('displayValue');
var newDisplayValue = this.getNewValue();
- if (newDisplayValue != displayValue) {
+ if (Math.abs(newDisplayValue - displayValue) > 0.000001) {
this.set('displayValue', newDisplayValue);
}
}.observes('value'),
@@ -372,7 +372,7 @@ App.AlertConfigProperties = {
displayValueWasChanged: function () {
var value = this.get('value');
var newValue = this.getNewDisplayValue();
- if (newValue != value) {
+ if (Math.abs(newValue - value) > 0.000001) {
this.set('value', newValue);
}
}.observes('displayValue')