Repository: ambari
Updated Branches:
  refs/heads/trunk 2209b7203 -> d46949d91


AMBARI-11682. Yarn "Capacity Scheduler"-config has Undo-button on the installer 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: d46949d9189021af6b4f1911c53fe7a53b4661e2
Parents: 2209b72
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Jun 4 15:25:48 2015 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Jun 4 15:25:48 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/utils/config.js       | 8 ++++++--
 ambari-web/test/utils/config_test.js | 3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d46949d9/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 551dfa0..15522ac 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -1434,8 +1434,12 @@ App.config = Em.Object.create({
       var savedIsFinal = fileConfigs.someProperty('savedIsFinal', true);
       var recommendedIsFinal = fileConfigs.someProperty('recommendedIsFinal', 
true);
       complexConfig.value = value;
-      complexConfig.savedValue = savedValue;
-      complexConfig.recommendedValue = recommendedValue;
+      if (savedValue) {
+        complexConfig.savedValue = savedValue;
+      }
+      if (recommendedValue) {
+        complexConfig.recommendedValue = recommendedValue;
+      }
       complexConfig.isFinal = isFinal;
       complexConfig.savedIsFinal = savedIsFinal;
       complexConfig.recommendedIsFinal = recommendedIsFinal;

http://git-wip-us.apache.org/repos/asf/ambari/blob/d46949d9/ambari-web/test/utils/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/config_test.js 
b/ambari-web/test/utils/config_test.js
index 48e27d1..b5f717f 100644
--- a/ambari-web/test/utils/config_test.js
+++ b/ambari-web/test/utils/config_test.js
@@ -122,7 +122,8 @@ describe('App.config', function () {
       var result = App.config.fileConfigsIntoTextarea.call(App.config, 
configs, filename);
       expect(result.length).to.equal(1);
       expect(result[0].value).to.equal('');
-      expect(result[0].recommendedValue).to.equal('');
+      expect(Em.isNone(result[0].recommendedValue)).to.be.true;
+      expect(Em.isNone(result[0].savedValue)).to.be.true;
     });
     it("filename has configs that shouldn't be included in textarea", function 
() {
       var configs = [

Reply via email to