ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject [1/3] ambari git commit: AMBARI-11494. Should HDFS ssl-client configs (passwords) have "override" and "undo" icons? (alexantonenko)
Date Thu, 28 May 2015 18:16:12 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 62bfe93cc -> f81b4f896


AMBARI-11494. Should HDFS ssl-client configs (passwords) have "override" and "undo" icons?
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: 7dfcbe27b2373139f5da2d356d3b584b5b36c730
Parents: 62bfe93
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Thu May 28 21:14:07 2015 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Thu May 28 21:14:07 2015 +0300

----------------------------------------------------------------------
 .../models/configs/objects/service_config_property.js   |  9 +++++----
 ambari-web/app/utils/config.js                          |  2 +-
 .../configs/objects/service_config_property_test.js     | 12 ++++++++----
 3 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7dfcbe27/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 ad4de55..f7dcd2d 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -195,9 +195,6 @@ App.ServiceConfigProperty = Em.Object.extend({
   }.property('isUserProperty', 'isOriginalSCP', 'overrides.length'),
 
   init: function () {
-    if(this.get("displayType")=="password"){
-      this.set('retypedPassword', this.get('value'));
-    }
     if ((this.get('id') === 'puppet var') && this.get('value') == '') {
       if (this.get('savedValue')) {
         this.set('value', this.get('savedValue'));
@@ -205,6 +202,10 @@ App.ServiceConfigProperty = Em.Object.extend({
         this.set('value', this.get('recommendedValue'));
       }
     }
+    if(this.get("displayType") === "password"){
+      this.set('retypedPassword', this.get('value'));
+      this.set('recommendedValue', '');
+    }
     this.set('initialValue', this.get('value'));
   },
 
@@ -271,7 +272,7 @@ App.ServiceConfigProperty = Em.Object.extend({
    * @type {boolean}
    */
   overrideAvailable: function () {
-    return !this.get('isComparison') && this.get('isPropertyOverridable');
+    return !this.get('isComparison') && this.get('isPropertyOverridable') &&
(this.get('displayType') !== 'password');
   }.property('isPropertyOverridable', 'isComparison'),
 
   isValid: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7dfcbe27/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 353168b..32553e8 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -320,7 +320,7 @@ App.config = Em.Object.create({
           name: index,
           value: value,
           savedValue: value,
-          recommendedValue: advancedConfig ? Em.get(advancedConfig, 'recommencedValue') :
null,
+          recommendedValue: advancedConfig ? Em.get(advancedConfig, 'recommendedValue') :
null,
           filename: filename,
           isUserProperty: !advancedConfig,
           isVisible: !!service,

http://git-wip-us.apache.org/repos/asf/ambari/blob/7dfcbe27/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 5eb8c3e..08f9cb0 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
@@ -175,20 +175,24 @@ var serviceConfigProperty,
     {
       initial: {
         displayType: 'password',
-        value: 'value'
+        value: 'value',
+        recommendedValue: 'recommended'
       },
       result: {
-        retypedPassword: 'value'
+        retypedPassword: 'value',
+        recommendedValue: ''
       }
     },
     {
       initial: {
         id: 'puppet var',
         value: '',
-        savedValue: 'default'
+        savedValue: 'default',
+        recommendedValue: 'recommended'
       },
       result: {
-        value: 'default'
+        value: 'default',
+        recommendedValue: 'recommended'
       }
     }
   ],


Mime
View raw message