You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/04/16 01:32:04 UTC

svn commit: r1468272 - in /incubator/ambari/trunk: ./ ambari-web/app/assets/data/wizard/deploy/5_hosts/ ambari-web/app/controllers/wizard/ ambari-web/app/templates/wizard/ ambari-web/app/utils/ ambari-web/app/views/wizard/

Author: jaimin
Date: Mon Apr 15 23:32:03 2013
New Revision: 1468272

URL: http://svn.apache.org/r1468272
Log:
AMBARI-1937. Ambari-web installer wizard doesn't work in test mode. (jaimin)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/assets/data/wizard/deploy/5_hosts/poll_6.json
    incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
    incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js
    incubator/ambari/trunk/ambari-web/app/templates/wizard/step9.hbs
    incubator/ambari/trunk/ambari-web/app/utils/ajax.js
    incubator/ambari/trunk/ambari-web/app/views/wizard/step8_view.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1468272&r1=1468271&r2=1468272&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon Apr 15 23:32:03 2013
@@ -739,6 +739,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1937. Ambari-web installer wizard doesn't work in test mode. (jaimin)
+
  AMBARI-1927. In background operations popup, requests with same context
  are showing hosts/tasks info from last request. (yusaku via jaimin)
 

Modified: incubator/ambari/trunk/ambari-web/app/assets/data/wizard/deploy/5_hosts/poll_6.json
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/assets/data/wizard/deploy/5_hosts/poll_6.json?rev=1468272&r1=1468271&r2=1468272&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/assets/data/wizard/deploy/5_hosts/poll_6.json (original)
+++ incubator/ambari/trunk/ambari-web/app/assets/data/wizard/deploy/5_hosts/poll_6.json Mon Apr 15 23:32:03 2013
@@ -1,405 +1,7 @@
 {
-  "href" : "http://ambari:8080/api/clusters/mycluster/requests/2?fields=tasks/*",
-  "Requests" : {
-    "id" : 2,
-    "cluster_name" : "mycluster"
-  },
-  "tasks" : [
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/37",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host4",
-        "id" : 37,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "TASKTRACKER",
-        "start_time" : -1,
-        "stage_id" : 2
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/25",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host1",
-        "id" : 25,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "GANGLIA_MONITOR",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/42",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host2",
-        "id" : 42,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "EXECUTE",
-        "role" : "PIG_SERVICE_CHECK",
-        "start_time" : -1,
-        "stage_id" : 3
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/32",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host2",
-        "id" : 32,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "DATANODE",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/31",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host4",
-        "id" : 31,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "GANGLIA_MONITOR",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/33",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host2",
-        "id" : 33,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "GANGLIA_MONITOR",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/26",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host5",
-        "id" : 26,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "GANGLIA_MONITOR",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/44",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host2",
-        "id" : 44,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "EXECUTE",
-        "role" : "OOZIE_SERVICE_CHECK",
-        "start_time" : -1,
-        "stage_id" : 4
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/36",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host1",
-        "id" : 36,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "TASKTRACKER",
-        "start_time" : -1,
-        "stage_id" : 2
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/34",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host3",
-        "id" : 34,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "JOBTRACKER",
-        "start_time" : -1,
-        "stage_id" : 2
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/35",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host3",
-        "id" : 35,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "SECONDARY_NAMENODE",
-        "start_time" : -1,
-        "stage_id" : 2
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/38",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host2",
-        "id" : 38,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "EXECUTE",
-        "role" : "HDFS_SERVICE_CHECK",
-        "start_time" : -1,
-        "stage_id" : 2
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/29",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host5",
-        "id" : 29,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "NAMENODE",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/28",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host5",
-        "id" : 28,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "NAGIOS_SERVER",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/24",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host1",
-        "id" : 24,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "DATANODE",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/40",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host3",
-        "id" : 40,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "OOZIE_SERVER",
-        "start_time" : -1,
-        "stage_id" : 3
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/39",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host2",
-        "id" : 39,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "TASKTRACKER",
-        "start_time" : -1,
-        "stage_id" : 2
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/23",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host3",
-        "id" : 23,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "GANGLIA_MONITOR",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/27",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host5",
-        "id" : 27,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "GANGLIA_SERVER",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/30",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host4",
-        "id" : 30,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "START",
-        "role" : "DATANODE",
-        "start_time" : -1,
-        "stage_id" : 1
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/43",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host2",
-        "id" : 43,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "EXECUTE",
-        "role" : "SQOOP_SERVICE_CHECK",
-        "start_time" : -1,
-        "stage_id" : 3
-      }
-    },
-    {
-      "href" : "http://ambari:8080/api/clusters/mycluster/requests/2/tasks/41",
-      "Tasks" : {
-        "exit_code" : 999,
-        "stdout" : "",
-        "status" : "PENDING",
-        "stderr" : "",
-        "host_name" : "host2",
-        "id" : 41,
-        "cluster_name" : "mycluster",
-        "attempt_cnt" : 0,
-        "request_id" : 2,
-        "command" : "EXECUTE",
-        "role" : "MAPREDUCE_SERVICE_CHECK",
-        "start_time" : -1,
-        "stage_id" : 3
-      }
-    }
-  ]
+"href" : "http://ambari:8080/api/v1/clusters/mycluster/requests/2",
+"Requests" : {
+"id" : 2,
+"status" : "InProgress"
+}
 }
