You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/05/17 02:27:09 UTC

svn commit: r1483615 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/controllers/wizard/step14_controller.js ambari-web/app/utils/ajax.js

Author: yusaku
Date: Fri May 17 00:27:09 2013
New Revision: 1483615

URL: http://svn.apache.org/r1483615
Log:
AMBARI-2150. Reassign Master Wizard: start the service after reassigning the master. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/controllers/wizard/step14_controller.js
    incubator/ambari/trunk/ambari-web/app/utils/ajax.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1483615&r1=1483614&r2=1483615&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri May 17 00:27:09 2013
@@ -297,6 +297,9 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-2150. Reassign Master Wizard: start the service after reassigning the
+ master. (yusaku)
+
  AMBARI-1887. Heatmap should display full details on mapped metric.
  (Sandeep Baldawa via yusaku)
 

Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step14_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step14_controller.js?rev=1483615&r1=1483614&r2=1483615&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard/step14_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard/step14_controller.js Fri May 17 00:27:09 2013
@@ -143,7 +143,7 @@ App.WizardStep14Controller = Em.Controll
     if (this.get('tasks')[0].status == 'INITIALIZE') {
       this.stopService();
     }
-    else if (this.get('tasks')[1].status == 'INITIALIZE') {
+    else if (this.taskIsReady(1)) {
       this.createMasterComponent();
     }
     else if (this.taskIsReady(2)) {
@@ -175,8 +175,7 @@ App.WizardStep14Controller = Em.Controll
     if (this.get('tasks')[task].status != 'INITIALIZE') {
       return false;
     }
-    var startIndex = (task == 4) ? 0 : 1;
-    var tempArr = this.get('tasks').mapProperty('status').slice(startIndex, task).uniq();
+    var tempArr = this.get('tasks').mapProperty('status').slice(0, task).uniq();
     return tempArr.length == 1 && tempArr[0] == 'COMPLETED';
   },
 
@@ -756,9 +755,9 @@ App.WizardStep14Controller = Em.Controll
         this.setTasksStatus(task, 'COMPLETED');
       }
       stopPolling = true;
-    } else if (polledData.someProperty('Tasks.status', 'IN_PROGRESS')) {
-      if (task == 5) {
-        this.get('tasks')[5].set('progress', 50);
+    } else {
+      if (polledData.length == 1) {
+        this.get('tasks')[task].set('progress', 50);
       } else {
         var progress = polledData.filterProperty('Tasks.status', 'COMPLETED').length / polledData.length * 100;
         this.get('tasks')[task].set('progress', Math.round(progress));

Modified: incubator/ambari/trunk/ambari-web/app/utils/ajax.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/ajax.js?rev=1483615&r1=1483614&r2=1483615&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/ajax.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/ajax.js Fri May 17 00:27:09 2013
@@ -160,7 +160,7 @@ var urls = {
           },
           Body: {
             ServiceInfo: {
-              "state": "INSTALLED"
+              "state": "STARTED"
             }
           }
         })