Repository: ambari Updated Branches: refs/heads/branch-2.4 a54c63c71 -> 57e13815e
AMBARI-17852 TDE encryption didnt happen as key wasnt created. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/57e13815 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/57e13815 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/57e13815 Branch: refs/heads/branch-2.4 Commit: 57e13815eb8bd530b20c6f0a788acf39249e39d3 Parents: a54c63c Author: ababiichuk <[email protected]> Authored: Fri Jul 22 15:06:48 2016 +0300 Committer: ababiichuk <[email protected]> Committed: Fri Jul 22 18:34:56 2016 +0300 ---------------------------------------------------------------------- .../app/controllers/wizard/step7_controller.js | 10 +++++--- .../mixins/common/configs/enhanced_configs.js | 25 +++++++++++++++++++- .../test/controllers/wizard/step7_test.js | 2 +- 3 files changed, 32 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/57e13815/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 62a48d7..fcb5c0b 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -297,7 +297,8 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E configValidationGlobalMessage: [], submitButtonClicked: false, isSubmitDisabled: true, - isRecommendedLoaded: false + isRecommendedLoaded: false, + initialRecommendations: [] }); this.get('stepConfigs').clear(); this.set('filter', ''); @@ -568,10 +569,13 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E }, completeConfigLoading: function() { - this.clearRecommendationsByServiceName(App.StackService.find().filterProperty('isSelected').mapProperty('serviceName')); + this.clearRecommendationsByServiceName(App.StackService.find().filter(function (s) { + return s.get('isSelected') && !s.get('isInstalled'); + }).mapProperty('serviceName')); + this.saveInitialRecommendations(); + this.set('isRecommendedLoaded', true); console.timeEnd('loadConfigRecommendations execution time: '); console.timeEnd('wizard loadStep: '); - this.set('isRecommendedLoaded', true); if (this.get('content.skipConfigStep')) { App.router.send('next'); } http://git-wip-us.apache.org/repos/asf/ambari/blob/57e13815/ambari-web/app/mixins/common/configs/enhanced_configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index 4436cbb..923734d 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -43,6 +43,13 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP recommendationsConfigs: null, /** + * list of recommendations that should be applied without any config changes + * + * @type {Object[]} + */ + initialRecommendations: [], + + /** * flag is true when Ambari changes some of the dependent properties * @type {boolean} */ @@ -273,8 +280,18 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP loadRecommendationsSuccess: function (data, opt, params) { this._saveRecommendedValues(data, params.dataToSend.changed_configurations); if (this.isConfigHasInitialState()) { + /** clearing all recommendations info **/ this.undoRedoRecommended(this.get('recommendations'), false); this.clearAllRecommendations(); + + /** + * resetting recommendations to initial state + * this case can be present when installed services depends on new added service on ADW + **/ + this.undoRedoRecommended(this.get('initialRecommendations'), true); + this.get('initialRecommendations').forEach(function (r) { + this.get('recommendations').pushObject(r); + }, this); } this.set("recommendationsConfigs", Em.get(data, "resources.0.recommendations.blueprint.configurations")); }, @@ -393,7 +410,13 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP } }, this); }, - + + saveInitialRecommendations: function() { + this.get('recommendations').forEach(function (r) { + this.get('initialRecommendations').pushObject(r); + }, this); + }, + /** * disable saving recommended value for current config * @param config http://git-wip-us.apache.org/repos/asf/ambari/blob/57e13815/ambari-web/test/controllers/wizard/step7_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js index 94b222a..7aa559a 100644 --- a/ambari-web/test/controllers/wizard/step7_test.js +++ b/ambari-web/test/controllers/wizard/step7_test.js @@ -997,7 +997,7 @@ describe('App.InstallerStep7Controller', function () { isSelected: false }); }, - filterProperty: function () { + filter: function () { return []; } }