\ No newline at end of file

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=1468272&r1=1468271&r2=1468272&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 Mon Apr 15 23:32:03 2013
@@ -867,15 +867,13 @@ App.WizardStep8Controller = Em.Controlle
       default:
         break;
     }
-
     // delete any existing clusters to start from a clean slate
     // before creating a new cluster in install wizard
     // TODO: modify for multi-cluster support
-    if (this.get('content.controllerName') == 'installerController') {
+    if (this.get('content.controllerName') == 'installerController' && (!App.testMode)) {
       var clusterNames = this.getExistingClusterNames();
       this.deleteClusters(clusterNames);
     }
-
     this.createCluster();
     this.createSelectedServices();
     this.createConfigurations();

Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js?rev=1468272&r1=1468271&r2=1468272&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js Mon Apr 15 23:32:03 2013
@@ -151,6 +151,7 @@ App.WizardStep9Controller = Em.Controlle
       // this is for repeatedly testing out installs in test mode
       this.set('content.cluster.status', 'PENDING');
       this.set('content.cluster.isCompleted', false);
+      this.set('content.cluster.requestId',1);
     }
     var clusterStatus = this.get('content.cluster.status');
     console.log('navigateStep: clusterStatus = ' + clusterStatus);
@@ -514,7 +515,7 @@ App.WizardStep9Controller = Em.Controlle
           status: 'PENDING',
           requestId: requestId,
           isCompleted: false
-        }
+        };
         if (this.get('status') === 'failed') {
           clusterStatus.status = 'INSTALL FAILED';
           this.set('progress', '100');
@@ -634,14 +635,12 @@ App.WizardStep9Controller = Em.Controlle
     var requestsId = App.db.getCluster().oldRequestsId;
     if (App.testMode) {
       this.POLL_INTERVAL = 1;
-      this.numPolls++;
     }
 
     requestsId.forEach(function(requestId) {
       url = this.getUrl(requestId);
       if (App.testMode) {
         this.POLL_INTERVAL = 1;
-
         url = this.get('mockDataPrefix') + '/poll_' + this.numPolls + '.json';
       }
       this.getLogsByRequest(url, false);
@@ -715,61 +714,5 @@ App.WizardStep9Controller = Em.Controlle
     if (!this.get('isSubmitDisabled')) {
       App.router.send('back');
     }
-  },
-
-  mockBtn: function () {
-    this.set('isSubmitDisabled', false);
-    this.hosts.clear();
-    var hostInfo = this.mockHostData;
-    this.renderHosts(hostInfo);
-  },
-
-  pollBtn: function () {
-    this.set('isSubmitDisabled', false);
-    var data1 = require('data/mock/step9PolledData/pollData_1');
-    var data2 = require('data/mock/step9PolledData/pollData_2');
-    var data3 = require('data/mock/step9PolledData/pollData_3');
-    var data4 = require('data/mock/step9PolledData/pollData_4');
-    var data5 = require('data/mock/step9PolledData/pollData_5');
-    var data6 = require('data/mock/step9PolledData/pollData_6');
-    var data7 = require('data/mock/step9PolledData/pollData_7');
-    var data8 = require('data/mock/step9PolledData/pollData_8');
-    var data9 = require('data/mock/step9PolledData/pollData_9');
-    console.log("TRACE: In pollBtn function data1");
-    var counter = parseInt(this.get('pollDataCounter')) + 1;
-    this.set('pollDataCounter', counter.toString());
-    switch (this.get('pollDataCounter')) {
-      case '1':
-        this.parseHostInfo(data1);
-        break;
-      case '2':
-        this.parseHostInfo(data2);
-        break;
-      case '3':
-        this.parseHostInfo(data3);
-        break;
-      case '4':
-        this.parseHostInfo(data4);
-        break;
-      case '5':
-        this.parseHostInfo(data5);
-        break;
-      case '6':
-        this.set('content.cluster.status', 'INSTALLED');
-        this.parseHostInfo(data6);
-        break;
-      case '7':
-        this.parseHostInfo(data7);
-        break;
-      case '8':
-        this.parseHostInfo(data8);
-        break;
-      case '9':
-        this.parseHostInfo(data9);
-        break;
-      default:
-        break;
-    }
   }
-
 });

