Repository: ambari
Updated Branches:
  refs/heads/trunk 08e426ac7 -> 9496772d9


AMBARI-18389 - Config compare shows incorrect value after enabling kerberos 
(rzang)


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

Branch: refs/heads/trunk
Commit: 9496772d9f662daefcb78f971a201df0172c2430
Parents: 08e426a
Author: Richard Zang <rz...@apache.org>
Authored: Wed Sep 14 13:50:08 2016 -0700
Committer: Richard Zang <rz...@apache.org>
Committed: Wed Sep 14 13:50:08 2016 -0700

----------------------------------------------------------------------
 .../app/models/configs/objects/service_config_property.js   | 9 +++++++--
 .../models/configs/objects/service_config_property_test.js  | 2 --
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9496772d/ambari-web/app/models/configs/objects/service_config_property.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js 
b/ambari-web/app/models/configs/objects/service_config_property.js
index 0c7673d..5d85ae0 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -118,8 +118,13 @@ App.ServiceConfigProperty = Em.Object.extend({
   /**
    * Placeholder used for configs with input type text
    */
-  placeholder: Em.computed.firstNotBlank('placeholderText', 'savedValue'),
-
+  placeholder: function() {
+    if (this.isEditable) {
+      return this.get('placeholderText') || this.get('savedValue');
+    }
+    return null;
+  }.property('isEditable', 'placeholderText', 'savedValue'),
+  
   retypedPassword: '',
   description: '',
   displayType: 'string', // string, digits, number, directories, custom

http://git-wip-us.apache.org/repos/asf/ambari/blob/9496772d/ambari-web/test/models/configs/objects/service_config_property_test.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/test/models/configs/objects/service_config_property_test.js 
b/ambari-web/test/models/configs/objects/service_config_property_test.js
index a6772d3..d462025 100644
--- a/ambari-web/test/models/configs/objects/service_config_property_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_property_test.js
@@ -186,8 +186,6 @@ describe('App.ServiceConfigProperty', function () {
     serviceConfigProperty = getProperty();
   });
 
-  App.TestAliases.testAsComputedFirstNotBlank(getProperty(), 'placeholder', 
['placeholderText', 'savedValue']);
-
   App.TestAliases.testAsComputedAnd(getProperty(), 'hideFinalIcon', 
['!isFinal', 'isNotEditable']);
 
   describe('#isPropertyOverridable', function () {

Reply via email to