incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1406448 - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/app/ ambari-web/app/assets/data/wizard/ ambari-web/app/assets/data/wizard/deploy/ ambari-web/app/controllers/ ambari-web/app/controllers/main/host/ ambari-web/app/controller...
Date Wed, 07 Nov 2012 04:15:02 GMT
Author: yusaku
Date: Wed Nov  7 04:15:01 2012
New Revision: 1406448

URL: http://svn.apache.org/viewvc?rev=1406448&view=rev
Log:
AMBARI-947. Make it easier to test Deploy (Install, Start + Test) step of the wizard. (yusaku)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_1.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_2.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_3.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_4.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5_failed.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_6.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_7.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_8.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_9.json
Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1406448&r1=1406447&r2=1406448&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Wed Nov  7 04:15:01 2012
@@ -365,6 +365,9 @@ AMBARI-666 branch (unreleased changes)
 
   IMPROVEMENTS
 
+  AMBARI-947. Make it easier to test Deploy (Install, Start + Test) step
+  of the wizard. (yusaku)
+
   AMBARI-978. Refactor App Browser code. (yusaku)
 
   AMBARI-977. Refactor Wizard and Cluster Management code. (yusaku)

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_1.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_1.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_1.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_1.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,40 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
+  "Requests" : {
+    "id" : 1
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "PENDING",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "PENDING",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    }
+  ]
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_2.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_2.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_2.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_2.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,40 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
+  "Requests" : {
+    "id" : 1
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "QUEUED",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "QUEUED",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    }
+  ]
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_3.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_3.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_3.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_3.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,40 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
+  "Requests" : {
+    "id" : 1
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "QUEUED",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "IN_PROGRESS",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    }
+  ]
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_4.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_4.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_4.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_4.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,40 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
+  "Requests" : {
+    "id" : 1
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "IN_PROGRESS",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "COMPLETED",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    }
+  ]
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,40 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
+  "Requests" : {
+    "id" : 1
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "COMPLETED",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "COMPLETED",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    }
+  ]
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5_failed.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5_failed.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5_failed.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_5_failed.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,41 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/1",
+  "Requests" : {
+    "id" : 1
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "COMPLETED",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "FAILED",
+        "command" : "INSTALL",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1",
+        "sf" : "100"
+      }
+    }
+  ]
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_6.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_6.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_6.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_6.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,40 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/2",
+  "Requests" : {
+    "id" : 2
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/2/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "QUEUED",
+        "command" : "START",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/2/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "QUEUED",
+        "command" : "START",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    }
+  ]
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_7.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_7.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_7.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_7.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,40 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/2",
+  "Requests" : {
+    "id" : 2
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/2/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "QUEUED",
+        "command" : "START",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/2/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "IN_PROGRESS",
+        "command" : "START",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    }
+  ]
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_8.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_8.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_8.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_8.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,40 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/2",
+  "Requests" : {
+    "id" : 2
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/2/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "IN_PROGRESS",
+        "command" : "START",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/2/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "COMPLETED",
+        "command" : "START",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    }
+  ]
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_9.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_9.json?rev=1406448&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_9.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/poll_9.json
Wed Nov  7 04:15:01 2012
@@ -0,0 +1,40 @@
+{
+  "href" : "http://localhost:8080/api/clusters/mycluster/requests/2",
+  "Requests" : {
+    "id" : 2
+  },
+  "tasks" : [
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/2/tasks/1",
+      "Tasks" : {
+        "id" : "1",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "COMPLETED",
+        "command" : "START",
+        "start_time" : "-1",
+        "role" : "DATANODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    },
+    {
+      "href" : "http://localhost:8080/api/clusters/mycluster/requests/2/tasks/2",
+      "Tasks" : {
+        "id" : "2",
+        "attempt_cnt" : "0",
+        "exit_code" : "999",
+        "stdout" : "",
+        "status" : "COMPLETED",
+        "command" : "START",
+        "start_time" : "-1",
+        "role" : "NAMENODE",
+        "stderr" : "",
+        "host_name" : "localhost.localdomain",
+        "stage_id" : "1"
+      }
+    }
+  ]
+}
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js?rev=1406448&r1=1406447&r2=1406448&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer.js Wed Nov 
7 04:15:01 2012
@@ -200,14 +200,6 @@ App.InstallerController = Em.Controller.
     }
   },
 
