incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-2840 YARN and ZK data directory names have ', ' at end
Date Thu, 08 Aug 2013 10:23:13 GMT
Updated Branches:
  refs/heads/trunk 02d1d81d0 -> 493c8ddc4


AMBARI-2840 YARN and ZK data directory names have ',' at end


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

Branch: refs/heads/trunk
Commit: 493c8ddc42fb32900058709783861fd47672c38a
Parents: 02d1d81
Author: atkach <andrey91.07@gmail.com>
Authored: Thu Aug 8 13:22:32 2013 +0300
Committer: atkach <andrey91.07@gmail.com>
Committed: Thu Aug 8 13:22:32 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard.js               |  6 +-----
 .../app/controllers/wizard/step7_controller.js     |  9 ---------
 .../app/controllers/wizard/step8_controller.js     | 17 +++++++++++++----
 3 files changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/493c8ddc/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index b8cec06..b2e4137 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -698,11 +698,6 @@ App.WizardController = Em.Controller.extend({
       }
 
       _content.get('configs').forEach(function (_configProperties) {
-        var displayType = _configProperties.get('displayType');
-        if (displayType === 'directories' || displayType === 'directory') {
-          var value = _configProperties.get('value').split(/\s+/g).join(',');
-          _configProperties.set('value', value);
-        }
         var overrides = _configProperties.get('overrides');
         var overridesArray = [];
         if(overrides!=null){
@@ -726,6 +721,7 @@ App.WizardController = Em.Controller.extend({
           serviceName: _configProperties.get('serviceName'),
           domain:  _configProperties.get('domain'),
           filename: _configProperties.get('filename'),
+          displayType: _configProperties.get('displayType'),
           overrides: overridesArray
         };
         serviceConfigProperties.push(configProperty);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/493c8ddc/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 5f5e5c2..a305b97 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -93,15 +93,6 @@ App.WizardStep7Controller = Em.Controller.extend({
     this.set('stepConfigs', serviceConfigs);
     this.activateSpecialConfigs();
     this.set('selectedService', this.get('stepConfigs').filterProperty('showConfig', true).objectAt(0));
-    this.get('stepConfigs').forEach(function(stepConfig) {
-      stepConfig.get('configs').forEach(function(config) {
-        var displayType = config.get('displayType');
-        if (displayType == 'directory' || displayType == 'directories') {
-          var value = config.get('value').replace(/,/g, "\n");
-          config.set('value', value);
-        }
-      });
-    });
   },
 
    /**

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/493c8ddc/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 46a74b3..c267bbb 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -63,10 +63,6 @@ App.WizardStep8Controller = Em.Controller.extend({
     return this.get('content.services').filterProperty('isSelected', true).filterProperty('isInstalled',
false);
   }.property('content.services').cacheable(),
 
-  configMapping: function() {
-    return App.config.get('configMapping').all();
-  }.property('App.config.configMapping'),
-
   clearStep: function () {
     this.get('services').clear();
     this.get('configs').clear();
@@ -81,12 +77,25 @@ App.WizardStep8Controller = Em.Controller.extend({
       this.set('securityEnabled', App.router.get('mainAdminSecurityController').getUpdatedSecurityStatus());
     }
     this.clearStep();
+    this.formatDirectories();
     this.loadGlobals();
     this.loadConfigs();
     this.loadClusterInfo();
     this.loadServices();
     this.set('isSubmitDisabled', false);
   },
+  /**
+   * replace whitespace character with coma between directories
+   */
+  formatDirectories: function(){
+    this.get('content.serviceConfigProperties').forEach(function(_configProperty){
+      var displayType = _configProperty.displayType;
+      if (displayType === 'directories' || displayType === 'directory') {
+        var value = _configProperty.value.trim().split(/\s+/g).join(',');
+        _configProperty.value = value;
+      }
+    });
+  },
 
   loadGlobals: function () {
     var globals = this.get('content.serviceConfigProperties').filterProperty('id', 'puppet
var');


Mime
View raw message