浏览代码

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

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

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