You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2013/08/12 15:03:45 UTC

git commit: AMBARI-2870 Add host wizard does not go past Assign Slaves and Clients. (atkach)

Updated Branches:
  refs/heads/trunk 20755818f -> cd30718c6


AMBARI-2870 Add host wizard does not go past Assign Slaves and Clients. (atkach)


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

Branch: refs/heads/trunk
Commit: cd30718c6af7d10a83d69ef0d86587f649db224e
Parents: 2075581
Author: atkach <an...@gmail.com>
Authored: Mon Aug 12 16:03:40 2013 +0300
Committer: atkach <an...@gmail.com>
Committed: Mon Aug 12 16:03:40 2013 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step7_controller.js  |  2 +-
 ambari-web/app/utils/config.js                  | 40 +++++++++++---------
 2 files changed, 23 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/cd30718c/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 a305b97..6ed35b3 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -85,7 +85,7 @@ App.WizardStep7Controller = Em.Controller.extend({
     //STEP 5: Add custom configs
     App.config.addCustomConfigs(configs);
     //put properties from capacity-scheduler.xml into one config with textarea view
-    if(this.get('selectedServiceNames').contains('YARN') && !App.supports.capacitySchedulerUi){
+    if(this.get('allInstalledServiceNames').contains('YARN') && !App.supports.capacitySchedulerUi){
       configs = App.config.fileConfigsIntoTextarea(configs, 'capacity-scheduler.xml');
     }
     //STEP 6: Distribute configs by service and wrap each one in App.ServiceConfigProperty (configs -> serviceConfigs)

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/cd30718c/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index f4be308..3bce8c6 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -828,25 +828,29 @@ App.config = Em.Object.create({
   textareaIntoFileConfigs: function(configs, filename){
     var complexConfigName = this.get('complexConfigs').findProperty('filename', filename).name;
     var configsTextarea = configs.findProperty('name', complexConfigName);
-    var properties = configsTextarea.get('value').replace(/( |\n)+/g, '\n').split('\n');
+    if (configsTextarea) {
+      var properties = configsTextarea.get('value').replace(/( |\n)+/g, '\n').split('\n');
 
-    properties.forEach(function(_property){
-      var name, value;
-      if(_property){
-        _property = _property.split('=');
-        name = _property[0];
-        value = (_property[1]) ? _property[1] : "";
-        configs.push(Em.Object.create({
-          id: configsTextarea.get('id'),
-          name: name,
-          value: value,
-          defaultValue: value,
-          serviceName: configsTextarea.get('serviceName'),
-          filename: filename
-        }));
-      }
-    });
-    return configs.without(configsTextarea);
+      properties.forEach(function (_property) {
+        var name, value;
+        if (_property) {
+          _property = _property.split('=');
+          name = _property[0];
+          value = (_property[1]) ? _property[1] : "";
+          configs.push(Em.Object.create({
+            id: configsTextarea.get('id'),
+            name: name,
+            value: value,
+            defaultValue: value,
+            serviceName: configsTextarea.get('serviceName'),
+            filename: filename
+          }));
+        }
+      });
+      return configs.without(configsTextarea);
+    }
+    console.log('ERROR: textarea config - ' + complexConfigName + ' is missing');
+    return configs;
   }
 
 });