Bläddra i källkod

AMBARI-9239 Remove old stack upgrade wizard. (atkach)

Andrii Tkach 10 år sedan
förälder
incheckning
2f44c6aa50
24 ändrade filer med 0 tillägg och 2471 borttagningar
  1. 0 216
      ambari-web/app/assets/data/wizard/upgrade/poll_1.json
  2. 0 216
      ambari-web/app/assets/data/wizard/upgrade/poll_2.json
  3. 0 216
      ambari-web/app/assets/data/wizard/upgrade/poll_3.json
  4. 0 216
      ambari-web/app/assets/data/wizard/upgrade/poll_4.json
  5. 0 216
      ambari-web/app/assets/data/wizard/upgrade/poll_5.json
  6. 0 1
      ambari-web/app/assets/test/tests.js
  7. 0 4
      ambari-web/app/controllers.js
  8. 0 86
      ambari-web/app/controllers/main/admin/stack_upgrade_controller.js
  9. 0 23
      ambari-web/app/controllers/wizard/stack_upgrade/step1_controller.js
  10. 0 54
      ambari-web/app/controllers/wizard/stack_upgrade/step2_controller.js
  11. 0 581
      ambari-web/app/controllers/wizard/stack_upgrade/step3_controller.js
  12. 0 1
      ambari-web/app/routes/main.js
  13. 0 123
      ambari-web/app/routes/stack_upgrade.js
  14. 0 26
      ambari-web/app/styles/stack_versions.less
  15. 0 39
      ambari-web/app/templates/main/admin/stack_upgrade.hbs
  16. 0 59
      ambari-web/app/templates/wizard/stack_upgrade/step1.hbs
  17. 0 49
      ambari-web/app/templates/wizard/stack_upgrade/step2.hbs
  18. 0 50
      ambari-web/app/templates/wizard/stack_upgrade/step3.hbs
  19. 0 4
      ambari-web/app/views.js
  20. 0 26
      ambari-web/app/views/main/admin/stack_upgrade.js
  21. 0 24
      ambari-web/app/views/wizard/stack_upgrade/step1_view.js
  22. 0 27
      ambari-web/app/views/wizard/stack_upgrade/step2_view.js
  23. 0 145
      ambari-web/app/views/wizard/stack_upgrade/step3_view.js
  24. 0 69
      ambari-web/test/controllers/wizard/stack_upgrade/step3_controller_test.js

+ 0 - 216
ambari-web/app/assets/data/wizard/upgrade/poll_1.json