Modified: incubator/ambari/trunk/ambari-web/app/templates/wizard/step9.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/wizard/step9.hbs?rev=1468272&r1=1468271&r2=1468272&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/wizard/step9.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/wizard/step9.hbs Mon Apr 15 23:32:03 2013
@@ -44,15 +44,6 @@
           {{t common.retry}}
         </a>
         {{/if}}
-        {{#if App.testMode}}
-        <a class="btn btn-info" href="#" {{action mockBtn target="controller"}}>
-          {{t installer.mockData}}
-        </a>
-        <a class="btn btn-primary"
-           href="#" {{action pollBtn target="controller"}}><i class="icon-repeat icon-white"></i>
-          {{t installer.pollData}}
-        </a>
-        {{/if}}
       </div>
       <!-- filter by host level -->
       <div id="host-filter" class="pull-right">

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=1468272&r1=1468271&r2=1468272&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/ajax.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/ajax.js Mon Apr 15 23:32:03 2013
@@ -52,10 +52,10 @@ var urls = {
       return {
         type: 'PUT',
         data: JSON.stringify({
-          RequestInfo : {
-            "context" : data.requestInfo
+          RequestInfo: {
+            "context": data.requestInfo
           },
-          Body:{
+          Body: {
             ServiceInfo: {
               state: data.state
             }
@@ -71,8 +71,8 @@ var urls = {
       return {
         'type': 'POST',
         data: JSON.stringify({
-          RequestInfo : {
-            "context" : "Smoke Test"
+          RequestInfo: {
+            "context": "Smoke Test"
           }
         })
       };
@@ -85,10 +85,10 @@ var urls = {
     'format': function (data) {
       return {
         data: JSON.stringify({
-          RequestInfo : {
-            "context" : "Stop service " + data.serviceName
+          RequestInfo: {
+            "context": "Stop service " + data.serviceName
           },
-          Body:{
+          Body: {
             ServiceInfo: {
               "state": "INSTALLED"
             }
@@ -120,11 +120,11 @@ var urls = {
     'format': function () {
       return {
         data: JSON.stringify(
-            {
-              "HostRoles": {
-                "state": "MAINTENANCE"
-              }
+          {
+            "HostRoles": {
+              "state": "MAINTENANCE"
             }
+          }
         )
       }
     }
@@ -136,10 +136,10 @@ var urls = {
     'format': function (data) {
       return {
         data: JSON.stringify({
-          RequestInfo : {
-            "context" : "Install " + data.componentName
+          RequestInfo: {
+            "context": "Install " + data.componentName
           },
-          Body:{
+          Body: {
             "HostRoles": {
               "state": "INSTALLED"
             }
@@ -155,10 +155,10 @@ var urls = {
     'format': function (data) {
       return {
         data: JSON.stringify({
-          RequestInfo : {
-            "context" : "Start service " + data.serviceName
+          RequestInfo: {
+            "context": "Start service " + data.serviceName
           },
-          Body:{
+          Body: {
             ServiceInfo: {
               "state": "INSTALLED"
             }
@@ -202,7 +202,7 @@ var urls = {
   'config.advanced': {
     'real': '{stack2VersionUrl}/stackServices/{serviceName}/configurations?fields=*',
     'mock': '/data/wizard/stack/hdp/version130/{serviceName}.json',
-    'format': function(data){
+    'format': function (data) {
       return {
         async: false
       };
@@ -211,7 +211,7 @@ var urls = {
   'config.advanced.global': {
     'real': '{stack2VersionUrl}/stackServices?fields=configurations/StackConfigurations/type',
     'mock': '/data/wizard/stack/hdp/version130/global.json',
-    'format': function(data){
+    'format': function (data) {
       return {
         async: false
       };
@@ -224,7 +224,7 @@ var urls = {
   'config.on-site': {
     'real': '/clusters/{clusterName}/configurations?{params}',
     'mock': '/data/configurations/cluster_level_configs.json?{params}',
-    'format': function(data){
+    'format': function (data) {
       return {
         async: false
       };
@@ -233,7 +233,7 @@ var urls = {
   'config.host_overrides': {
     'real': '/clusters/{clusterName}/configurations?{params}',
     'mock': '/data/configurations/host_level_overrides_configs.json?{params}',
-    'format': function(data){
+    'format': function (data) {
       return {
         async: false
       };
@@ -503,7 +503,7 @@ var urls = {
     }
   },
   'admin.stack_upgrade.run_upgrade': {
-    'real':'/clusters/{clusterName}',
+    'real': '/clusters/{clusterName}',
     'format': function (data, opt) {
       return {
         type: 'PUT',
@@ -590,11 +590,15 @@ var urls = {
     'real': '/clusters/{cluster}/services?ServiceInfo/state=INSTALLED&params/run_smoke_test=true',
     'mock': '/data/wizard/deploy/5_hosts/poll_6.json',
     'format': function (data, opt) {
-      return {
+      var data = {
         type: 'PUT',
         async: false,
         data: data.data
       };
+      if (App.testMode) {
+        data.type = 'GET';
+      }
+      return data;
     }
   },
   'wizard.step9.add_host.launch_start_services': {
@@ -670,11 +674,11 @@ var urls = {
  * @param {Object} data
  * @return {String}
  */
-var formatUrl = function(url, data) {
+var formatUrl = function (url, data) {
   var keys = url.match(/\{\w+\}/g);
-  keys = (keys === null) ? [] :  keys;
+  keys = (keys === null) ? [] : keys;
   if (keys) {
-    keys.forEach(function(key){
+    keys.forEach(function (key) {
       var raw_key = key.substr(1, key.length - 2);
       var replace;
       if (!data[raw_key]) {
@@ -693,14 +697,14 @@ var formatUrl = function(url, data) {
  * this = object from config
  * @return {Object}
  */
-var formatRequest = function(data) {
+var formatRequest = function (data) {
   var opt = {
-    type : this.type || 'GET',
-    timeout : App.timeout,
+    type: this.type || 'GET',
+    timeout: App.timeout,
     dataType: 'json',
     statusCode: require('data/statusCodes')
   };
-  if(App.testMode) {
+  if (App.testMode) {
     opt.url = formatUrl(this.mock, data);
     opt.type = 'GET';
   }
@@ -708,7 +712,7 @@ var formatRequest = function(data) {
     opt.url = App.apiPrefix + formatUrl(this.real, data);
   }
 
-  if(this.format) {
+  if (this.format) {
     jQuery.extend(opt, this.format(data, opt));
   }
   return opt;
@@ -735,7 +739,7 @@ App.ajax = {
    *  error - method-name for ajax error response callback
    *  callback - callback from <code>App.updater.run</code> library
    */
-  send: function(config) {
+  send: function (config) {
 
     console.warn('============== ajax ==============', config.name, config.data);
 
@@ -758,28 +762,28 @@ App.ajax = {
     opt = formatRequest.call(urls[config.name], params);
 
     // object sender should be provided for processing beforeSend, success and error responses
-    opt.beforeSend = function(xhr) {
-      if(config.beforeSend) {
+    opt.beforeSend = function (xhr) {
+      if (config.beforeSend) {
         config.sender[config.beforeSend](opt, xhr, params);
       }
     };
-    opt.success = function(data) {
+    opt.success = function (data) {
       console.log("TRACE: The url is: " + opt.url);
-      if(config.success) {
+      if (config.success) {
         config.sender[config.success](data, opt, params);
       }
     };
-    opt.error = function(request, ajaxOptions, error) {
+    opt.error = function (request, ajaxOptions, error) {
       if (config.error) {
         config.sender[config.error](request, ajaxOptions, error, opt);
       }
     };
-    opt.complete = function(){
-      if(config.callback){
+    opt.complete = function () {
+      if (config.callback) {
         config.callback();
       }
     };
-    if($.mocho){
+    if ($.mocho) {
       opt.url = 'http://' + $.hostName + opt.url;
     }
     return $.ajax(opt);

Modified: incubator/ambari/trunk/ambari-web/app/views/wizard/step8_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/wizard/step8_view.js?rev=1468272&r1=1468271&r2=1468272&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/wizard/step8_view.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/wizard/step8_view.js Mon Apr 15 23:32:03 2013
@@ -47,7 +47,7 @@ App.WizardStep8View = Em.View.extend({
   modalPopup: null,
 
   showLoadingIndicator: function() {
-    if (!this.get('controller.isSubmitDisabled')) {
+    if (!this.get('controller.isSubmitDisabled') || App.testMode) {
       if (this.get('modalPopup')) {
         this.get('modalPopup').hide();
         this.set('modalPopup', null);