You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/09/04 16:01:42 UTC

ambari git commit: AMBARI-13011. Add service: js error while adding service (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 09bb34e9d -> 6b3ff72dc


AMBARI-13011. Add service: js error while adding service (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 6b3ff72dc5c0b5396f15bf325922c2327622a572
Parents: 09bb34e
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Sep 4 16:29:26 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Sep 4 17:01:10 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/installer.js             |  4 ++++
 .../app/controllers/main/service/add_controller.js  | 16 +++++-----------
 .../app/controllers/wizard/step7_controller.js      |  2 +-
 .../app/mixins/common/configs/configs_loader.js     |  2 +-
 ambari-web/app/views/common/controls_view.js        |  6 ++----
 5 files changed, 13 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6b3ff72d/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index ef2d569..f01a8f8 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -233,6 +233,10 @@ App.InstallerController = App.WizardController.extend({
   loadStacks: function () {
     var stacks = this.get('content.stacks');
     var dfd = $.Deferred();
+    App.StackConfigProperty.find().clear();
+    App.Section.find().clear();
+    App.SubSection.find().clear();
+    App.Tab.find().clear();
     if (stacks && stacks.get('length')) {
       App.set('currentStackVersion', App.Stack.find().findProperty('isSelected').get('id'));
       dfd.resolve(true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b3ff72d/ambari-web/app/controllers/main/service/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/add_controller.js b/ambari-web/app/controllers/main/service/add_controller.js
index 0eac9ad..a9bfa4e 100644
--- a/ambari-web/app/controllers/main/service/add_controller.js
+++ b/ambari-web/app/controllers/main/service/add_controller.js
@@ -118,18 +118,12 @@ App.AddServiceController = App.WizardController.extend(App.AddSecurityConfigs, {
           var self = this;
           var dfd = $.Deferred();
           this.loadKerberosDescriptorConfigs().done(function() {
-            if (App.get('isClusterSupportsEnhancedConfigs')) {
-              var serviceNames = App.StackService.find().filter(function(s) {
-                return s.get('isSelected') || s.get('isInstalled');
-              }).mapProperty('serviceName');
-              self.loadConfigThemes().then(function() {
-                dfd.resolve();
-              });
-            }
-            else {
-              self.set('stackConfigsLoaded', true);
+            var serviceNames = App.StackService.find().filter(function(s) {
+              return s.get('isSelected') || s.get('isInstalled');
+            }).mapProperty('serviceName');
+            self.loadConfigThemes().then(function() {
               dfd.resolve();
-            }
+            });
             self.loadServiceConfigGroups();
             self.loadServiceConfigProperties();
           });

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b3ff72d/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 8bf69f1..10088fd 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -906,7 +906,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
       if (!Em.isNone(mappedConfigValue) && ((installedServiceNames && installedServiceNames.contains(_config.serviceName) || nonServiceTab.someProperty('serviceName', _config.serviceName)))) {
         // prevent overriding already edited properties
         if (_config.savedValue != mappedConfigValue || _config.displayType == 'password') {
-          _config.value = mappedConfigValue;
+          _config.value = App.config.formatPropertyValue(_config, mappedConfigValue);
         }
         _config.savedValue = mappedConfigValue;
         _config.hasInitialValue = true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b3ff72d/ambari-web/app/mixins/common/configs/configs_loader.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/configs_loader.js b/ambari-web/app/mixins/common/configs/configs_loader.js
index 3d2fd17..7e86921 100644
--- a/ambari-web/app/mixins/common/configs/configs_loader.js
+++ b/ambari-web/app/mixins/common/configs/configs_loader.js
@@ -148,7 +148,7 @@ App.ConfigsLoader = Em.Mixin.create(App.GroupsMappingMixin, {
         data: {
           serviceName: this.get('content.serviceName'),
           serviceConfigVersions: versions,
-          additionalParams: App.get('isClusterSupportsEnhancedConfigs') && this.get('dependentServiceNames.length') ? '|service_name.in(' +  this.get('dependentServiceNames') + ')&is_current=true' : ''
+          additionalParams: this.get('dependentServiceNames.length') ? '|service_name.in(' +  this.get('dependentServiceNames') + ')&is_current=true' : ''
         },
         success: 'loadSelectedVersionsSuccess'
       }));

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b3ff72d/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index 1eb7aa9..67006fa 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -77,9 +77,7 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
    * do not apply recommended value if user change value by himself.
    */
   keyUp: function() {
-    if (App.get('isClusterSupportsEnhancedConfigs')) {
-      this.get('controller').removeCurrentFromDependentList(this.get('serviceConfig') || this.get('config'));
-    }
+    this.get('controller').removeCurrentFromDependentList(this.get('serviceConfig') || this.get('config'));
   },
 
   /**
@@ -91,7 +89,7 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
    */
   sendRequestRorDependentConfigs: function(config) {
     if (!config || !config.get('isValid')) return $.Deferred().resolve().promise();
-    if (App.get('isClusterSupportsEnhancedConfigs') && ['mainServiceInfoConfigsController','wizardStep7Controller'].contains(this.get('controller.name'))) {
+    if (['mainServiceInfoConfigsController','wizardStep7Controller'].contains(this.get('controller.name'))) {
       var name = config.get('name');
       var saveRecommended = (this.get('config.value') === this.get('config.recommendedValue'));
       var controller = this.get('controller');