-  /**
-   *
-   * @param cluster ClusterModel
-   */
-  createCluster: function (cluster) {
-    alert('created cluster ' + cluster.name);
-  },
-
   content: Em.Object.create({
     cluster: null,
     hosts: null,
@@ -713,10 +705,11 @@ App.InstallerController = Em.Controller.
   installServices: function () {
     var self = this;
     var clusterName = this.get('content.cluster.name');
-    var url = '/api/clusters/' + clusterName + '/services?state=INIT';
+    var url = (App.testMode) ? '/data/wizard/deploy/poll_1.json' : '/api/clusters/' + clusterName
+ '/services?state=INIT';
+    var method = (App.testMode) ? 'GET' : 'PUT';
     var data = '{"ServiceInfo": {"state": "INSTALLED"}}';
     $.ajax({
-      type: 'PUT',
+      type: method,
       url: url,
       data: data,
       async: false,

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js?rev=1406448&r1=1406447&r2=1406448&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/add_controller.js
Wed Nov  7 04:15:01 2012
@@ -278,7 +278,7 @@ App.AddHostController = Em.Controller.ex
       hostsInfo.localRepoPath = '';
     }
 
-    hostsInfo.sshKey = 'random';
+    hostsInfo.sshKey = '';
     hostsInfo.passphrase = '';
     hostsInfo.confirmPassphrase = '';
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js?rev=1406448&r1=1406447&r2=1406448&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
Wed Nov  7 04:15:01 2012
@@ -421,6 +421,12 @@ App.WizardStep8Controller = Em.Controlle
    * Onclick handler for <code>next</code> button
    */
   submit: function () {
+
+    if (App.testMode) {
+      App.router.send('next');
+      return;
+    }
+
     this.createCluster();
     this.createSelectedServices();
     this.createConfigurations();
@@ -428,6 +434,7 @@ App.WizardStep8Controller = Em.Controlle
     this.createComponents();
     this.registerHostsToCluster();
     this.createHostComponents();
+
     App.router.send('next');
   },
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js?rev=1406448&r1=1406447&r2=1406448&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
Wed Nov  7 04:15:01 2012
@@ -55,7 +55,7 @@ App.WizardStep9Controller = Em.Controlle
       } else if (App.db.getClusterStatus().isStartError === true) {
         this.launchStartServices();
       } else {
-        this.startPolling(); //TODO: uncomment for the actual hookup
+        this.startPolling();
       }
     } else {
       this.set('isStepCompleted', true);
@@ -203,8 +203,17 @@ App.WizardStep9Controller = Em.Controlle
     var clusterName = this.get('content.cluster.name');
     var url = '/api/clusters/' + clusterName + '/services?state=INSTALLED';
     var data = '{"ServiceInfo": {"state": "STARTED"}}';
+    var method = 'PUT';
+
+    if (App.testMode) {
+      debugger;
+      url = '/data/wizard/deploy/poll_6.json';
+      method = 'GET';
+      this.numPolls = 6;
+    }
+
     $.ajax({
-      type: 'PUT',
+      type: method,
       url: url,
       async: false,
       data: data,
@@ -224,7 +233,7 @@ App.WizardStep9Controller = Em.Controlle
           isCompleted: false
         };
         App.router.get('installerController').saveClusterStatus(clusterStatus);
-        this.startPolling();
+        self.startPolling();
       },
 
       error: function () {
@@ -342,8 +351,7 @@ App.WizardStep9Controller = Em.Controlle
     }, this);
   },
 
-// polling from ui stops only when no action has 'pending', 'queued' or 'inprogress' status
-
+  // polling from ui stops only when no action has 'PENDING', 'QUEUED' or 'IN_PROGRESS' status
   finishState: function (polledData) {
     var clusterStatus = {};
     var retVal = false;
@@ -459,6 +467,8 @@ App.WizardStep9Controller = Em.Controlle
     this.doPolling();
   },
 
+  numPolls: 0,
+
   getUrl: function () {
     var clusterName = this.get('content.cluster.name');
     var requestId = App.db.getClusterStatus().requestId;
@@ -467,9 +477,24 @@ App.WizardStep9Controller = Em.Controlle
     return url;
   },
 
+  POLL_INTERVAL: 4000,
+
   doPolling: function () {
     var self = this;
     var url = this.getUrl();
+
+    if (App.testMode) {
+      this.POLL_INTERVAL = 1;
+      this.numPolls++;
+      if (this.numPolls == 5) {
+        // url = 'data/wizard/deploy/poll_5.json';
+        url = 'data/wizard/deploy/poll_5_failed.json';
+      } else {
+        url = 'data/wizard/deploy/poll_' + this.numPolls + '.json';
+      }
+      debugger;
+    }
+
     $.ajax({
       type: 'GET',
       url: url,
@@ -483,7 +508,7 @@ App.WizardStep9Controller = Em.Controlle
         if (result !== true) {
           window.setTimeout(function () {
             self.doPolling();
-          }, 4000);
+          }, self.POLL_INTERVAL);
         } else {
           self.stopPolling();
         }
@@ -527,6 +552,7 @@ App.WizardStep9Controller = Em.Controlle
     this.renderHosts(hostInfo);
 
   },
+
   pollBtn: function () {
     this.set('isSubmitDisabled', false);
     var data1 = require('data/mock/step9PolledData/pollData_1');
@@ -574,4 +600,5 @@ App.WizardStep9Controller = Em.Controlle
         break;
     }
   }
+
 });
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js?rev=1406448&r1=1406447&r2=1406448&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/initialize.js Wed Nov  7 04:15:01
2012
@@ -19,6 +19,9 @@
 
 window.App = require('app');
 
+//App.testMode = true;
+App.testMode = false;
+
 require('messages');
 require('utils/data_table');
 require('utils/db');

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js?rev=1406448&r1=1406447&r2=1406448&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js Wed Nov  7 04:15:01
2012
@@ -21,6 +21,7 @@ var App = require('app');
 module.exports = Em.Route.extend({
   route: '/installer',
   App: require('app'),
+
   enter: function (router) {
     console.log('in /installer:enter');
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js?rev=1406448&r1=1406447&r2=1406448&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js Wed Nov  7 04:15:01
2012
@@ -23,11 +23,9 @@ module.exports = Em.Route.extend({
     if (router.getAuthenticated()) {
       router.get('mainController').startLoadOperationsPeriodically();
       // TODO: redirect to last known state
-      /*
        Ember.run.next(function () {
-       router.transitionTo('step' + router.getInstallerCurrentStep());
+         router.transitionTo('dashboard');
        });
-       */
     } else {
       Ember.run.next(function () {
         router.transitionTo('login');



Mime
View raw message