ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rz...@apache.org
Subject ambari git commit: AMBARI-17388 - Add Service Wizard stuck on Customize Services step (rzang)
Date Thu, 23 Jun 2016 01:23:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 8480ed728 -> 91b39b0f3


AMBARI-17388 - Add Service Wizard stuck on Customize Services step (rzang)


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

Branch: refs/heads/trunk
Commit: 91b39b0f3ceda382300aaa3271cf6d06593e3191
Parents: 8480ed7
Author: Richard Zang <rzang@apache.org>
Authored: Wed Jun 22 17:45:06 2016 -0700
Committer: Richard Zang <rzang@apache.org>
Committed: Wed Jun 22 17:46:41 2016 -0700

----------------------------------------------------------------------
 .../app/controllers/wizard/step7_controller.js  | 62 ++++++++++----------
 1 file changed, 32 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/91b39b0f/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 3211974..78c5125 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -873,37 +873,39 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
App.E
   _reconfigureServicesOnNnHa: function (serviceConfigs) {
     var selectedServiceNames = this.get('selectedServiceNames');
     var nameServiceId = serviceConfigs.findProperty('serviceName', 'HDFS').configs.findProperty('name',
'dfs.nameservices');
-    Em.A([
-      {
-        serviceName: 'HBASE',
-        configToUpdate: 'hbase.rootdir'
-      },
-      {
-        serviceName: 'ACCUMULO',
-        configToUpdate: 'instance.volumes'
-      },
-      {
-        serviceName: 'HAWQ',
-        configToUpdate: 'hawq_dfs_url',
-        regexPattern: /(^.*:[0-9]+)(?=\/)/,
-        replacementValue: nameServiceId.get('value')
-      }
-    ]).forEach(function (c) {
-      if (selectedServiceNames.contains(c.serviceName) && nameServiceId) {
-        var cfg = serviceConfigs.findProperty('serviceName', c.serviceName).configs.findProperty('name',
c.configToUpdate);
-        var regexPattern = /\/\/.*:[0-9]+/i;
-        var replacementValue = '//' + nameServiceId.get('value');
-        if (!Em.isNone(c.regexPattern) && !Em.isNone(c.replacementValue)) {
-          regexPattern = c.regexPattern;
-          replacementValue = c.replacementValue;
+    if (nameServiceId) {
+      Em.A([
+        {
+          serviceName: 'HBASE',
+          configToUpdate: 'hbase.rootdir'
+        },
+        {
+          serviceName: 'ACCUMULO',
+          configToUpdate: 'instance.volumes'
+        },
+        {
+          serviceName: 'HAWQ',
+          configToUpdate: 'hawq_dfs_url',
+          regexPattern: /(^.*:[0-9]+)(?=\/)/,
+          replacementValue: nameServiceId.get('value')
         }
-        var newValue = cfg.get('value').replace(regexPattern, replacementValue);
-        cfg.setProperties({
-          value: newValue,
-          recommendedValue: newValue
-        });
-      }
-    });
+      ]).forEach(function (c) {
+        if (selectedServiceNames.contains(c.serviceName) && nameServiceId) {
+          var cfg = serviceConfigs.findProperty('serviceName', c.serviceName).configs.findProperty('name',
c.configToUpdate);
+          var regexPattern = /\/\/.*:[0-9]+/i;
+          var replacementValue = '//' + nameServiceId.get('value');
+          if (!Em.isNone(c.regexPattern) && !Em.isNone(c.replacementValue)) {
+            regexPattern = c.regexPattern;
+            replacementValue = c.replacementValue;
+          }
+          var newValue = cfg.get('value').replace(regexPattern, replacementValue);
+          cfg.setProperties({
+            value: newValue,
+            recommendedValue: newValue
+          });
+        }
+      });
+    }
     return serviceConfigs;
   },
 


Mime
View raw message