Browse Source

AMBARI-1103. Need to be able to reliably recover from the case when the browser is closed during deploy (Step 8 post submission, Step 9) of the wizard. (Arun Kandregula via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1431772 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 years ago
parent
commit
aec69090d3
2 changed files with 27 additions and 0 deletions
  1. 4 0
      CHANGES.txt
  2. 23 0
      ambari-web/app/routes/installer.js

+ 4 - 0
CHANGES.txt

@@ -458,6 +458,10 @@ AMBARI-666 branch (unreleased changes)
 
 
   IMPROVEMENTS
   IMPROVEMENTS
 
 
+  AMBARI-1103. Need to be able to reliably recover from the case when the browser
+  is closed during deploy (Step 8 post submission, Step 9) of the wizard.
+  (Arun Kandregula via yusaku)
+
   AMBARI-1099. Hive Service Summary needs to show service components better.
   AMBARI-1099. Hive Service Summary needs to show service components better.
   (Srimanth Gunturi via yusaku)
   (Srimanth Gunturi via yusaku)
 
 

+ 23 - 0
ambari-web/app/routes/installer.js

@@ -48,6 +48,13 @@ module.exports = Em.Route.extend({
                   installerController.setCurrentStep('9');
                   installerController.setCurrentStep('9');
                   App.db.data = currentClusterStatus.localdb;
                   App.db.data = currentClusterStatus.localdb;
                   break;
                   break;
+                case 'CLUSTER_INSTALLED_4' :
+                  installerController.setCurrentStep('10');
+                  App.db.data = currentClusterStatus.localdb;
+                  break;
+                case 'CLUSTER_STARTED_5' :
+                  router.transitionTo('main.index');
+                  break;
                 default:
                 default:
                   break;
                   break;
               }
               }
@@ -311,6 +318,14 @@ module.exports = Em.Route.extend({
       var installerController = router.get('installerController');
       var installerController = router.get('installerController');
       var wizardStep9Controller = router.get('wizardStep9Controller');
       var wizardStep9Controller = router.get('wizardStep9Controller');
       installerController.saveInstalledHosts(wizardStep9Controller);
       installerController.saveInstalledHosts(wizardStep9Controller);
+
+      // For recovery : set the cluster status
+      App.clusterStatus.set('value', {
+        clusterName: this.get('clusterName'),
+        clusterState: 'CLUSTER_INSTALLED_4',
+        localdb: App.db.data
+      });
+
       router.transitionTo('step10');
       router.transitionTo('step10');
     }
     }
   }),
   }),
@@ -329,6 +344,14 @@ module.exports = Em.Route.extend({
       if (true) {   // this function will be moved to installerController where it will validate
       if (true) {   // this function will be moved to installerController where it will validate
         var controller = router.get('installerController');
         var controller = router.get('installerController');
         controller.finish();
         controller.finish();
+
+        // For recovery : set the cluster status
+        App.clusterStatus.set('value', {
+          clusterName: this.get('clusterName'),
+          clusterState: 'CLUSTER_STARTED_5',
+          localdb: App.db.data
+        });
+
         router.transitionTo('main.index');
         router.transitionTo('main.index');
       } else {
       } else {
         console.log('cluster installation failure');
         console.log('cluster installation failure');