浏览代码

AMBARI-8697-2. Alerts UI: thresholds validation.(xiwang)

Xi Wang 10 年之前
父节点
当前提交
c6ccbf4278
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      ambari-web/app/models/alert_config.js

+ 2 - 2
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')