ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-13779. UI hangs due to JS error at Configure Kerberos page on Enable Kerberos wizard. (jaimin)
Date Fri, 06 Nov 2015 18:47:49 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 62ff7acfe -> beb5c49d3


AMBARI-13779. UI hangs due to JS error at Configure Kerberos page on Enable Kerberos wizard.
(jaimin)


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

Branch: refs/heads/trunk
Commit: beb5c49d3adefc9b484e225acf85e93257e5b423
Parents: 62ff7ac
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri Nov 6 10:47:13 2015 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri Nov 6 10:47:13 2015 -0800

----------------------------------------------------------------------
 .../app/models/configs/objects/service_config_property.js | 10 ++++++++--
 .../configs/objects/service_config_property_test.js       |  8 ++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/beb5c49d/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 b4756c1..c078a9e 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -497,8 +497,14 @@ App.ServiceConfigProperty = Em.Object.extend({
     var description = this.get('description');
     var displayType = this.get('displayType');
     var additionalDescription = Em.I18n.t('services.service.config.password.additionalDescription');
-    if ('password' === displayType && !description.contains(additionalDescription))
{
-      description += '<br />' + additionalDescription;
+    if ('password' === displayType) {
+      if (description) {
+        if (!description.contains(additionalDescription)) {
+          description += '<br />' + additionalDescription;
+        }
+      } else {
+        description = additionalDescription;
+      }
     }
     this.set('description', description);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/beb5c49d/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 f640a78..026006a 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
@@ -508,6 +508,14 @@ describe('App.ServiceConfigProperty', function () {
       expect(subd).to.not.contain(extraMessage);
     });
 
+    it('should add extra-message to the description if description is not defined', function
() {
+
+      serviceConfigProperty.set('description', undefined);
+      var extraMessage = Em.I18n.t('services.service.config.password.additionalDescription');
+      serviceConfigProperty.updateDescription();
+      expect(serviceConfigProperty.get('description')).to.contain(extraMessage);
+    });
+
   });
 
 });


Mime
View raw message