You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/04/24 02:20:54 UTC

[12/45] ambari git commit: AMBARI-20334 - Yarn Queue manager capacity field allows entering invalid values. (Anita Jebaraj via sangeetar)

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 <sa...@apache.org>
Authored: Thu Apr 20 12:28:30 2017 -0700
Committer: Sangeeta Ravindran <sa...@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')
 });