@@ -1,216 +0,0 @@
-{
-  "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_SERVER",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "3",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "4",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "5",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "6",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "7",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "8",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "9",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "10",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "11",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "12",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "13",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "SECONDARY_NAMENODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 216
ambari-web/app/assets/data/wizard/upgrade/poll_2.json

@@ -1,216 +0,0 @@
-{
-  "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_SERVER",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "3",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "4",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "5",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "6",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "7",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "8",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "IN_PROGRESS",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "9",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "10",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "11",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "12",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "13",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "SECONDARY_NAMENODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 216
ambari-web/app/assets/data/wizard/upgrade/poll_3.json

@@ -1,216 +0,0 @@
-{
-  "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_SERVER",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "3",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "4",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "5",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "6",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "PENDING",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "7",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "8",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "9",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "10",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "11",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "12",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "IN_PROGRESS",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "13",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "SECONDARY_NAMENODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 216
ambari-web/app/assets/data/wizard/upgrade/poll_4.json

@@ -1,216 +0,0 @@
-{
-  "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_SERVER",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "3",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "4",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "5",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "QUEUED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "6",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "IN_PROGRESS",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "7",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "8",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "9",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "10",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "11",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "12",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "13",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "SECONDARY_NAMENODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 216
ambari-web/app/assets/data/wizard/upgrade/poll_5.json

@@ -1,216 +0,0 @@
-{
-  "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_SERVER",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "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" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "3",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "4",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "5",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "6",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "FAILED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "GANGLIA_MONITOR",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/2",
-      "Tasks" : {
-        "id" : "7",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "8",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-38-164.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "9",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-16-48-4B.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "10",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "ip-10-110-79-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "11",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "DATANODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "12",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "NAMENODE",
-        "stderr" : "",
-        "host_name" : "ip-10-191-202-42.ec2.internal",
-        "stage_id" : "1"
-      }
-    },
-    {
-      "href" : "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/3",
-      "Tasks" : {
-        "id" : "13",
-        "attempt_cnt" : "0",
-        "exit_code" : "999",
-        "stdout" : "",
-        "status" : "COMPLETED",
-        "command" : "UPGRADE",
-        "start_time" : "-1",
-        "role" : "SECONDARY_NAMENODE",
-        "stderr" : "",
-        "host_name" : "domU-12-31-39-0E-E6-01.compute-1.internal",
-        "stage_id" : "1"
-      }
-    }
-  ]
-}

+ 0 - 1
ambari-web/app/assets/test/tests.js

@@ -109,7 +109,6 @@ var files = ['test/init_model_test',
   'test/controllers/wizard/step8_test',
   'test/controllers/wizard/step9_test',
   'test/controllers/wizard/step10_test',
-  'test/controllers/wizard/stack_upgrade/step3_controller_test',
   'test/login_test',
   'test/router_test',
   'test/mappers/alert_groups_mapper_test',

+ 0 - 4
ambari-web/app/controllers.js

@@ -52,7 +52,6 @@ require('controllers/main/admin/highAvailability/resourceManager/step2_controlle
 require('controllers/main/admin/highAvailability/resourceManager/step3_controller');
 require('controllers/main/admin/highAvailability/resourceManager/step4_controller');
 require('controllers/main/admin/stack_and_upgrade_controller');
-require('controllers/main/admin/stack_upgrade_controller');
 require('controllers/main/admin/serviceAccounts_controller');
 require('controllers/main/admin/advanced');
 require('utils/polling');
@@ -142,9 +141,6 @@ require('controllers/wizard/step7_controller');
 require('controllers/wizard/step8_controller');
 require('controllers/wizard/step9_controller');
 require('controllers/wizard/step10_controller');
-require('controllers/wizard/stack_upgrade/step1_controller');
-require('controllers/wizard/stack_upgrade/step2_controller');
-require('controllers/wizard/stack_upgrade/step3_controller');
 require('controllers/global/cluster_controller');
 require('controllers/global/update_controller');
 require('controllers/global/configuration_controller');

+ 0 - 86
ambari-web/app/controllers/main/admin/stack_upgrade_controller.js

@@ -1,86 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-
-App.StackUpgradeController = App.WizardController.extend({
-  name: 'stackUpgradeController',
-
-  totalSteps: 3,
-
-  /**
-   * All wizards data will be stored in this variable
-   *
-   * cluster - cluster name
-   * upgradeOptions - upgrade options
-   */
-  content: Em.Object.create({
-    cluster: null,
-    upgradeOptions: null,
-    servicesInfo: function(){
-      return App.router.get('mainAdminClusterController.services');
-    }.property('App.router.mainAdminClusterController.services'),
-    upgradeVersion: function(){
-      return App.router.get('mainAdminClusterController.upgradeVersion');
-    }.property('App.router.mainAdminClusterController.upgradeVersion'),
-    controllerName: 'stackUpgradeController'
-  }),
-
-  /**
-   * return new object extended from upgradeOptionsTemplate
-   * @return Object
-   */
-  getUpgradeOptions: function(){
-    return jQuery.extend({}, this.get('upgradeOptionsTemplate'));
-  },
-  /**
-   * Load data for all steps until <code>current step</code>
-   */
-  loadAllPriorSteps: function () {
-    this.load('cluster');
-    this.load('upgradeOptions');
-  },
-  upgradeOptionsTemplate:{
-    localRepo: false
-  },
-  clear: function () {
-    this.set('content', Ember.Object.create({
-      servicesInfo: function(){
-        return App.router.get('mainAdminClusterController.services');
-      }.property('App.router.mainAdminClusterController.services'),
-      upgradeVersion: function(){
-        return App.router.get('mainAdminClusterController.upgradeVersion');
-      }.property('App.router.mainAdminClusterController.upgradeVersion'),
-      'controllerName': 'stackUpgradeController'
-    }));
-    this.set('currentStep', 0);
-    this.clearStorageData();
-  },
-  clearStorageData: function(){
-    App.db.setCluster(undefined);
-    App.db.setUpgradeOptions(undefined);
-  },
-  /**
-   * Finish upgrade
-   */
-  finish: function () {
-    this.clear();
-    this.setCurrentStep('1');
-  }
-});

+ 0 - 23
ambari-web/app/controllers/wizard/stack_upgrade/step1_controller.js

@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.StackUpgradeStep1Controller = Em.Controller.extend({
-  name: 'stackUpgradeStep1Controller'
-});

+ 0 - 54
ambari-web/app/controllers/wizard/stack_upgrade/step2_controller.js

@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.StackUpgradeStep2Controller = Em.Controller.extend({
-  name: 'stackUpgradeStep2Controller',
-  /**
-   * check whether all services are running
-   * @return {Array}
-   */
-  isAllServicesRunning: function(){
-    var masterComponents = App.HostComponent.find().filterProperty('isMaster', true);
-    return masterComponents.everyProperty('workStatus', 'STARTED');
-  },
-  /**
-   * callback, which save step data and route to next step
-   * @param event
-   */
-  upgradeAction: function(event){
-    if(this.isAllServicesRunning()){
-      App.router.send('next');
-    } else {
-      this.showWarningPopup();
-    }
-  },
-  /**
-   * show warning popup if not all services are running
-   */
-  showWarningPopup: function(){
-    App.ModalPopup.show({
-      header: Em.I18n.t('installer.step2.manualInstall.popup.header'),
-      secondary: null,
-      bodyClass: Ember.View.extend({
-        template: Em.Handlebars.compile('{{t installer.stackUpgrade.step2.popup.body}}')
-      })
-    });
-  }
-});

+ 0 - 581
ambari-web/app/controllers/wizard/stack_upgrade/step3_controller.js

@@ -1,581 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-App.StackUpgradeStep3Controller = Em.Controller.extend({
-  name: 'stackUpgradeStep3Controller',
-
-  POLL_INTERVAL: 4000,
-  isPolling: false,
-  /**
-   * STOP_SERVICES internal statuses:
-   * - PENDING
-   * - IN_PROGRESS
-   * - SUCCESS
-   * - FAILED
-   * UPGRADE_SERVICES internal statuses:
-   * - PENDING
-   * - IN_PROGRESS
-   * - SUCCESS
-   * - FAILED
-   * - WARNING
-   */
-  processes:[
-    Em.Object.create({
-      name: 'STOP_SERVICES',
-      displayName: Em.I18n.t('installer.stackUpgrade.step3.stop.header'),
-      progress:0,
-      status: 'PENDING',
-      message: null,
-      isRunning: false,
-      hosts: [],
-      isRetry: false
-    }),
-    Em.Object.create({
-      name: 'UPGRADE_SERVICES',
-      displayName: Em.I18n.t('installer.stackUpgrade.step3.upgrade.header'),
-      progress: 0,
-      status: 'PENDING',
-      message:'',
-      isRunning: false,
-      hosts: [],
-      isRetry: false
-    })
-  ],
-  /**
-   * pass processes as services to popup
-   */
-  services: function(){
-    return this.get('processes');
-  }.property('processes'),
-  /**
-   * save current requestId and clusterState
-   * to localStorage and put it to server
-   *
-   * STOP_SERVICES cluster status:
-   * - STOPPING_SERVICES,
-   * UPGRADE_SERVICES cluster status:
-   * - STACK_UPGRADING,
-   * - STACK_UPGRADE_FAILED,
-   * - STACK_UPGRADED,
-   * - DEFAULT = STACK UPGRADE COMPLETED
-   */
-  saveClusterStatus: function(clusterStatus){
-    var oldStatus = this.get('content.cluster');
-    clusterStatus = jQuery.extend(oldStatus, clusterStatus);
-    this.set('content.cluster', clusterStatus);
-    App.router.get(this.get('content.controllerName')).save('cluster');
-    if(!App.get('testMode')){
-      App.clusterStatus.setClusterStatus({
-        clusterName: this.get('content.cluster.name'),
-        clusterState: clusterStatus.status,
-        wizardControllerName: 'stackUpgradeController',
-        localdb: App.db.data
-      });
-    }
-  },
-  // provide binding for Host Popup data
-  serviceTimestamp: null,
-  /**
-   * load hosts for each process
-   */
-  loadHosts: function () {//TODO replace App.Host.find() with content.hosts loaded directly from server
-    var hosts = [];
-    var installedHosts = App.Host.find();
-    this.get('processes').forEach(function(process){
-      var hosts = [];
-      installedHosts.forEach(function (host) {
-        hosts.push(Em.Object.create({
-          name: host.get('hostName'),
-          publicName: host.get('publicHostName'),
-          logTasks: []
-        }));
-      });
-      process.set('hosts', hosts);
-    });
-  }.observes('content.servicesInfo'),
-  submitButton: null,
-  /**
-   * restart upgrade
-   * restart stop services
-   * @param event
-   */
-  retry: function(event){
-    var processName = event.context;
-    var process = this.get('processes').findProperty('name', processName);
-    this.resetProgress(process);
-    this.resetMockConfig();
-    if(processName == 'STOP_SERVICES'){
-      this.stopServices();
-    } else {
-      this.set('submitButton', false);
-      this.runUpgrade();
-    }
-  },
-  /**
-   * reset progress and status to retry
-   * @param process
-   */
-  resetProgress: function(process){
-    process.set('isRetry', false);
-    process.set('status', 'PENDING');
-    process.set('progress', 0);
-    process.get('hosts').forEach(function(host){host.get('logTasks').clear()});
-  },
-  /**
-   * run stop services
-   */
-  stopServices: function () {
-    var process = this.get('processes').findProperty('name', 'STOP_SERVICES');
-    process.set('isRunning', true);
-    if (App.get('testMode')) {
-      this.startPolling();
-      this.saveClusterStatus({
-        requestId: 1,
-        status: 'STOPPING_SERVICES',
-        isCompleted: false
-      });
-    }
-    else {
-      App.ajax.send({
-        name: 'common.services.update',
-        sender: this,
-        data: {
-          "context": Em.I18n.t("requestInfo.stopAllServices"),
-          "ServiceInfo": {
-            "state": "INSTALLED"
-          },
-          urlParams: "ServiceInfo/state=STARTED"
-        },
-        success: 'stopServicesSuccessCallback',
-        error: 'stopServicesErrorCallback'
-      });
-    }
-  },
-  stopServicesSuccessCallback: function (data) {
-    var process = this.get('processes').findProperty('name', 'STOP_SERVICES');
-    var requestId = data.Requests.id;
-    var clusterStatus = {
-      requestId: requestId,
-      status: 'STOPPING_SERVICES',
-      isCompleted: false
-    };
-    process.set('status', 'IN_PROGRESS');
-    this.saveClusterStatus(clusterStatus);
-    this.startPolling();
-    console.log('Call to stop service successful')
-  },
-  stopServicesErrorCallback: function () {
-    var process = this.get('processes').findProperty('name', 'STOP_SERVICES');
-    this.finishProcess(process, 'FAILED');
-    process.set('status', 'FAILED');
-    console.log("Call to stop services failed");
-  },
-  /**
-   * send request to run upgrade all services
-   */
-  runUpgrade: function () {
-    var process = this.get('processes').findProperty('name', 'UPGRADE_SERVICES');
-    process.set('isRunning', true);
-    if (App.get('testMode')) {
-      this.startPolling();
-      this.saveClusterStatus({
-        requestId: 1,
-        status: 'STACK_UPGRADING',
-        isCompleted: false
-      });
-    }
-    else {
-      var data = '{"Clusters": {"version" : "' + this.get('content.upgradeVersion') + '"}}';
-      App.ajax.send({
-        name: 'admin.stack_upgrade.run_upgrade',
-        sender: this,
-        data: {
-          data: data
-        },
-        success: 'runUpgradeSuccessCallback',
-        error: 'runUpgradeErrorCallback'
-      });
-    }
-  },
-  runUpgradeSuccessCallback: function (jsonData) {
-    var process = this.get('processes').findProperty('name', 'UPGRADE_SERVICES');
-    var requestId = jsonData.Requests.id;
-    var clusterStatus = {
-      status: 'STACK_UPGRADING',
-      requestId: requestId,
-      isCompleted: false
-    };
-    process.set('status', 'IN_PROGRESS');
-    this.saveClusterStatus(clusterStatus);
-    this.startPolling();
-  },
-
-  runUpgradeErrorCallback: function (request, ajaxOptions, error) {
-    var process = this.get('processes').findProperty('name', 'UPGRADE_SERVICES');
-    this.finishProcess(process, 'FAILED');
-    process.set('status', 'FAILED');
-  },
-
-  /**
-   * start polling tasks for current process
-   */
-  startPolling: function(){
-    if(!this.get('isPolling')){
-      this.set('isPolling', true);
-      if (App.get('testMode')) {
-        this.simulatePolling();
-      } else {
-        //pass an interval "1" to start poll immediately first time
-        this.doPoll(1);
-      }
-    }
-  },
-  simulateAttempt:0,
-  mockUrl:'',
-  /**
-   * simulate actual poll, using mock data
-   */
-  simulatePolling: function(){
-    var simulateAttempt = this.get('simulateAttempt');
-    var process = this.get('processes').findProperty('isRunning', true);
-    var upgradeURLs = [
-      '/upgrade/poll_1.json',
-      '/upgrade/poll_2.json',
-      '/upgrade/poll_3.json',
-      '/upgrade/poll_4.json',
-      '/upgrade/poll_5.json'
-    ];
-    var stopURLs = [
-      '/stop_services/poll_1.json',
-      '/stop_services/poll_2.json',
-      '/stop_services/poll_3.json',
-      '/stop_services/poll_4.json'
-    ];
-    if(process.get('name') == 'STOP_SERVICES'){
-      if(simulateAttempt < 4){
-        this.set('mockUrl', stopURLs[simulateAttempt]);
-        this.doPoll();
-        this.set('simulateAttempt', ++simulateAttempt);
-      }
-    } else {
-      if(simulateAttempt < 5){
-        this.set('mockUrl', upgradeURLs[simulateAttempt]);
-        this.doPoll();
-        this.set('simulateAttempt', ++simulateAttempt);
-      }
-    }
-  },
-  getUrl:function(){
-    var requestId = this.get('content.cluster.requestId');
-    var clusterName = this.get('content.cluster.name');
-    if(App.get('testMode')){
-      return this.get('mockUrl');
-    }
-    return App.apiPrefix + '/clusters/' + clusterName + '/requests/' + requestId + '?fields=tasks/*';
-  },
-  /**
-   * poll server for tasks, which contain process progress data
-   * @param interval
-   */
-  doPoll: function(interval) {
-    var self = this;
-    var pollInterval = interval || self.POLL_INTERVAL;
-    if (self.get('isPolling')) {
-      setTimeout(function () {
-
-        App.ajax.send({
-          name: 'admin.stack_upgrade.do_poll',
-          sender: self,
-          data: {
-            cluster: self.get('content.cluster.name'),
-            requestId: self.get('content.cluster.requestId'),
-            mock: self.get('mockUrl')
-          },
-          success: 'doPollSuccessCallback',
-          error: 'doPollErrorCallback'
-        }).retry({
-            times: App.maxRetries,
-            timeout: App.timeout
-          }).then(
-            null,
-            function () {
-              App.showReloadPopup();
-              console.log('Install services all retries failed');
-            });
-      }, pollInterval);
-    }
-  },
-
-  doPollSuccessCallback: function (data) {
-    var result = this.parseTasks(data);
-    if(result){
-      if (App.get('testMode')) {
-        this.simulatePolling();
-      }
-      else {
-        this.doPoll();
-      }
-    }
-  },
-
-  doPollErrorCallback: function () {
-    console.log('ERROR: poll request failed')
-  },
-
-  /**
-   * parse tasks from poll
-   * change status, message, progress on services according to tasks
-   * @param data
-   * @return {Boolean}
-   */
-  parseTasks: function(data){
-    var tasks = data.tasks || [];
-    var process = this.get('processes').findProperty('isRunning', true);
-    // if process was finished then it terminates next poll
-
-    this.progressOnProcess(tasks, process);
-    var continuePolling = this.statusOnProcess(tasks, process);
-    if(process.get('hosts').length && tasks.length){
-      process.get('hosts').forEach(function (host) {
-        var tasksPerHost = tasks.filterProperty('Tasks.host_name', host.name);
-        if (tasksPerHost.length) {
-          this.setLogTasksStatePerHost(tasksPerHost, host);
-        }
-      }, this);
-    }
-    this.set('serviceTimestamp', App.dateTime());
-    return continuePolling;
-  },
-  /**
-   * calculate progress according to tasks status
-   * @param actions
-   * @param process
-   */
-  progressOnProcess: function(actions, process){
-    var actionsNumber = actions.length;
-    var completedActions = actions.filterProperty('Tasks.status', 'COMPLETED').length
-      + actions.filterProperty('Tasks.status', 'FAILED').length
-      + actions.filterProperty('Tasks.status', 'ABORTED').length
-      + actions.filterProperty('Tasks.status', 'TIMEDOUT').length;
-    var queuedActions = actions.filterProperty('Tasks.status', 'QUEUED').length;
-    var inProgressActions = actions.filterProperty('Tasks.status', 'IN_PROGRESS').length;
-    var progress = Math.ceil(((queuedActions * 0.09) + (inProgressActions * 0.35) + completedActions ) / actionsNumber * 100);
-    console.log('INFO: progress is: ' + progress);
-    process.set('progress', progress);
-  },
-  /**
-   * evaluate status of process according to task status
-   * @param actions
-   * @param process
-   */
-  statusOnProcess: function(actions, process){
-    var status = null;
-    var message = '';
-    var continuePolling = true;
-    var errorActions = actions.filter(function (action) {
-      if (action.Tasks.status == 'FAILED' || action.Tasks.status == 'ABORTED' || action.Tasks.status == 'TIMEDOUT') {
-        return true;
-      }
-    });
-    var masterComponents = ['NAMENODE', 'SECONDARY_NAMENODE', 'SNAMENODE', 'JOBTRACKER', 'ZOOKEEPER_SERVER', 'HIVE_SERVER',
-      'HIVE_METASTORE', 'MYSQL_SERVER', 'HBASE_MASTER', 'NAGIOS_SERVER', 'GANGLIA_SERVER', 'OOZIE_SERVER', 'WEBHCAT_SERVER'];
-    var failedComponents = errorActions.mapProperty('Tasks.role');
-    if (failedComponents.length) {
-      for (var i = 0; i < failedComponents.length; i++) {
-        if (masterComponents.contains(failedComponents[i])) {
-          status = "FAILED";
-          continuePolling = false;
-          this.finishProcess(process, status);
-          break;
-        } else if(process.get('progress') == 100){
-          status = "WARNING";
-          if(process.get('name') == 'UPGRADE_SERVICES'){
-            continuePolling = false;
-            this.finishProcess(process, status);
-          }
-        }
-      }
-    }
-    if(!status || ((status == 'WARNING') && (process.get('name') == 'STOP_SERVICES'))){
-      if (actions.everyProperty('Tasks.status', 'COMPLETED')) {
-        status = 'SUCCESS';
-        continuePolling = false;
-        this.finishProcess(process, status);
-      } else {
-        var activeAction = actions.findProperty('Tasks.status', 'IN_PROGRESS');
-        status = 'IN_PROGRESS';
-        if (activeAction === undefined || activeAction === null) {
-          activeAction = actions.findProperty('Tasks.status', 'QUEUED');
-          status = 'PENDING';
-        }
-        if (activeAction === undefined || activeAction === null) {
-          activeAction = actions.findProperty('Tasks.status', 'PENDING');
-          status = 'PENDING';
-        }
-        if (activeAction) {
-          message = this.displayMessage(activeAction.Tasks);
-        }
-      }
-    }
-    console.log('INFO: status is: ' + status);
-    process.set('status', status);
-    process.set('message', message);
-    return continuePolling;
-  },
-  /**
-   * complete process phase
-   * accept FAILED, SUCCESS, WARNING process status
-   * @param process
-   * @param status
-   */
-  finishProcess: function(process, status){
-    this.set('isPolling', false);
-    if(process.get('name') == 'STOP_SERVICES'){
-      if(status == 'SUCCESS'){
-        process.set('isRunning', false);
-        this.resetMockConfig();
-        this.runUpgrade();
-      } else {
-        process.set('isRetry', true);
-      }
-    }
-    if(process.get('name') == 'UPGRADE_SERVICES'){
-      if(status == 'SUCCESS'){
-        this.set('submitButton', Em.I18n.t('common.done'));
-        this.saveClusterStatus({
-          status: 'STACK_UPGRADED',
-          isCompleted: true
-        })
-      } else if(status == 'FAILED') {
-        process.set('isRetry', true);
-        this.set('submitButton', false);
-        this.saveClusterStatus({
-          status: 'STACK_UPGRADE_FAILED',
-          isCompleted: false
-        })
-      } else if(status == 'WARNING'){
-        this.set('submitButton', Em.I18n.t('installer.stackUpgrade.step3.ProceedWithWarning'));
-        process.set('isRetry', true);
-        this.saveClusterStatus({
-          status: 'STACK_UPGRADED',
-          isCompleted: true
-        })
-      }
-    }
-  },
-  /**
-   * set and update logTasks to each host
-   * @param tasksPerHost
-   * @param host
-   */
-  setLogTasksStatePerHost: function (tasksPerHost, host) {
-    tasksPerHost.forEach(function (_task) {
-      var task = host.get('logTasks').findProperty('Tasks.id', _task.Tasks.id);
-      if (task) {
-        host.get('logTasks').removeObject(task);
-      }
-      host.get('logTasks').pushObject(_task);
-      //}
-    }, this);
-  },
-  /**
-   * reset mock configs to run upgrade simulation again
-   */
-  resetMockConfig: function(retry){
-    this.set('simulateAttempt', 0);
-  },
-  /**
-   * resume wizard on last operation
-   */
-  resumeStep: function () {
-    var clusterStatus = this.get('content.cluster.status');
-    var upgrade = this.get('processes').findProperty('name', 'UPGRADE_SERVICES');
-    var stop = this.get('processes').findProperty('name', 'STOP_SERVICES');
-    if(App.get('testMode')){
-      if(this.get('processes').everyProperty('isRunning', false)){
-        stop.set('isRunning', true);
-      }
-      clusterStatus = (this.get('processes').findProperty('name', 'UPGRADE_SERVICES').get('isRunning'))?
-       'STACK_UPGRADING':
-       'STOPPING_SERVICES';
-      upgrade.set('isRetry', false);
-      stop.set('isRetry', false);
-    }
-    if (clusterStatus == 'STOPPING_SERVICES') {
-      this.startPolling();
-      stop.set('isRunning', true);
-      upgrade.set('isRunning', false);
-    } else if(clusterStatus != 'PENDING'){
-      stop.set('status', 'SUCCESS');
-      stop.set('progress', 100);
-      stop.set('isRunning', false);
-      upgrade.set('isRunning', true);
-      if (clusterStatus == 'STACK_UPGRADING') {
-        upgrade.set('status', 'IN_PROGRESS');
-        this.startPolling();
-      } else if (clusterStatus == 'STACK_UPGRADE_FAILED') {
-        upgrade.set('status', 'FAILED');
-        upgrade.set('isRetry', true);
-      } else if (clusterStatus == 'STACK_UPGRADED') {
-        upgrade.set('status', 'SUCCESS');
-        upgrade.set('progress', 100);
-        this.startPolling();
-        this.set('isPolling', false);
-      }
-    }
-  },
-  /**
-   * determine description of current running process
-   * @param task
-   * @return {*}
-   */
-  displayMessage: function (task) {
-    var role = App.format.role(task.role);
-    switch (task.command){
-      case 'UPGRADE':
-        switch (task.status) {
-          case 'PENDING':
-            return Em.I18n.t('installer.step9.serviceStatus.upgrade.pending') + role;
-          case 'QUEUED' :
-            return Em.I18n.t('installer.step9.serviceStatus.upgrade.queued') + role;
-          case 'IN_PROGRESS':
-            return Em.I18n.t('installer.step9.serviceStatus.upgrade.inProgress') + role;
-          case 'COMPLETED' :
-            return Em.I18n.t('installer.step9.serviceStatus.upgrade.completed') + role;
-          case 'FAILED':
-            return Em.I18n.t('installer.step9.serviceStatus.upgrade.failed') + role;
-        }
-        break;
-      case 'STOP' :
-        switch (task.status) {
-          case 'PENDING':
-            return Em.I18n.t('installer.step9.serviceStatus.stop.pending') + role;
-          case 'QUEUED' :
-            return Em.I18n.t('installer.step9.serviceStatus.stop.queued') + role;
-          case 'IN_PROGRESS':
-            return Em.I18n.t('installer.step9.serviceStatus.stop.inProgress') + role;
-          case 'COMPLETED' :
-            return role + Em.I18n.t('installer.step9.serviceStatus.stop.completed');
-          case 'FAILED':
-            return role + Em.I18n.t('installer.step9.serviceStatus.stop.failed');
-        }
-    }
-  }
-});

+ 0 - 1
ambari-web/app/routes/main.js

@@ -508,7 +508,6 @@ module.exports = Em.Route.extend({
     }
 
   }),
-  stackUpgrade: require('routes/stack_upgrade'),
 
   services: Em.Route.extend({
     route: '/services',

+ 0 - 123
ambari-web/app/routes/stack_upgrade.js

@@ -1,123 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-module.exports = App.WizardRoute.extend({
-  route: 'admin/cluster/upgrade',
-
-  enter: function (router) {
-    console.log('in /admin/cluster/upgrade:enter');
-    Ember.run.next(function () {
-      var stackUpgradeController = router.get('stackUpgradeController');
-      App.router.get('updateController').set('isWorking', false);
-      App.ModalPopup.show({
-        classNames: ['full-width-modal'],
-        header:Em.I18n.t('installer.stackUpgrade.header'),
-        bodyClass:  App.StackUpgradeView.extend({
-          controllerBinding: 'App.router.stackUpgradeController'
-        }),
-        showFooter: false,
-        onClose: function() {
-          this.hide();
-          App.router.get('updateController').set('isWorking', true);
-          router.transitionTo('admin.adminCluster');
-        },
-        didInsertElement: function(){
-          this.fitHeight();
-        }
-      });
-      var statuses = ['STOPPING_SERVICES', 'STACK_UPGRADING', 'STACK_UPGRADE_FAILED', 'STACK_UPGRADED'];
-      var currentClusterStatus = App.clusterStatus.get('value');
-      if (currentClusterStatus.localdb) App.db.data = currentClusterStatus.localdb;
-      if (statuses.contains(currentClusterStatus.clusterState)) {
-        stackUpgradeController.setCurrentStep(3);
-      }
-      router.transitionTo('step' + stackUpgradeController.get('currentStep'));
-    });
-  },
-
-  step1: Em.Route.extend({
-    route: '/step1',
-    connectOutlets: function (router) {
-      console.log('in stackUpgrade.step1:connectOutlets');
-      var controller = router.get('stackUpgradeController');
-      controller.setCurrentStep('1');
-      controller.loadAllPriorSteps();
-      controller.connectOutlet('stackUpgradeStep1', controller.get('content'));
-    },
-    next: Em.Router.transitionTo('step2')
-  }),
-
-  step2: Em.Route.extend({
-    route: '/step2',
-    connectOutlets: function (router) {
-      console.log('in stackUpgrade.step2:connectOutlets');
-      var controller = router.get('stackUpgradeController');
-      controller.setCurrentStep('2');
-      controller.loadAllPriorSteps();
-      controller.connectOutlet('stackUpgradeStep2', controller.get('content'));
-    },
-    back: Em.Router.transitionTo('step1'),
-    next: function(router){
-      var controller = router.get('stackUpgradeController');
-      var stepController = router.get('stackUpgradeStep3Controller');
-      controller.save('upgradeOptions');
-      router.transitionTo('step3');
-      App.clusterStatus.setClusterStatus({
-        clusterName: controller.get('content.cluster.name'),
-        clusterState: 'PENDING',
-        wizardControllerName: 'stackUpgradeController',
-        localdb: App.db.data
-      });
-      stepController.stopServices();
-    }
-  }),
-
-  step3: Em.Route.extend({
-    route: '/step3',
-    connectOutlets: function (router, context) {
-      console.log('in stackUpgrade.step3:connectOutlets');
-      var controller = router.get('stackUpgradeController');
-      controller.setCurrentStep('3');
-      controller.setLowerStepsDisable(3);
-      controller.loadAllPriorSteps();
-      controller.connectOutlet('stackUpgradeStep3', controller.get('content'));
-    },
-    finish: function (router, context) {
-      var controller = router.get('stackUpgradeController');
-      var stepController = router.get('stackUpgradeStep3Controller');
-      controller.finish();
-      $(context.currentTarget).parents("#modal").find(".close").trigger('click');
-      App.clusterStatus.setClusterStatus({
-        clusterName: controller.get('content.cluster.name'),
-        clusterState: 'DEFAULT',
-        wizardControllerName: 'stackUpgradeController',
-        localdb: App.db.data
-      });
-      App.router.get('updateController').updateAll();
-      App.set('currentStackVersion', controller.get('content.upgradeVersion'));
-    }
-  }),
-  backToCluster: function(router, context){
-    var controller = router.get('stackUpgradeController');
-    controller.finish();
-    $(context.currentTarget).parents("#modal").find(".close").trigger('click');
-  }
-
-});

+ 0 - 26
ambari-web/app/styles/stack_versions.less

@@ -248,29 +248,3 @@
     width: 100%;
   }
 }
-
-#stack-upgrade {
-  .content {
-    padding: 25px;
-    background-color: #fff;
-  }
-  .box {
-    padding: 5px;
-  }
-  table th {
-    vertical-align: middle;
-  }
-  .btn-area {
-    margin-top: 30px;
-  }
-  .service {
-    .info {
-      line-height: 30px;
-    }
-    .row {
-      margin-left: 0;
-    }
-  }
-}
-
-

+ 0 - 39
ambari-web/app/templates/main/admin/stack_upgrade.hbs

@@ -1,39 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-<div id="stack-upgrade">
-  <div class="container">
-    <div class="container-fluid">
-      <div class="row-fluid">
-        <div class="span3">
-          <!--Sidebar content-->
-          <div class="well">
-            <ul class="nav nav-pills nav-stacked">
-              <li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep1 target="controller"}}>{{t common.start}}</a></li>
-              <li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep2 target="controller"}}>{{t common.confirm}}</a></li>
-              <li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep3 target="controller"}}>{{t common.upgrade}}</a></li>
-            </ul>
-          </div>
-        </div>
-        <div class="content well span9">
-          {{outlet}}
-        </div>
-      </div>
-    </div>
-  </div>
-</div>

