ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhew...@apache.org
Subject ambari git commit: AMBARI-16264 Clean up local DB when get back to step 0 of installer wizard (zhewang)
Date Thu, 05 May 2016 17:30:53 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e04bca9ba -> 1770820a7


AMBARI-16264 Clean up local DB when get back to step 0 of installer wizard (zhewang)


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

Branch: refs/heads/trunk
Commit: 1770820a7aa9aacca7a6352d70be7cde7b280556
Parents: e04bca9
Author: Zhe (Joe) Wang <zhewang@apache.org>
Authored: Thu May 5 10:29:40 2016 -0700
Committer: Zhe (Joe) Wang <zhewang@apache.org>
Committed: Thu May 5 10:29:40 2016 -0700

----------------------------------------------------------------------
 .../app/controllers/wizard/step1_controller.js  |  3 ++
 ambari-web/app/routes/installer.js              | 31 ++++++++++++++++++++
 2 files changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1770820a/ambari-web/app/controllers/wizard/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step1_controller.js b/ambari-web/app/controllers/wizard/step1_controller.js
index dc95a45..3eb5d1b 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -121,6 +121,9 @@ App.WizardStep1Controller = Em.Controller.extend({
   },
 
   changeUseRedhatSatellite: function () {
+    if (App.router.get('installerController.currentStep') !== "1") {
+      return;
+    }
     if (this.get('selectedStack.useRedhatSatellite')) {
       return App.ModalPopup.show({
         header: Em.I18n.t('common.important'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/1770820a/ambari-web/app/routes/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js
index f280049..eacf30f 100644
--- a/ambari-web/app/routes/installer.js
+++ b/ambari-web/app/routes/installer.js
@@ -104,9 +104,40 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
     next: function (router) {
       console.time('step0 next');
       var installerController = router.get('installerController');
+      var wizardStep1Controller = router.get('wizardStep1Controller');
       installerController.save('cluster');
       App.db.setStacks(undefined);
+      App.db.setRepos(undefined);
+      App.db.setLocalRepoVDFData(undefined);
+      App.Stack.find().clear();
+
       installerController.set('content.stacks',undefined);
+      wizardStep1Controller.set('skipValidationChecked', false);
+      wizardStep1Controller.set('optionsToSelect', {
+        'usePublicRepo': {
+          index: 0,
+          isSelected: true
+        },
+        'useLocalRepo': {
+          index: 1,
+          isSelected: false,
+          'uploadFile': {
+            index: 0,
+            name: 'uploadFile',
+            file: '',
+            hasError: false,
+            isSelected: true
+          },
+          'enterUrl': {
+            index: 1,
+            name: 'enterUrl',
+            url: '',
+            placeholder: 'Enter URL to Version Definition File',
+            hasError: false,
+            isSelected: false
+          }
+        }
+      });
       router.transitionTo('step1');
       console.timeEnd('step0 next');
     }


Mime
View raw message