Selaa lähdekoodia

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

Aleksandr Kovalenko 10 vuotta sitten
vanhempi
commit
f55736f495
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  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')
   }),