+ 0 - 59
ambari-web/app/templates/wizard/stack_upgrade/step1.hbs

@@ -1,59 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-<div class="box alert-info">
-  <div>
-  {{t installer.stackUpgrade.step1.description}}
-  </div>
-  <br/>
-  <div>
-    <div>{{t installer.stackUpgrade.step1.installedStackVersion}}: {{App.currentStackVersion}}</div>
-    <div>{{t installer.stackUpgrade.step1.upgradeStackVersion}}: {{content.upgradeVersion}}</div>
-  </div>
-</div>
-<div>
-    <table class="table table-bordered table-striped">
-      <thead>
-      <tr>
-        <th>{{t common.service}}</th>
-        <th>{{t installer.stackUpgrade.step1.installedVersion}}</th>
-        <th>{{t installer.stackUpgrade.step1.newVersion}}</th>
-        <th>{{t common.description}}</th>
-      </tr>
-      </thead>
-      <tbody>
-        {{#each service in content.servicesInfo}}
-        {{#unless service.isHidden}}
-          <tr>
-            <td>{{service.displayName}}</td>
-            <td>{{service.version}}</td>
-            <td>{{service.newVersion}}</td>
-            <td>{{service.description}}</td>
-          </tr>
-        {{/unless}}
-        {{/each}}
-      </tbody>
-    </table>
-</div>
-<div class="btn-area">
-  <a class="btn pull-left" {{action backToCluster}}>{{t common.cancel}}</a>
-  <a class="btn btn-success pull-right" {{action next}}>{{t common.next}}</a>
-</div>
-
-
-

+ 0 - 49
ambari-web/app/templates/wizard/stack_upgrade/step2.hbs

@@ -1,49 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-
-<div class="box alert-info">
-  <div>
-  {{t installer.stackUpgrade.step2.notice.header}}
-  </div>
-  <br/>
-  <ul class="unstyled">
-      <li>1&#41;&nbsp;{{t installer.stackUpgrade.step2.notice.first}}</li>
-      <li>2&#41;&nbsp;{{t installer.stackUpgrade.step2.notice.second}}</li>
-      <li>3&#41;&nbsp;{{t installer.stackUpgrade.step2.notice.third}}</li>
-  </ul>
-  <div>
-      <strong>{{t installer.stackUpgrade.step2.notice.complete}}</strong>
-  </div>
-</div>
-<div class="control-group">
-    <label><strong>
-      {{t installer.stackUpgrade.step2.advancedOption}}
-      <i href="javascript:void(null)" class="icon-question-sign"
-         rel="popover"
-         {{translateAttr title="installer.step2.localRepo.tooltip.title" data-content="installer.step2.localRepo.tooltip.content"}}>
-      </i>
-    </strong></label>
-    <label class="checkbox">
-      {{view Ember.Checkbox checkedBinding="content.upgradeOptions.localRepo"}}
-      {{t installer.stackUpgrade.step2.localRepository}}
-    </label>
-</div>
-<div class="btn-area">
-  <a class="btn pull-left" {{action back}}>{{t common.back}}</a>
-  <a class="btn btn-success pull-right" {{action upgradeAction target="controller"}}>{{t common.upgrade}}</a>
-</div>

+ 0 - 50
ambari-web/app/templates/wizard/stack_upgrade/step3.hbs

@@ -1,50 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-<div id="deploy">
-    <div {{bindAttr class="view.statusClass :alert"}}>{{view.overallStatus}}</div>
-    <div class="service">
-      {{#each process in processes}}
-        {{#view view.processView contentBinding="process"}}
-            <div class="item">
-                <i {{bindAttr class="view.icon view.iconColor"}}></i>
-                <a href="javascript:void(0)" {{action "hostsLogPopup" process.name target="view"}}>{{view.status}}</a>
-            </div>
-          {{#if process.isRetry}}
-              <a class="btn btn-primary" {{action retry process.name target="controller" href="true"}}>
-                  <i class="icon-repeat icon-white"></i>
-                {{view.retryMessage}}
-              </a>
-          {{/if}}
-            <div {{bindAttr class="view.inProgress::hide :row :span12" }}>
-                <div class="progress-bar span4">
-                    <div {{bindAttr class="view.isProcessCompleted::progress-striped view.isProcessCompleted::active view.barColor :progress"}}>
-                        <div class="bar" {{bindAttr style="view.barWidth"}}></div>
-                    </div>
-                </div>
-                <div class="span1">{{process.progress}}&#37;</div>
-                <div class="span7">{{process.message}}</div>
-            </div>
-        {{/view}}
-      {{/each}}
-    </div>
-    <div class="btn-area">
-      {{#if submitButton}}
-          <a class="btn btn-success pull-right" {{action finish}}>{{submitButton}}</a>
-      {{/if}}
-    </div>
-</div>

+ 0 - 4
ambari-web/app/views.js

@@ -117,7 +117,6 @@ require('views/main/admin/highAvailability/resourceManager/step2_view');
 require('views/main/admin/highAvailability/resourceManager/step3_view');
 require('views/main/admin/highAvailability/resourceManager/step4_view');
 require('views/main/admin/serviceAccounts_view');
-require('views/main/admin/stack_upgrade');
 require('views/main/admin/stack_upgrade/upgrade_wizard_view');
 require('views/main/admin/stack_upgrade/upgrade_version_box_view');
 require('views/main/admin/stack_upgrade/upgrade_group_view');
@@ -296,9 +295,6 @@ require('views/wizard/step8_view');
 require('views/wizard/step9_view');
 require('views/wizard/step9/hostLogPopupBody_view');
 require('views/wizard/step10_view');
-require('views/wizard/stack_upgrade/step1_view');
-require('views/wizard/stack_upgrade/step2_view');
-require('views/wizard/stack_upgrade/step3_view');
 require('views/loading');
 
 require('views/experimental');

+ 0 - 26
ambari-web/app/views/main/admin/stack_upgrade.js

@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-
-App.StackUpgradeView = Em.View.extend(App.WizardMenuMixin, {
-
-  templateName: require('templates/main/admin/stack_upgrade')
-
-});

+ 0 - 24
ambari-web/app/views/wizard/stack_upgrade/step1_view.js

@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-
-App.StackUpgradeStep1View = Em.View.extend({
-  templateName: require('templates/wizard/stack_upgrade/step1')
-});

+ 0 - 27
ambari-web/app/views/wizard/stack_upgrade/step2_view.js

@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-
-App.StackUpgradeStep2View = Em.View.extend({
-  templateName: require('templates/wizard/stack_upgrade/step2'),
-  didInsertElement: function(){
-    App.popover($("[rel=popover]"), {'placement': 'right', 'trigger': 'hover'});
-  }
-});

+ 0 - 145
ambari-web/app/views/wizard/stack_upgrade/step3_view.js

@@ -1,145 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-
-App.StackUpgradeStep3View = Em.View.extend({
-  templateName: require('templates/wizard/stack_upgrade/step3'),
-  overallStatus: Em.I18n.t('installer.stackUpgrade.step3.status.info'),
-  statusClass: 'alert-info',
-  didInsertElement: function(){
-    this.get('controller').resumeStep();
-    this.onStatus();
-  },
-  onStatus: function(){
-    var currentProcess = this.get('controller.processes').findProperty('isRunning', true);
-    if(currentProcess && (currentProcess.get('name') == 'UPGRADE_SERVICES')){
-      switch (currentProcess.get('status')){
-        case 'SUCCESS':
-          this.set('overallStatus', Em.I18n.t('installer.stackUpgrade.step3.status.success').format(this.get('controller.content.upgradeVersion')));
-          this.set('statusClass', 'alert-success');
-          break;
-        case 'FAILED':
-          this.set('overallStatus', Em.I18n.t('installer.stackUpgrade.step3.status.failed'));
-          this.set('statusClass', 'alert-error');
-          break;
-        case 'WARNING':
-          this.set('overallStatus', Em.I18n.t('installer.stackUpgrade.step3.status.warning').format(this.get('controller.content.upgradeVersion')));
-          this.set('statusClass', 'alert-block');
-          break;
-        case 'IN_PROGRESS':
-        default:
-          this.set('overallStatus', Em.I18n.t('installer.stackUpgrade.step3.status.info'));
-          this.set('statusClass', 'alert-info');
-      }
-    } else {
-      this.set('overallStatus', Em.I18n.t('installer.stackUpgrade.step3.status.info'));
-      this.set('statusClass', 'alert-info');
-    }
-  }.observes('controller.processes.@each.status'),
-  processView: Em.View.extend({
-    barColor: '',
-    icon:'',
-    iconColor:'',
-    status: function(){
-      var process = this.get('content');
-      if(process.get('name') == 'STOP_SERVICES'){
-        switch(process.get('status')){
-          case 'IN_PROGRESS':
-            return Em.I18n.t('installer.stackUpgrade.step3.service.stopping');
-          case 'FAILED':
-            return Em.I18n.t('installer.stackUpgrade.step3.service.stopFail');
-          case 'SUCCESS':
-            return Em.I18n.t('installer.stackUpgrade.step3.service.stopped');
-          default:
-            return Em.I18n.t('installer.stackUpgrade.step3.service.stopPending');
-        }
-      } else {
-        switch(process.get('status')){
-          case 'IN_PROGRESS':
-            return Em.I18n.t('installer.stackUpgrade.step3.service.upgrading');
-          case 'WARNING':
-            return Em.I18n.t('installer.stackUpgrade.step3.service.upgraded');
-          case 'FAILED':
-            return Em.I18n.t('installer.stackUpgrade.step3.service.failedUpgrade');
-          case 'SUCCESS':
-            return Em.I18n.t('installer.stackUpgrade.step3.service.upgraded');
-          default:
-            return Em.I18n.t('installer.stackUpgrade.step3.service.pending');
-        }
-      }
-    }.property('content.status'),
-    didInsertElement: function(){
-      this.onStatus();
-    },
-    retryMessage: function(){
-      if(this.get('content.name') == 'STOP_SERVICES'){
-        return Em.I18n.t('installer.stackUpgrade.step3.retry.services');
-      }
-      return Em.I18n.t('installer.stackUpgrade.step3.retry.upgrade');
-    }.property('content.name'),
-    isProcessCompleted: function(){
-      return this.get('content.status') == 'SUCCESS' || this.get('content.status') === 'WARNING';
-    }.property('content.status'),
-    barWidth: function(){
-      return 'width: ' + this.get('content.progress') + '%;';
-    }.property('content.progress'),
-    /**
-     * change service appearance(icon, progress-bar color,) depending on the service status
-     */
-    onStatus:function () {
-      if (this.get('content.status') === 'IN_PROGRESS') {
-        this.set('barColor', 'progress-info');
-        this.set('icon', 'icon-cog');
-        this.set('iconColor', 'text-info');
-      } else if (this.get('content.status') === 'WARNING') {
-        this.set('barColor', 'progress-warning');
-        this.set('icon', 'icon-warning-sign');
-        this.set('iconColor', 'text-warning');
-      } else if (this.get('content.status') === 'FAILED') {
-        this.set('barColor', 'progress-danger');
-        this.set('icon', 'icon-exclamation-sign');
-        this.set('iconColor', 'text-error');
-      } else if (this.get('content.status') === 'SUCCESS') {
-        this.set('barColor', 'progress-success');
-        this.set('icon', 'icon-ok');
-        this.set('iconColor', 'text-success');
-      } else {
-        this.set('barColor', 'progress-info');
-        this.set('icon', 'icon-cog');
-        this.set('iconColor', '');
-      }
-    }.observes('content.status'),
-    inProgress: function(){
-      return this.get('content.isRunning') && !this.get('content.isRetry');
-    }.property('content.status'),
-    /**
-     * open popup with list of hosts, that associated to service
-     * @param event
-     */
-    hostsLogPopup: function(event){
-      var serviceName = event.contexts[0];
-      var controller = this.get("controller");
-      App.router.get('applicationController').dataLoading().done(function (initValue) {
-        var popupView = App.HostPopup.initPopup(serviceName, controller);
-        popupView.set ('isNotShowBgChecked', !initValue);
-      })
-    }
-  })
-});

+ 0 - 69
ambari-web/test/controllers/wizard/stack_upgrade/step3_controller_test.js

@@ -1,69 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-var App = require('app');
-var Ember = require('ember');
-
-require('models/host');
-require('controllers/wizard/stack_upgrade/step3_controller');
-
-describe('App.StackUpgradeStep3Controller', function() {
-
-  var stackUpgradeStep3Controller = App.StackUpgradeStep3Controller.create();
-
-  beforeEach(function() {
-    sinon.stub(App.router, 'get', function(k) {
-      if ('stackUpgradeController' === k) return Em.Object.create({
-        save: Em.K
-      })
-      if ('stackUpgradeController.save' === k) return Em.K;
-      return Em.get(App.router, k);
-    });
-  });
-
-  afterEach(function() {
-    App.router.get.restore();
-  });
-
-  describe('#runUpgradeErrorCallback', function() {
-    var processes = [
-      Ember.Object.create({
-        status: '',
-        isRetry: false,
-        name: 'UPGRADE_SERVICES'
-      })
-    ];
-
-    stackUpgradeStep3Controller.set('processes', processes);
-    stackUpgradeStep3Controller.set('content', {cluster: {}, controllerName:'stackUpgradeController'});
-
-    it('check process condition', function() {
-      sinon.stub(App, 'get', function(k) {
-        if ('testMode' === k) return true;
-        return Em.get(App, k);
-      });
-      stackUpgradeStep3Controller.runUpgradeErrorCallback();
-      expect(stackUpgradeStep3Controller.get('processes').findProperty('name', 'UPGRADE_SERVICES').get('status')).to.equal('FAILED');
-      expect(stackUpgradeStep3Controller.get('processes').findProperty('name', 'UPGRADE_SERVICES').get('isRetry')).to.equal(true);
-      expect(stackUpgradeStep3Controller.get('submitButton')).to.equal(false);
-      App.get.restore();
-    });
-  });
-
-});