This is an automated email from the ASF dual-hosted git repository.

alexantonenko pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new b62b467  AMBARI-25425. Recommendations API error during cluster 
creation wizard
     new 767a168  Merge pull request #3140 from hiveww/AMBARI-25425-branch-2.7
b62b467 is described below

commit b62b4676e8a0b68b171553a37c1ee0c90ce28496
Author: Alex Antonenko <aantone...@hortonworks.com>
AuthorDate: Tue Nov 26 20:47:23 2019 +0200

    AMBARI-25425. Recommendations API error during cluster creation wizard
---
 ambari-web/app/mixins/common/configs/enhanced_configs.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js 
b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index 6b25886..650ac09 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -221,8 +221,10 @@ App.EnhancedConfigsMixin = 
Em.Mixin.create(App.ConfigWithOverrideRecommendationP
     var updateDependencies = Em.isArray(changedConfigs) && 
changedConfigs.length > 0;
     var stepConfigs = this.get('stepConfigs');
     var requiredTags = [];
-    const isAutoComplete = !updateDependencies;
-    this.set('isRecommendationsAutoComplete', isAutoComplete);
+    var isAutoComplete = !updateDependencies && 
this.get('isRecommendationsAutoComplete') !== undefined;
+    if (this.get('isRecommendationsAutoComplete') !== undefined) {
+      this.set('isRecommendationsAutoComplete', isAutoComplete);
+    }
 
     if (updateDependencies || Em.isNone(this.get('recommendationsConfigs'))) {
       var recommendations = isAutoComplete ? {} : this.get('hostGroups');
@@ -267,7 +269,7 @@ App.EnhancedConfigsMixin = 
Em.Mixin.create(App.ConfigWithOverrideRecommendationP
    * @param stepConfigs
    */
   addRecommendationRequestParams: function(recommendations, dataToSend, 
stepConfigs) {
-    const isAutoComplete = Boolean(this.get('isRecommendationsAutoComplete'));
+    var isAutoComplete = Boolean(this.get('isRecommendationsAutoComplete'));
     if (!isAutoComplete) {
         recommendations.blueprint.configurations = 
blueprintUtils.buildConfigsJSON(stepConfigs);
     }

Reply via email to