incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject git commit: AMBARI-3063: Security wizard: Configure services hits JS error with namenode HA enabled. (jaimin)
Date Fri, 30 Aug 2013 23:32:57 GMT
Updated Branches:
  refs/heads/trunk 203b5f9fd -> f8eea043f


AMBARI-3063: Security wizard: Configure services hits JS error with namenode HA enabled. (jaimin)


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

Branch: refs/heads/trunk
Commit: f8eea043f26b215fc7927339cc3ff91705bf6c12
Parents: 203b5f9
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri Aug 30 16:32:27 2013 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri Aug 30 16:32:27 2013 -0700

----------------------------------------------------------------------
 .../app/controllers/main/admin/security/add/step2.js   | 13 +++++++++++--
 ambari-web/app/data/HDP2/secure_properties.js          |  2 +-
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f8eea043/ambari-web/app/controllers/main/admin/security/add/step2.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/add/step2.js b/ambari-web/app/controllers/main/admin/security/add/step2.js
index b85a8c5..c271001 100644
--- a/ambari-web/app/controllers/main/admin/security/add/step2.js
+++ b/ambari-web/app/controllers/main/admin/security/add/step2.js
@@ -231,11 +231,14 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
       var namenodeHost = hdfsService.configs.findProperty('name', 'namenode_host');
       var sNamenodeHost = hdfsService.configs.findProperty('name', 'snamenode_host');
       var jnHosts = hdfsService.configs.findProperty('name', 'journalnode_hosts');
+      var snComponent = App.Service.find('HDFS').get('hostComponents').findProperty('componentName',
'SECONDARY_NAMENODE');
+      var jnComponent = App.Service.find('HDFS').get('hostComponents').findProperty('componentName',
'JOURNALNODE');
       if (namenodeHost && sNamenodeHost) {
         namenodeHost.defaultValue = App.Service.find('HDFS').get('hostComponents').findProperty('componentName',
'NAMENODE').get('host.hostName');
-        sNamenodeHost.defaultValue = App.Service.find('HDFS').get('hostComponents').findProperty('componentName',
'SECONDARY_NAMENODE').get('host.hostName');
       }
-      var jnComponent = App.Service.find('HDFS').get('hostComponents').findProperty('componentName',
'JOURNALNODE');
+      if(sNamenodeHost && snComponent) {
+        sNamenodeHost.defaultValue = snComponent.get('host.hostName');
+      }
       if(jnHosts && jnComponent) {
         this.setHostsToConfig(hdfsService, 'journalnode_hosts', 'JOURNALNODE');
       }
@@ -277,6 +280,9 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
           dfsHttpPrincipal.set('category','General');
           dfsHttpKeytab.set('category','General');
         }
+        hdfsProperties.filterProperty('category','SNameNode').forEach(function(_snConfig){
+          _snConfig.set('isVisible',false);
+        },this);
         var generalCategory = configCategories.findProperty('name','General');
         var snCategory = configCategories.findProperty('name','SNameNode');
         if(generalCategory) {
@@ -286,6 +292,9 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
           configCategories.removeObject(snCategory);
         }
       } else {
+        hdfsProperties.filterProperty('category','JournalNode').forEach(function(_jnConfig){
+          _jnConfig.set('isVisible',false);
+        },this);
         var jnCategory = configCategories.findProperty('name','JournalNode');
         if(jnCategory) {
           configCategories.removeObject(jnCategory);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f8eea043/ambari-web/app/data/HDP2/secure_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/secure_properties.js b/ambari-web/app/data/HDP2/secure_properties.js
index 6b41fd7..82298d3 100644
--- a/ambari-web/app/data/HDP2/secure_properties.js
+++ b/ambari-web/app/data/HDP2/secure_properties.js
@@ -210,7 +210,7 @@ module.exports =
       "name": "snamenode_host",
       "displayName": "SNameNode host",
       "value": "",
-      "defaultValue": "",
+      "defaultValue": "localhost",
       "description": "The host that has been assigned to run SecondaryNameNode",
       "displayType": "masterHost",
       "isOverridable": false,


Mime
View raw message