Updated Branches:
  refs/heads/trunk f595e78f2 -> bf7473463

AMBARI-3868: Add host fails after configuring NN HA with JavaScript error. 
(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/bf747346
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/bf747346
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/bf747346

Branch: refs/heads/trunk
Commit: bf747346312170834c6beb89a60c8624b47aa288
Parents: f595e78
Author: Jaimin Jetly <[email protected]>
Authored: Fri Nov 22 18:44:54 2013 -0800
Committer: Jaimin Jetly <[email protected]>
Committed: Fri Nov 22 18:45:03 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/models/service_config.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/bf747346/ambari-web/app/models/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config.js 
b/ambari-web/app/models/service_config.js
index 977bae2..6d0b7bd 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -272,12 +272,16 @@ App.ServiceConfigProperty = Ember.Object.extend({
         }
         break;
       case 'dfs.secondary.http.address':
-        var snnHost = masterComponentHostsInDB.findProperty('component', 
'SECONDARY_NAMENODE').hostName;
-        this.setDefaultValue("(\\w*)(?=:)",snnHost);
+        var snnHost = masterComponentHostsInDB.findProperty('component', 
'SECONDARY_NAMENODE');
+        if (snnHost) {
+          this.setDefaultValue("(\\w*)(?=:)",snnHost.hostName);
+        }
         break;
       case 'dfs.namenode.secondary.http-address':
-        var snnHost = masterComponentHostsInDB.findProperty('component', 
'SECONDARY_NAMENODE').hostName;
-        this.setDefaultValue("(\\w*)(?=:)",snnHost);
+        var snnHost = masterComponentHostsInDB.findProperty('component', 
'SECONDARY_NAMENODE');
+        if (snnHost) {
+          this.setDefaultValue("(\\w*)(?=:)",snnHost.hostName);
+        }
         break;
       case 'datanode_hosts':
         this.set('value', 
slaveComponentHostsInDB.findProperty('componentName', 
'DATANODE').hosts.mapProperty('hostName'));

Reply via email to