ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [12/45] ambari git commit: AMBARI-20334 - Yarn Queue manager capacity field allows entering invalid values. (Anita Jebaraj via sangeetar)
Date Mon, 24 Apr 2017 02:20:54 GMT
AMBARI-20334 - Yarn Queue manager capacity field allows entering invalid values. (Anita Jebaraj
via sangeetar)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/346df926
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/346df926
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/346df926

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 346df9260b61bf7e2528289767693211fa4a8f92
Parents: d5e444f
Author: Sangeeta Ravindran <sangeetar@apache.org>
Authored: Thu Apr 20 12:28:30 2017 -0700
Committer: Sangeeta Ravindran <sangeetar@apache.org>
Committed: Thu Apr 20 12:28:30 2017 -0700

----------------------------------------------------------------------
 .../src/main/resources/ui/app/components/capacityInput.js          | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/346df926/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js
index b6c419a..0646b79 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js
@@ -257,6 +257,8 @@ App.DecimalCapacityInputComponent = Ember.TextField.extend({
       } else {
         this.set('value', (parseFloat(val) > maxVal)? parseFloat(maxVal) : parseFloat(val));
       }
+    } else {
+      this.set('value', (!Em.isBlank(this.get('value')) && !isNaN(parseFloat(this.get('value'))))
? parseFloat(val) : null);
     }
   }.observes('value').on('change')
 });


Mime
View raw message