Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 21D3D200AE2 for ; Fri, 27 May 2016 11:13:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 20450160A12; Fri, 27 May 2016 09:13:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4119616099F for ; Fri, 27 May 2016 11:13:01 +0200 (CEST) Received: (qmail 33841 invoked by uid 500); 27 May 2016 09:13:00 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 33832 invoked by uid 99); 27 May 2016 09:13:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2016 09:13:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 59A83DFD43; Fri, 27 May 2016 09:13:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ababiichuk@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-16902 Going back form review page to config page on Installer and ADW clears min/max recommendatoins. (ababiichuk) Date: Fri, 27 May 2016 09:13:00 +0000 (UTC) archived-at: Fri, 27 May 2016 09:13:02 -0000 Repository: ambari Updated Branches: refs/heads/branch-2.4 c2e741e52 -> 5ecd3244d AMBARI-16902 Going back form review page to config page on Installer and ADW clears min/max recommendatoins. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5ecd3244 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5ecd3244 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5ecd3244 Branch: refs/heads/branch-2.4 Commit: 5ecd3244d4d3fd6a2dcb04ea11dbe60e259a8bad Parents: c2e741e Author: ababiichuk Authored: Thu May 26 18:54:11 2016 +0300 Committer: ababiichuk Committed: Fri May 27 11:46:44 2016 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/installer.js | 6 ------ ambari-web/app/controllers/wizard.js | 19 ++++++++++++++++--- .../app/controllers/wizard/step3_controller.js | 8 ++++---- ambari-web/app/routes/add_service_routes.js | 3 +-- ambari-web/app/routes/installer.js | 8 +++----- 5 files changed, 24 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/5ecd3244/ambari-web/app/controllers/installer.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index 7d65ddc..43a5e4a 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -238,12 +238,6 @@ App.InstallerController = App.WizardController.extend({ loadStacks: function () { var stacks = this.get('content.stacks'); var dfd = $.Deferred(); - App.configsCollection.clearAll(); - App.Section.find().clear(); - App.SubSection.find().clear(); - App.SubSectionTab.find().clear(); - App.Tab.find().clear(); - this.set('stackConfigsLoaded', false); if (stacks && stacks.get('length')) { App.set('currentStackVersion', App.Stack.find().findProperty('isSelected').get('stackNameVersion')); dfd.resolve(true); http://git-wip-us.apache.org/repos/asf/ambari/blob/5ecd3244/ambari-web/app/controllers/wizard.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index f2b7b8b..d5e946c 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -1325,15 +1325,28 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM }); }); }); - } - else { + } else { dfd.resolve(); - this.set('stackConfigsLoaded', true); } return dfd.promise(); }, /** + * Clear all config static data + * and theme info + * + * @method clearEnhancedConfigs + */ + clearEnhancedConfigs: function() { + App.configsCollection.clearAll(); + App.Section.find().clear(); + App.SubSection.find().clear(); + App.SubSectionTab.find().clear(); + App.Tab.find().clear(); + this.set('stackConfigsLoaded', false); + }, + + /** * Cache "stepConfigs" to local storage in name value pairs * @param stepController */ http://git-wip-us.apache.org/repos/asf/ambari/blob/5ecd3244/ambari-web/app/controllers/wizard/step3_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js index f4a7d18..38bb5d7 100644 --- a/ambari-web/app/controllers/wizard/step3_controller.js +++ b/ambari-web/app/controllers/wizard/step3_controller.js @@ -1675,15 +1675,15 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, { return App.showConfirmationPopup( function () { self.set('confirmedHosts', self.get('bootHosts')); - App.router.nextBtnClickInProgress = true; - App.router.send('next'); + App.set('router.nextBtnClickInProgress', true); + App.get('router').send('next'); }, Em.I18n.t('installer.step3.hostWarningsPopup.hostHasWarnings')); } else { this.set('confirmedHosts', this.get('bootHosts')); - App.router.nextBtnClickInProgress = true; - App.router.send('next'); + App.set('router.nextBtnClickInProgress', true); + App.get('router').send('next'); } return null; }, http://git-wip-us.apache.org/repos/asf/ambari/blob/5ecd3244/ambari-web/app/routes/add_service_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js index ef6ea6d..0a20ccf 100644 --- a/ambari-web/app/routes/add_service_routes.js +++ b/ambari-web/app/routes/add_service_routes.js @@ -122,8 +122,7 @@ module.exports = App.WizardRoute.extend({ var wizardStep5Controller = router.get('wizardStep5Controller'); wizardStep5Controller.clearRecommendations(); // Force reload recommendation between steps 1 and 2 addServiceController.setDBProperty('recommendations', undefined); - addServiceController.set('stackConfigsLoaded', false); - App.configsCollection.clearAll(); + addServiceController.clearEnhancedConfigs(); router.transitionTo('step2'); } }), http://git-wip-us.apache.org/repos/asf/ambari/blob/5ecd3244/ambari-web/app/routes/installer.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js index 8d21008..b8b9532 100644 --- a/ambari-web/app/routes/installer.js +++ b/ambari-web/app/routes/installer.js @@ -163,8 +163,8 @@ module.exports = Em.Route.extend(App.RouterRedirections, { var installerController = router.get('installerController'); installerController.validateJDKVersion(function() { installerController.checkRepoURL(wizardStep1Controller).done(function () { - App.router.nextBtnClickInProgress = true; - router.transitionInProgress = true; + App.set('router.nextBtnClickInProgress', true); + router.set('transitionInProgress', true); installerController.setDBProperty('service', undefined); installerController.setStacks(); installerController.clearInstallOptions(); @@ -279,8 +279,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, { recommendations: undefined, masterComponentHosts: undefined }); - controller.set('stackConfigsLoaded', false); - App.configsCollection.clearAll(); + controller.clearEnhancedConfigs(); router.transitionTo('step5'); } console.timeEnd('step4 next'); @@ -299,7 +298,6 @@ module.exports = Em.Route.extend(App.RouterRedirections, { servicesMasters: [], isInitialLayout: true }); - controller.set('stackConfigsLoaded', false); controller.setCurrentStep('5'); controller.loadAllPriorSteps().done(function () { controller.connectOutlet('wizardStep5', controller.get('content'));