ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
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 GMT
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 <ababiichuk@hortonworks.com>
Authored: Thu May 26 18:54:11 2016 +0300
Committer: ababiichuk <ababiichuk@hortonworks.com>
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'));


Mime
View raw message