Author: yusaku
Date: Fri Jan 11 02:27:18 2013
New Revision: 1431822

URL: http://svn.apache.org/viewvc?rev=1431822&view=rev
Log:
AMBARI-1141. In some cases, clicking "Register and Confirm" button does not do 
anything. (Arun Kandregula via yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
    incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
    incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
    incubator/ambari/trunk/ambari-web/app/routes/installer.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1431822&r1=1431821&r2=1431822&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Jan 11 02:27:18 2013
@@ -674,6 +674,9 @@ AMBARI-666 branch (unreleased changes)
   OPTIMIZATIONS
 
   BUG FIXES
+
+  AMBARI-1141. In some cases, clicking "Register and Confirm" button does
+  not do anything. (Arun Kandregula via yusaku)
  
   AMBARI-1140. Resuming deploy for Installer/Add Hosts does not work if the
   browser is shut down during the start phase of deploy.

Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard.js?rev=1431822&r1=1431821&r2=1431822&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard.js Fri Jan 11 
02:27:18 2013
@@ -526,6 +526,20 @@ App.WizardController = Em.Controller.ext
       }, this);
     }
     this.set('content.slaveGroupProperties', groupConfigProperties);
+  },
+
+  registerErrPopup: function (header, message) {
+    App.ModalPopup.show({
+      header: header,
+      secondary: false,
+      onPrimary: function () {
+        this.hide();
+      },
+      bodyClass: Ember.View.extend({
+        template: 
Ember.Handlebars.compile(['<p>{{view.message}}</p>'].join('\n')),
+        message: message
+      })
+    });
   }
 
 })

Modified: 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js?rev=1431822&r1=1431821&r2=1431822&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js 
(original)
+++ 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js 
Fri Jan 11 02:27:18 2013
@@ -216,7 +216,10 @@ App.WizardStep2Controller = Em.Controlle
     }
 
     var requestId = 
App.router.get(this.get('content.controllerName')).launchBootstrap(bootStrapData);
-    if(requestId) {
+    if (requestId == '0') {
+      var controller = App.router.get(App.clusterStatus.wizardControllerName);
+      controller.registerErrPopup('Information', 'Host Registration is 
currently in progress.  Please try again later.');
+    } else if (requestId) {
       this.set('content.installOptions.bootRequestId', requestId);
       this.saveHosts();
     }

Modified: 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js?rev=1431822&r1=1431821&r2=1431822&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js 
(original)
+++ 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js 
Fri Jan 11 02:27:18 2013
@@ -1436,21 +1436,6 @@ App.WizardStep8Controller = Em.Controlle
 
   },
 
-  registerErrPopup: function (header, message) {
-
-    App.ModalPopup.show({
-      header: header,
-      secondary: false,
-      onPrimary: function () {
-        this.hide();
-      },
-      bodyClass: Ember.View.extend({
-        template: 
Ember.Handlebars.compile(['<p>{{view.message}}</p>'].join('\n')),
-        message: message
-      })
-    });
-  },
-
   /**
    * We need to do a lot of ajax calls(about 10 or more) async in special 
order.
    * To do this i generate array of ajax objects and then send requests step 
by step.
@@ -1493,7 +1478,8 @@ App.WizardStep8Controller = Em.Controlle
 
     params.error = function (xhr, status, error) {
       var responseText = JSON.parse(xhr.responseText);
-      self.registerErrPopup("Error", responseText.message);
+      var controller = App.router.get(App.clusterStatus.wizardControllerName);
+      controller.registerErrPopup("Error", responseText.message);
       self.set('isSubmitDisabled', true);
       self.set('hasErrorOccurred', true);
     }

Modified: incubator/ambari/trunk/ambari-web/app/routes/installer.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/installer.js?rev=1431822&r1=1431821&r2=1431822&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/installer.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/installer.js Fri Jan 11 
02:27:18 2013
@@ -25,6 +25,8 @@ module.exports = Em.Route.extend({
   enter: function (router) {
     console.log('in /installer:enter');
 
+    
App.clusterStatus.set('wizardControllerName',App.router.get('installerController.name'));
+
     if (router.getAuthenticated()) {
       var name = 'Cluster Install Wizard';
       $('title').text('Ambari - ' + name);


Reply via email to