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

svn commit: r1442010 [22/29] - in /incubator/ambari/branches/branch-1.2: ./ ambari-agent/ ambari-agent/conf/unix/ ambari-agent/src/examples/ ambari-agent/src/main/puppet/modules/hdp-ganglia/files/ ambari-agent/src/main/puppet/modules/hdp-ganglia/manife...

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/assets/data/wizard/bootstrap/two_hosts_information.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/assets/data/wizard/bootstrap/two_hosts_information.json?rev=1442010&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/assets/data/wizard/bootstrap/two_hosts_information.json (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/assets/data/wizard/bootstrap/two_hosts_information.json Mon Feb  4 02:23:55 2013
@@ -0,0 +1,512 @@
+{
+  "href" : "http://ec2-107-20-107-224.compute-1.amazonaws.com:8080/api/v1/hosts?fields=*",
+  "items" : [
+    {
+      "href" : "http://ec2-107-20-107-224.compute-1.amazonaws.com:8080/api/v1/hosts/ip-10-190-153-220.ec2.internal",
+      "Hosts" : {
+        "host_status" : "HEALTHY",
+        "public_host_name" : "ec2-50-19-188-43.compute-1.amazonaws.com",
+        "cpu_count" : 2,
+        "rack_info" : "/default-rack",
+        "host_health_report" : "",
+        "os_arch" : "x86_64",
+        "host_name" : "ip-10-190-153-220.ec2.internal",
+        "disk_info" : [
+          {
+            "available" : "3822572",
+            "used" : "2022188",
+            "percent" : "35%",
+            "size" : "5904748",
+            "type" : "ext3",
+            "mountpoint" : "/"
+          },
+          {
+            "available" : "3932160",
+            "used" : "0",
+            "percent" : "0%",
+            "size" : "3932160",
+            "type" : "tmpfs",
+            "mountpoint" : "/dev/shm"
+          },
+          {
+            "available" : "411234588",
+            "used" : "203012",
+            "percent" : "1%",
+            "size" : "433455904",
+            "type" : "ext3",
+            "mountpoint" : "/grid/0"
+          },
+          {
+            "available" : "411234588",
+            "used" : "203012",
+            "percent" : "1%",
+            "size" : "433455904",
+            "type" : "ext3",
+            "mountpoint" : "/grid/1"
+          }
+        ],
+        "ip" : "10.190.153.220",
+        "os_type" : "redhat5",
+        "last_heartbeat_time" : 1358871154566,
+        "host_state" : "HEALTHY",
+        "last_agent_env" : {
+          "paths" : [
+            {
+              "name" : "/etc/hadoop",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/hadoop/conf",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/hbase",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/hcatalog",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/hive",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/oozie",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/sqoop",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/ganglia",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/nagios",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/hadoop",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/zookeeper",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/hbase",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/templeton",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/oozie",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/hadoop",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/zookeeper",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/hbase",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/templeton",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/hive",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/nagios",
+              "type" : "not_exist"
+            }
+          ],
+          "javaProcs" : [ ],
+          "rpms" : [
+            {
+              "name" : "yum",
+              "installed" : true,
+              "version" : "yum-3.2.22-39.el5"
+            },
+            {
+              "name" : "rpm",
+              "installed" : true,
+              "version" : "rpm-4.4.2.3-27.el5"
+            },
+            {
+              "name" : "openssl",
+              "installed" : true,
+              "version" : "openssl-0.9.8e-22.el5\nopenssl-0.9.8e-22.el5"
+            },
+            {
+              "name" : "curl",
+              "installed" : true,
+              "version" : "curl-7.15.5-15.el5\ncurl-7.15.5-15.el5"
+            },
+            {
+              "name" : "wget",
+              "installed" : false
+            },
+            {
+              "name" : "net-snmp",
+              "installed" : true,
+              "version" : "net-snmp-5.3.2.2-17.el5"
+            },
+            {
+              "name" : "ntpd",
+              "installed" : false
+            },
+            {
+              "name" : "ruby",
+              "installed" : true,
+              "version" : "ruby-1.8.5-24.el5"
+            },
+            {
+              "name" : "puppet",
+              "installed" : false
+            },
+            {
+              "name" : "nagios",
+              "installed" : false
+            },
+            {
+              "name" : "ganglia",
+              "installed" : false
+            },
+            {
+              "name" : "passenger",
+              "installed" : false
+            },
+            {
+              "name" : "hadoop",
+              "installed" : false
+            },
+            {
+              "name" : "hbase",
+              "installed" : false
+            },
+            {
+              "name" : "oozie",
+              "installed" : false
+            },
+            {
+              "name" : "sqoop",
+              "installed" : false
+            },
+            {
+              "name" : "pig",
+              "installed" : false
+            },
+            {
+              "name" : "zookeeper",
+              "installed" : false
+            },
+            {
+              "name" : "hive",
+              "installed" : false
+            },
+            {
+              "name" : "libconfuse",
+              "installed" : false
+            },
+            {
+              "name" : "postgresql",
+              "installed" : true,
+              "version" : "postgresql-8.1.23-1.el5_7.3"
+            },
+            {
+              "name" : "httpd",
+              "installed" : true,
+              "version" : "httpd-2.2.3-63.el5"
+            },
+            {
+              "name" : "apache2",
+              "installed" : false
+            },
+            {
+              "name" : "http-server",
+              "installed" : false
+            }
+          ],
+          "varRunHadoopPidCount" : 0,
+          "varLogHadoopLogCount" : 0,
+          "etcAlternativesConf" : [ ],
+          "repoInfo" : "Loaded plugins: amazon-id, fastestmirror, rhui-lb, security\nrepo id                             repo name                             status\nAMBARI.dev-1.x                      Ambari 1.x                                6\nHDP-UTILS-1.1.0.15                  Hortonworks Data Platform Utils Versi    51\nepel                                Extra Packages for Enterprise Linux 5  7243\nrhui-us-east-client-config-server-5 Red Hat Update Infrastructure 2.0 Cli     1\nrhui-us-east-rhel-server            Red Hat Enterprise Linux Server 5 (RP 14819\nrepolist: 22120\n"
+        },
+        "last_registration_time" : 1358871040696,
+        "total_mem" : 7864320
+      }
+    },
+    {
+      "href" : "http://ec2-107-20-107-224.compute-1.amazonaws.com:8080/api/v1/hosts/domU-12-31-39-14-04-91.compute-1.internal",
+      "Hosts" : {
+        "host_status" : "HEALTHY",
+        "public_host_name" : "ec2-107-20-107-224.compute-1.amazonaws.com",
+        "cpu_count" : 2,
+        "rack_info" : "/default-rack",
+        "host_health_report" : "",
+        "os_arch" : "x86_64",
+        "host_name" : "domU-12-31-39-14-04-91.compute-1.internal",
+        "disk_info" : [
+          {
+            "available" : "3400492",
+            "used" : "2444268",
+            "percent" : "42%",
+            "size" : "5904748",
+            "type" : "ext3",
+            "mountpoint" : "/"
+          },
+          {
+            "available" : "3932160",
+            "used" : "0",
+            "percent" : "0%",
+            "size" : "3932160",
+            "type" : "tmpfs",
+            "mountpoint" : "/dev/shm"
+          },
+          {
+            "available" : "411234588",
+            "used" : "203012",
+            "percent" : "1%",
+            "size" : "433455904",
+            "type" : "ext3",
+            "mountpoint" : "/grid/0"
+          },
+          {
+            "available" : "411234588",
+            "used" : "203012",
+            "percent" : "1%",
+            "size" : "433455904",
+            "type" : "ext3",
+            "mountpoint" : "/grid/1"
+          }
+        ],
+        "ip" : "10.206.7.95",
+        "os_type" : "redhat5",
+        "last_heartbeat_time" : 1358871154070,
+        "host_state" : "HEALTHY",
+        "last_agent_env" : {
+          "paths" : [
+            {
+              "name" : "/etc/hadoop",
+              "type" : "directory"
+            },
+            {
+              "name" : "/etc/hadoop/conf",
+              "type" : "file"
+            },
+            {
+              "name" : "/etc/hbase",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/hcatalog",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/hive",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/oozie",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/sqoop",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/ganglia",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/etc/nagios",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/hadoop",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/zookeeper",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/hbase",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/templeton",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/oozie",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/hadoop",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/zookeeper",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/hbase",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/run/templeton",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/hive",
+              "type" : "not_exist"
+            },
+            {
+              "name" : "/var/log/nagios",
+              "type" : "not_exist"
+            }
+          ],
+          "javaProcs" : [
+            {
+              "user" : "root",
+              "pid" : 2283,
+              "command" : "/bin/sh -c /usr/jdk64/jdk1.6.0_31/bin/java -server -XX:NewRatio=2 -XX:+UseConcMarkSweepGC -Xms512m -Xmx2048m -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/lib/ambari-server/* org.apache.ambari.server.controller.AmbariServer >/var/log/ambari-server/ambari-server.out 2>&1",
+              "hadoop" : true
+            },
+            {
+              "user" : "root",
+              "pid" : 2284,
+              "command" : "/usr/jdk64/jdk1.6.0_31/bin/java -server -XX:NewRatio=2 -XX:+UseConcMarkSweepGC -Xms512m -Xmx2048m -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/lib/ambari-server/* org.apache.ambari.server.controller.AmbariServer",
+              "hadoop" : false
+            }
+          ],
+          "rpms" : [
+            {
+              "name" : "yum",
+              "installed" : true,
+              "version" : "yum-3.2.22-39.el5"
+            },
+            {
+              "name" : "rpm",
+              "installed" : true,
+              "version" : "rpm-4.4.2.3-27.el5"
+            },
+            {
+              "name" : "openssl",
+              "installed" : true,
+              "version" : "openssl-0.9.8e-22.el5\nopenssl-0.9.8e-22.el5"
+            },
+            {
+              "name" : "curl",
+              "installed" : true,
+              "version" : "curl-7.15.5-15.el5\ncurl-7.15.5-15.el5"
+            },
+            {
+              "name" : "wget",
+              "installed" : false
+            },
+            {
+              "name" : "net-snmp",
+              "installed" : true,
+              "version" : "net-snmp-5.3.2.2-17.el5"
+            },
+            {
+              "name" : "ntpd",
+              "installed" : false
+            },
+            {
+              "name" : "ruby",
+              "installed" : true,
+              "version" : "ruby-1.8.5-24.el5"
+            },
+            {
+              "name" : "puppet",
+              "installed" : false
+            },
+            {
+              "name" : "nagios",
+              "installed" : false
+            },
+            {
+              "name" : "ganglia",
+              "installed" : false
+            },
+            {
+              "name" : "passenger",
+              "installed" : false
+            },
+            {
+              "name" : "hadoop",
+              "installed" : false
+            },
+            {
+              "name" : "hbase",
+              "installed" : false
+            },
+            {
+              "name" : "oozie",
+              "installed" : false
+            },
+            {
+              "name" : "sqoop",
+              "installed" : false
+            },
+            {
+              "name" : "pig",
+              "installed" : false
+            },
+            {
+              "name" : "zookeeper",
+              "installed" : false
+            },
+            {
+              "name" : "hive",
+              "installed" : false
+            },
+            {
+              "name" : "libconfuse",
+              "installed" : false
+            },
+            {
+              "name" : "postgresql",
+              "installed" : true,
+              "version" : "postgresql-8.1.23-6.el5_8"
+            },
+            {
+              "name" : "httpd",
+              "installed" : true,
+              "version" : "httpd-2.2.3-63.el5"
+            },
+            {
+              "name" : "apache2",
+              "installed" : false
+            },
+            {
+              "name" : "http-server",
+              "installed" : false
+            }
+          ],
+          "varRunHadoopPidCount" : 0,
+          "varLogHadoopLogCount" : 0,
+          "etcAlternativesConf" : [ ],
+          "repoInfo" : "Loaded plugins: amazon-id, fastestmirror, rhui-lb, security\nrepo id                             repo name                             status\nAMBARI.dev-1.x                      Ambari 1.x                                6\nHDP-UTILS-1.1.0.15                  Hortonworks Data Platform Utils Versi    51\nepel                                Extra Packages for Enterprise Linux 5  7243\nrhui-us-east-client-config-server-5 Red Hat Update Infrastructure 2.0 Cli     1\nrhui-us-east-rhel-server            Red Hat Enterprise Linux Server 5 (RP 14819\nrepolist: 22120\n"
+        },
+        "last_registration_time" : 1358870784262,
+        "total_mem" : 7864320
+      }
+    }
+  ]
+}

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/classes/job_class.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/classes/job_class.js?rev=1442010&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/classes/job_class.js (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/classes/job_class.js Mon Feb  4 02:23:55 2013
@@ -0,0 +1,48 @@
+/**
+ * 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 date = require('utils/date');
+var misc = require('utils/misc');
+
+App.Job2 = Ember.Object.extend({
+
+  id: "", //string
+  jobName: "", //string
+  workflowEntityName: "", //string
+  maps: 0, //number
+  reduces: 0, //number
+  status: "", //string
+  input: 0, //number
+  output: 0, //number
+  elapsed_time: 0, //number
+
+  duration: function() {
+    return date.timingFormat(parseInt(this.get('elapsed_time')));
+  }.property('elapsed_time'),
+
+  inputFormatted: function () {
+    return misc.formatBandwidth(this.get('input'));
+  }.property('input'),
+
+  outputFormatted: function () {
+    return misc.formatBandwidth(this.get('output'));
+  }.property('output')
+
+});

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/classes/run_class.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/classes/run_class.js?rev=1442010&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/classes/run_class.js (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/classes/run_class.js Mon Feb  4 02:23:55 2013
@@ -0,0 +1,103 @@
+/**
+ * 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 date = require('utils/date');
+var misc = require('utils/misc');
+
+App.Run2 = Ember.Object.extend({
+  id: null, //string
+  appName: null, //string
+  userName: null, //string
+  numJobsTotal: 0, //number
+  numJobsCompleted: 0, //number
+  startTime: 0, //number
+  elapsedTime: 0, //number
+  workflowContext: null, //string
+  input: 0, //number
+  output: 0, //number
+
+  /**
+   * Will set to true when we load all jobs related to this run
+   */
+  loadAllJobs : false,
+
+  /**
+   * runId  short part
+   */
+  idFormatted: function() {
+    return this.get('id').substr(0, 20);
+  }.property('id'),
+
+  /**
+   * Run duration
+   */
+  duration: function() {
+    return date.timingFormat(this.get('elapsedTime'));
+  }.property('elapsedTime'),
+
+  /**
+   * Status of running jobs
+   */
+  isRunning: function () {
+    return !this.get('numJobsTotal') == this.get('numJobsCompleted');
+  }.property('numJobsTotal', 'numJobsCompleted'),
+
+  /**
+   * Sum of input bandwidth for all jobs with appropriate measure
+   */
+  inputFormatted: function () {
+    return misc.formatBandwidth(this.get('input'));
+  }.property('input'),
+
+  /**
+   *  Sum of output bandwidth for all jobs with appropriate measure
+   */
+  outputFormatted: function () {
+    return misc.formatBandwidth(this.get('output'));
+  }.property('output'),
+
+  lastUpdateTime: function() {
+    return this.get('startTime') + this.get('elapsedTime');
+  }.property('elapsedTime', 'startTime'),
+
+  lastUpdateTimeFormatted: function() {
+    return date.dateFormat(this.get('lastUpdateTime'));
+  }.property('lastUpdateTime'),
+
+  lastUpdateTimeFormattedShort: function(){
+    return date.dateFormatShort(this.get('lastUpdateTime'));
+  }.property('lastUpdateTime'),
+
+  /**
+   * Type value based on first part of id
+   */
+  type: function() {
+    if (this.get('id').indexOf('pig_') === 0) {
+      return 'Pig';
+    }
+    if (this.get('id').indexOf('hive_') === 0) {
+      return 'Hive';
+    }
+    if (this.get('id').indexOf('mr_') === 0) {
+      return 'MapReduce';
+    }
+    return 'Undefined';
+  }.property('id')
+});
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers.js Mon Feb  4 02:23:55 2013
@@ -26,7 +26,6 @@ require('controllers/installer');
 require('controllers/global/background_operations_controller');
 require('controllers/main');
 require('controllers/main/admin');
-require('controllers/main/admin/item');
 require('controllers/main/admin/user');
 require('controllers/main/admin/user/edit');
 require('controllers/main/admin/user/create');
@@ -35,11 +34,9 @@ require('controllers/main/admin/authenti
 require('controllers/main/service');
 require('controllers/main/service/item');
 require('controllers/main/service/info/summary');
-require('controllers/main/service/info/metrics');
 require('controllers/main/service/info/configs');
 require('controllers/main/service/info/audit');
 require('controllers/main/service/add_controller');
-require('controllers/main/alert');
 require('controllers/main/host');
 require('controllers/main/host/details');
 require('controllers/main/host/add_controller');
@@ -59,8 +56,6 @@ require('controllers/main/charts/heatmap
 require('controllers/main/charts/heatmap_metrics/heatmap_metric_mapreduce_reducesRunning');
 require('controllers/main/charts/heatmap_metrics/heatmap_metric_mapreduce_memHeapUsed');
 require('controllers/main/charts/heatmap');
-require('controllers/main/charts/horizon_chart');
-require('controllers/main/rack');
 require('controllers/main/apps_controller');
 require('controllers/main/apps/item_controller');
 require('controllers/wizard/slave_component_groups_controller');

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/global/background_operations_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/global/background_operations_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/global/background_operations_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/global/background_operations_controller.js Mon Feb  4 02:23:55 2013
@@ -160,7 +160,6 @@ App.BackgroundOperationsController = Em.
       if (executeTasks[i].status == 'QUEUED' || executeTasks[i].status == 'PENDING' || executeTasks[i].status == 'IN_PROGRESS') {
         var url = App.testMode ? '/data/background_operations/list_on_start.json' :
             App.apiPrefix + '/clusters/' + App.router.getClusterName() + '/requests/' + executeTasks[i].request_id + '/tasks/' + executeTasks[i].id;
-        var j = i;
         $.ajax({
           type: "GET",
           url: url,
@@ -168,7 +167,11 @@ App.BackgroundOperationsController = Em.
           timeout: App.timeout,
           success: function (data) {
             if (data) {
-              executeTasks[j] = data.Tasks;
+              for(var i = 0;i < executeTasks.length; i++){
+                if(data.Tasks.id == executeTasks[i].id){
+                  executeTasks[i] = data.Tasks;
+                }
+              }
             }
           },
           error: function () {
@@ -179,7 +182,6 @@ App.BackgroundOperationsController = Em.
         });
       }
     }
-    ;
     var currentTasks;
     currentTasks = runningTasks.concat(executeTasks);
     currentTasks = currentTasks.sort(function (a, b) {

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/global/cluster_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/global/cluster_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/global/cluster_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/global/cluster_controller.js Mon Feb  4 02:23:55 2013
@@ -47,9 +47,6 @@ App.ClusterController = Em.Controller.ex
     'users':false
   }),
 
-  postLoadList:{
-    'runs':false
-  },
   /**
    * load cluster name
    */
@@ -94,7 +91,7 @@ App.ClusterController = Em.Controller.ex
       var svcs = App.Service.find();
       var gangliaSvc = svcs.findProperty("serviceName", "GANGLIA");
       if (gangliaSvc) {
-        var svcComponents = gangliaSvc.get('components');
+        var svcComponents = gangliaSvc.get('hostComponents');
         if (svcComponents) {
           var gangliaSvcComponent = svcComponents.findProperty("componentName", "GANGLIA_SERVER");
           if (gangliaSvcComponent) {
@@ -128,7 +125,7 @@ App.ClusterController = Em.Controller.ex
       var svcs = App.Service.find();
       var nagiosSvc = svcs.findProperty("serviceName", "NAGIOS");
       if (nagiosSvc) {
-        var svcComponents = nagiosSvc.get('components');
+        var svcComponents = nagiosSvc.get('hostComponents');
         if (svcComponents) {
           var nagiosSvcComponent = svcComponents.findProperty("componentName", "NAGIOS_SERVER");
           if (nagiosSvcComponent) {
@@ -145,7 +142,7 @@ App.ClusterController = Em.Controller.ex
       }
       return null;
     }
-  }.property('App.router.updateController.isUpdated','dataLoadList.services'),
+  }.property('App.router.updateController.isUpdated', 'dataLoadList.services', 'dataLoadList.hosts'),
 
   isNagiosInstalled:function () {
     if (App.testMode) {
@@ -178,22 +175,6 @@ App.ClusterController = Em.Controller.ex
     });
     this.set('alerts', sortedArray);
   },
-  loadRuns:function () {
-    if (this.get('postLoadList.runs')) {
-      return;
-    }
-
-    var self = this;
-    var runsUrl = App.testMode ? "/data/apps/runs.json" : App.apiPrefix + "/jobhistory/workflow?orderBy=startTime&sortDir=DESC&limit=" + App.maxRunsForAppBrowser;
-
-    App.HttpClient.get(runsUrl, App.runsMapper, {
-      complete:function (jqXHR, textStatus) {
-        self.set('postLoadList.runs', true);
-      }
-    }, function () {
-      self.set('postLoadList.runs', true);
-    });
-  },
 
   /**
    * This method automatically loads alerts when Nagios URL
@@ -210,10 +191,9 @@ App.ClusterController = Em.Controller.ex
       if (lastSlash > -1) {
         nagiosUrl = nagiosUrl.substring(0, lastSlash);
       }
-      var dataUrl;
+      var dataUrl = this.getUrl('/data/alerts/alerts.json', '/host_components?HostRoles/component_name=NAGIOS_SERVER&fields=HostRoles/nagios_alerts');
       var ajaxOptions = {
-        dataType:"jsonp",
-        jsonp:"jsonp",
+        dataType:"json",
         context:this,
         complete:function (jqXHR, textStatus) {
           this.updateLoadStatus('alerts');
@@ -224,12 +204,6 @@ App.ClusterController = Em.Controller.ex
           console.log('Nagios $.ajax() response:', error);
         }
       };
-      if (App.testMode) {
-        dataUrl = "/data/alerts/alerts.jsonp";
-        ajaxOptions.jsonpCallback = "jQuery172040994187095202506_1352498338217";
-      } else {
-        dataUrl = nagiosUrl + "/hdp/nagios/nagios_alerts.php?q1=alerts&alert_type=all";
-      }
       App.HttpClient.get(dataUrl, App.alertsMapper, ajaxOptions);
     } else {
       this.updateLoadStatus('alerts');

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/login_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/login_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/login_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/login_controller.js Mon Feb  4 02:23:55 2013
@@ -27,10 +27,6 @@ App.LoginController = Em.Object.extend({
 
   errorMessage: '',
 
-  isAdmin: function(){
-    return App.db.getUser().admin;
-  }.property('loginName'),
-
   submit: function (e) {
     this.set('errorMessage', '');
 

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/admin/user.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/admin/user.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/admin/user.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/admin/user.js Mon Feb  4 02:23:55 2013
@@ -79,12 +79,14 @@ App.MainAdminUserController = Em.Control
       dataType: 'json',
       timeout: App.timeout,
       success: function(data){
-          callback(true);
+          callback(true, '');
       },
 
       error: function (request, ajaxOptions, error) {
         //do something
-        callback(false);
+        var message = $.parseJSON(request.responseText).message;
+        message = message.substr(message.indexOf(':') + 1); // Remove classname
+        callback(false, message);
         console.log('error on change component host status')
       },
 

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/apps/item_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/apps/item_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/apps/item_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/apps/item_controller.js Mon Feb  4 02:23:55 2013
@@ -24,7 +24,8 @@ App.MainAppsItemController = Em.Controll
    * Was set outside in App.MainAppsView.
    * It's instance of App.Run model
    */
-  content: null,
+  content: [],
+  jobsLoaded:false,
 
   lastJobId : null,
   gettingJobs:function(){
@@ -38,10 +39,12 @@ App.MainAppsItemController = Em.Controll
     this.set('lastJobId', currentId);
     var self = this;
 
-    var url = App.testMode ? '/data/apps/jobs.json' :
+    var url = App.testMode ? '/data/apps/jobs/'+ currentId +'.json' :
       App.apiPrefix + "/jobhistory/job?workflowId=" + currentId;
 
-    App.HttpClient.get(url, App.jobsMapper,{
+    var mapper = App.jobsMapper;
+    mapper.set('controller', this);
+    App.HttpClient.get(url, mapper,{
       complete:function(jqXHR, textStatus) {
         self.set('content.loadAllJobs', true);
       }

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/apps_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/apps_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/apps_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/apps_controller.js Mon Feb  4 02:23:55 2013
@@ -17,64 +17,502 @@
  */
 
 var App = require('app');
-require('utils/jquery.unique');
+var misc = require('utils/misc');
+var date = require('utils/date');
 
 App.MainAppsController = Em.ArrayController.extend({
 
   name:'mainAppsController',
-  content: function(){
-    return App.Run.find();
-  }.property('App.router.clusterController.postLoadList.runs'),
-  /**
-   * Mark all Runs as not Filtered
-   */
-  clearFilteredRuns: function() {
-    this.get('content').setEach('isFiltered', false);
-    this.set('filteredRunsLength', 0);
-  },
-  /**
-   * Mark Run as filtered
-   * @param id runId
-   */
-  addFilteredRun: function(id) {
-    this.get('content').findProperty('id', id).set('isFiltered', true);
-    this.set('filteredRunsLength', this.get('content').filterProperty('isFiltered', true).length);
-  },
+  content: [],
+
+  loaded : false,
+  loading : false,
+
   /**
-   * Mark Runs as filtered
-   * @param ids array of Run id
+   * List of users.
+   * Will be used for filtering in user column.
+   * Go to App.MainAppsView.userFilterView for more information
    */
-  filterFilteredRuns: function(ids) {
-    this.get('content').filter(function(item) {
-      if ($.inArray(item.get('id'), ids) !== -1) {
-        item.set('isFiltered', true);
+  users: function () {
+    return this.get('content').mapProperty("userName").uniq().map(function(userName){
+      return {
+        name: userName,
+        checked: false
+      };
+    });
+  }.property('content.length'),
+
+  loadRuns:function () {
+
+    this.set('loading', true);
+    var self = this;
+
+    //var runsUrl = App.testMode ? "/data/apps/runs.json" : App.apiPrefix + "/jobhistory/workflow?orderBy=startTime&sortDir=DESC&limit=" + App.maxRunsForAppBrowser;
+    var runsUrl = App.testMode ? "/data/apps/runs.json" : App.apiPrefix + this.get("runUrl");
+
+    App.HttpClient.get(runsUrl, App.runsMapper, {
+      complete:function (jqXHR, textStatus) {
+        self.set('loading', false);
+        self.set('loaded', true);
       }
     });
-    this.set('filteredRunsLength', this.get('content').filterProperty('isFiltered', true).length);
   },
-  /**
-   * Identifier of the last starred/unstarred run
-   */
-  lastStarClicked: null,
-  /**
-   * Starred Runs count
+
+  //Pagination Object
+
+  paginationObject:{
+    iTotalDisplayRecords :null,
+    iTotalRecords:null,
+    startIndex:null,
+    endIndex:null
+  },
+
+  /*
+   Set number of filtered jobs when switching to all jobs
    */
-  staredRunsLength: function() {
-    return this.get('content').filterProperty('isStared', true).length;
-  }.property('content'),
+  iTotalDisplayRecordsObserver:function(){
+    if(this.get("filterObject.allFilterActivated")){
+      //this.set("paginationObject.filteredDisplayRecords","-10");
+      this.set("filterObject.allFilterActivated", false);
+    }else{
+      this.set("filterObject.filteredDisplayRecords",this.get("paginationObject.iTotalDisplayRecords"));
+    }
+  }.observes("paginationObject.iTotalDisplayRecords"),
+
+
+  //Filter object
+
+  filterObject : Ember.Object.create({
+    sSearch_0:"",
+    sSearch_1:"",
+    sSearch_2:"",
+    sSearch_3:"",
+    minJobs:"",
+    maxJobs:"",
+    minInputBytes:"",
+    maxInputBytes:"",
+    minOutputBytes:"",
+    maxOutputBytes:"",
+    minDuration:"",
+    maxDuration:"",
+    minStartTime:"",
+    maxStartTime:"",
+    sSearch:"",
+    iDisplayLength:"",
+    iDisplayStart:"",
+    iSortCol_0:"",
+    sSortDir_0:"",
+
+    allFilterActivated:false,
+    filteredDisplayRecords:null,
+
+    viewType:"all",
+    viewTypeClickEvent:false,
+
+    /**
+     * Direct binding to job filter field
+     */
+    runType:"",
+    onRunTypeChange:function(){
+      if(this.runType == "MapReduce"){
+        this.set("sSearch_2","mr");
+      }else if(this.runType == "Hive"){
+        this.set("sSearch_2","hive");
+      }else if(this.runType == "Pig"){
+        this.set("sSearch_2","pig");
+      }else{
+        this.set("sSearch_2","");
+      }
+    }.observes("runType"),
+
+    /**
+     * Direct binding to job filter field
+     */
+    jobs:"",
+    onJobsChange:function(){
+      var minMaxTmp = this.parseNumber(this.jobs);
+      this.set("minJobs", minMaxTmp.min);
+      this.set("maxJobs", minMaxTmp.max);
+    }.observes("jobs"),
+
+    /**
+     * Direct binding to Input filter field
+     */
+    input:"",
+    onInputChange:function(){
+      var minMaxTmp = this.parseBandWidth(this.input);
+      this.set("minInputBytes", minMaxTmp.min);
+      this.set("maxInputBytes", minMaxTmp.max);
+    }.observes("input"),
+
+    /**
+     * Direct binding to Output filter field
+     */
+    output:"",
+    onOutputChange:function(){
+      var minMaxTmp = this.parseBandWidth(this.output);
+      this.set("minOutputBytes", minMaxTmp.min);
+      this.set("maxOutputBytes", minMaxTmp.max);
+    }.observes("output"),
+
+    /**
+     * Direct binding to Duration filter field
+     */
+    duration:"",
+    onDurationChange:function(){
+      var minMaxTmp = this.parseDuration(this.duration);
+      this.set("minDuration", minMaxTmp.min);
+      this.set("maxDuration", minMaxTmp.max);
+    }.observes("duration"),
+
+    /**
+     * Direct binding to Run Date filter field
+     */
+    runDate:"",
+    onRunDateChange:function(){
+      var minMaxTmp = this.parseDate(this.runDate);
+      this.set("minStartTime", minMaxTmp.min);
+      this.set("maxStartTime", minMaxTmp.max);
+    }.observes("runDate"),
+
+    parseDuration:function(value){
+      var tmp={
+        min:"",
+        max:""
+      };
+
+      var compareChar = isNaN(value.charAt(0)) ? value.charAt(0) : false;
+      var compareScale = value.match(/s|m|h/);
+      compareScale = compareScale ? compareScale[0] : "";
+      var compareValue = compareChar ? parseFloat(value.substr(1, value.length)) : parseFloat(value.substr(0, value.length));
+      if(isNaN(compareValue)){
+        return tmp;
+      }
+      switch (compareScale) {
+        case 'h':
+        tmp.min = Math.ceil((parseFloat(compareValue)-0.0001)*1000*60*60);
+        tmp.max = Math.floor((parseFloat(compareValue)+0.0001)*1000*60*60);
+        break;
+        case 'm':
+        tmp.min = Math.ceil((parseFloat(compareValue)-0.001)*1000*60);
+        tmp.max = Math.floor((parseFloat(compareValue)+0.001)*1000*60);
+        break;
+        case 's':
+        tmp.min = Math.ceil((parseFloat(compareValue)-0.01)*1000);
+        tmp.max = Math.floor((parseFloat(compareValue)+0.01)*1000);
+        break;
+        default:
+          tmp.min = Math.max(1024,Math.ceil((compareValue-0.05)*1024));
+          tmp.max = Math.min(1048575,Math.floor((compareValue+0.05)*1024));
+      }
+      switch (compareChar) {
+        case '<':
+          tmp.min="";
+          break;
+        case '>':
+          tmp.max="";
+          break;
+      }
+      return tmp;
+    },
+
+    parseDate:function(value){
+      var tmp={
+        min:"",
+        max:""
+      };
+      var nowTime = new Date().getTime();
+
+      switch (value){
+        case 'Any':
+          break;
+        case 'Past 1 Day':
+          tmp.min= nowTime - 86400000;
+          break;
+        case 'Past 2 Days':
+          tmp.min= nowTime - 172800000;
+          break;
+        case 'Past 7 Days':
+          tmp.min= nowTime - 604800000;
+          break;
+        case 'Past 14 Days':
+          tmp.min= nowTime - 1209600000;
+          break;
+        case 'Past 30 Days':
+          tmp.min= nowTime - 2592000000;
+          break;
+        case 'Running Now':
+          tmp.min= nowTime;
+          break;
+      }
+      return tmp;
+    },
+
+    parseBandWidth:function(value){
+      var tmp={
+        min:"",
+        max:""
+      };
+
+      var compareChar = isNaN(value.charAt(0)) ? value.charAt(0) : false;
+      var compareScale = value.match(/kb|k|mb|m|gb|g/);
+      compareScale = compareScale ? compareScale[0] : "";
+      var compareValue = compareChar ? parseFloat(value.substr(1, value.length)) : parseFloat(value.substr(0, value.length));
+      if(isNaN(compareValue)){
+        return tmp;
+      }
+      switch (compareScale) {
+        case 'g': case 'gb':
+          tmp.min = Math.max(1073741824,Math.ceil((compareValue-0.005)*1073741824));
+          tmp.max = Math.floor((compareValue+0.005)*1073741824);
+          break;
+        case 'm': case 'mb':
+          tmp.min = Math.max(1048576,Math.ceil((compareValue-0.05)*1048576));
+          tmp.max = Math.min(1073741823,Math.floor((compareValue+0.05)*1048576));
+          break;
+        case 'k': case 'kb':
+          tmp.min = Math.max(1024,Math.ceil((compareValue-0.05)*1024));
+          tmp.max = Math.min(1048575,Math.floor((compareValue+0.05)*1024));
+          break;
+        default:
+          tmp.min = Math.max(1024,Math.ceil((compareValue-0.05)*1024));
+          tmp.max = Math.min(1048575,Math.floor((compareValue+0.05)*1024));
+      }
+      switch (compareChar) {
+        case '<':
+          tmp.min="";
+          break;
+        case '>':
+          tmp.max="";
+          break;
+      }
+      return tmp;
+    },
+    parseNumber:function(value){
+      var tmp={
+        min:"",
+        max:""
+      };
+      switch (value.charAt(0)) {
+        case '<':
+          tmp.max=value.substr(1);
+          break;
+        case '>':
+          tmp.min=value.substr(1);
+          break;
+        case '=':
+          tmp.min=value.substr(1);
+          tmp.max=value.substr(1);
+          break;
+        default:
+          tmp.min=value;
+          tmp.max=value;
+      }
+      return tmp;
+    },
+    createAppLink:function(){
+      var link = "/jobhistory/datatable?";
+
+      if(this.sSearch_0){
+        link +=  "sSearch_0=" + this.sSearch_0 + "&";
+      }
+      if(this.sSearch_1){
+        link +=  "sSearch_1=" + this.sSearch_1 + "&";
+      }
+      if(this.sSearch_2 && this.sSearch_2 != "Any"){
+        link +=  "sSearch_2=" + this.sSearch_2 + "&";
+      }
+      if(this.sSearch_3){
+        link +=  "sSearch_3=" + this.sSearch_3 + "&";
+      }
+      if(this.minJobs){
+        link +=  "minJobs=" + this.minJobs + "&";
+      }
+      if(this.maxJobs){
+        link +=  "maxJobs=" + this.maxJobs + "&";
+      }
+      if(this.minInputBytes){
+        link +=  "minInputBytes=" + this.minInputBytes + "&";
+      }
+      if(this.maxInputBytes){
+        link +=  "maxInputBytes=" + this.maxInputBytes + "&";
+      }
+      if(this.minOutputBytes){
+        link +=  "minOutputBytes=" + this.minOutputBytes + "&";
+      }
+      if(this.maxOutputBytes){
+        link +=  "maxOutputBytes=" + this.maxOutputBytes + "&";
+      }
+      if(this.minDuration){
+        link +=  "minDuration=" + this.minDuration + "&";
+      }
+      if(this.maxDuration){
+        link +=  "maxDuration=" + this.maxDuration + "&";
+      }
+      if(this.minStartTime){
+        link +=  "minStartTime=" + this.minStartTime + "&";
+      }
+      if(this.maxStartTime){
+        link +=  "maxStartTime=" + this.maxStartTime + "&";
+      }
+      if(this.sSearch){
+        link +=  "sSearch=" + this.sSearch + "&";
+      }
+      if(this.iDisplayLength){
+        link +=  "iDisplayLength=" + this.iDisplayLength + "&";
+      }
+      if(this.iDisplayStart){
+        link +=  "iDisplayStart=" + this.iDisplayStart + "&";
+      }
+      if(this.iSortCol_0){
+        link +=  "iSortCol_0=" + this.iSortCol_0 + "&";
+      }
+      if(this.sSortDir_0){
+        link +=  "sSortDir_0=" + this.sSortDir_0 + "&";
+      }
+
+      link = link.slice(0,link.length-1);
+
+      var valueInString=link.match(/&/g);
+
+      if(!this.get("viewTypeClickEvent"))
+      if(valueInString != null){
+        this.set("viewType","filtered");
+      }else{
+        this.set("viewType","all");
+      }
+
+      return link;
+    }
+  }),
+
+  runUrl : "/jobhistory/datatable",
+  runTimeout : null,
+
+  valueObserver: function(){
+    var link = this.get('filterObject').createAppLink();
+
+    if(this.get("filterObject.viewType") == "filtered"){
+      this.set("runUrl", link);
+    }else{
+      this.set("runUrl",  "/jobhistory/datatable?iDisplayLength="+this.get('filterObject.iDisplayLength'));
+    }
+
+    var timeout = this.get('runTimeout');
+    var self = this;
+
+    clearTimeout(timeout);
+    timeout = setTimeout(function(){
+      console.log(self.get("runUrl"));
+      self.loadRuns();
+    }, 300);
+
+    this.set('runTimeout', timeout);
+
+  }.observes(
+      'filterObject.sSearch_0',
+      'filterObject.sSearch_1',
+      'filterObject.sSearch_2',
+      'filterObject.sSearch_3',
+      'filterObject.minJobs',
+      'filterObject.maxJobs',
+      'filterObject.minInputBytes',
+      'filterObject.maxInputBytes',
+      'filterObject.minOutputBytes',
+      'filterObject.maxOutputBytes',
+      'filterObject.minDuration',
+      'filterObject.maxDuration',
+      'filterObject.minStartTime',
+      'filterObject.maxStartTime',
+      'filterObject.sSearch',
+      'filterObject.iDisplayLength',
+      'filterObject.iDisplayStart',
+      'filterObject.iSortCol_0',
+      'filterObject.sSortDir_0',
+      'filterObject.viewType'
+  ),
+
+  serverData: "",
+  summary: null,
+
   /**
-   * Click on star on table row
-   * @return {Boolean} false for prevent default event handler
+   * Observer for summary data from server
    */
-  starClick: function(event) {
-    event.target.classList.toggle('stared');
-    var id = jQuery(event.target).parent().parent().parent().find('.appId').attr('title');
-    var run = this.get('content').findProperty('id', id);
-    if (run) {
-      run.set('isStared', !run.get('isStared'));
+  summaryInfo: function(){
+    var tmp;
+    var summary = this.get('serverData');
+    if(!summary){
+      tmp = {
+        'jobs': {
+          'avg': '-',
+          'min': '-',
+          'max': '-'
+        },
+        'input': {
+          'avg': '-',
+          'min': '-',
+          'max': '-'
+        },
+        'output': {
+          'avg': '-',
+          'min': '-',
+          'max': '-'
+        },
+        'duration': {
+          'avg': '-',
+          'min': '-',
+          'max': '-'
+        },
+        'times': {
+          'oldest': '-',
+          'youngest': '-'
+        }
+      };
+    }else{
+      tmp = {
+        'jobs': {
+          'avg': summary.jobs.avg.toFixed(2),
+          'min': summary.jobs.min,
+          'max': summary.jobs.max
+        },
+        'input': {
+          'avg': misc.formatBandwidth(summary.input.avg),
+          'min': misc.formatBandwidth(summary.input.min),
+          'max': misc.formatBandwidth(summary.input.max)
+        },
+        'output': {
+          'avg': misc.formatBandwidth(summary.output.avg),
+          'min': misc.formatBandwidth(summary.output.min),
+          'max': misc.formatBandwidth(summary.output.max)
+        },
+        'duration': {
+          'avg': date.timingFormat(Math.round(summary.duration.avg)),
+          'min': date.timingFormat(summary.duration.min),
+          'max': date.timingFormat(summary.duration.max)
+        },
+        'times': {
+          'oldest': new Date(summary.times.oldest).toDateString(),
+          'youngest': new Date(summary.times.youngest).toDateString()
+        }
+      };
     }
-    this.set('staredRunsLength', this.get('content').filterProperty('isStared', true).length);
-    this.set('lastStarClicked', id);
-    return false;
-  }
+    this.set("summary",tmp);
+  }.observes('serverData'),
+
+
+  columnsName: Ember.ArrayController.create({
+    content: [
+      { name: 'App ID', index: 0 },
+      { name: 'Name', index: 1 },
+      { name: 'Type', index: 2 },
+      { name: 'User', index: 3 },
+      { name: 'Jobs', index: 4 },
+      { name: 'Input', index: 5 },
+      { name: 'Output', index: 6 },
+      { name: 'Duration', index: 7 },
+      { name: 'Run Date', index: 8 }
+    ]
+  })
+
+
 })

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/charts/heatmap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/charts/heatmap.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/charts/heatmap.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/charts/heatmap.js Mon Feb  4 02:23:55 2013
@@ -19,7 +19,9 @@ var App = require('app');
 
 App.MainChartsHeatmapController = Em.Controller.extend({
   name: 'mainChartsHeatmapController',
-  cluster: App.Cluster.find(1),
+  cluster: function() {
+    return App.Cluster.find().objectAt(0);
+  }.property(''),
   allMetrics: function(){
     var metrics = [
       Em.Object.create({

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host.js Mon Feb  4 02:23:55 2013
@@ -18,161 +18,47 @@
 
 var App = require('app');
 var validator = require('utils/validator');
+var componentHelper = require('utils/component');
 
 App.MainHostController = Em.ArrayController.extend({
   name:'mainHostController',
-  content:[],
+  content: App.Host.find(),
   comeWithFilter: false,
-  fullContent:App.Host.find(),
-  clusters:App.Cluster.find(),
 
-  isAdmin: function(){
-    return App.db.getUser().admin;
-  }.property('App.router.loginController.loginName'),
+  /**
+   * Components which will be shown in component filter
+   */
   componentsForFilter:function() {
-    var components = App.Component.find();
-    var ret = new Array();
-    if (!components) {
-      return ret;
-    }
-    components.forEach(function(item) {
-      var o = Ember.Object.create({
-        id: item.get('id'),
-        isMaster: item.get('isMaster'),
-        isSlave: item.get('isSlave'),
-        displayName: item.get('displayName'),
-        componentName: item.get('componentName'),
-        checkedForHostFilter: item.get('checkedForHostFilter')
-      });
-      ret.push(o);
-    });
-    return ret;
-  }.property(),
-
-  totalBinding:'fullContent.length',
-  filters:{components:[]},
-  isDisabled:true,
-
-  checkRemoved:function (host_id) {
-    var hosts = this.get('content');
-    var selectedHosts = hosts.filterProperty('id', host_id);
-    this.get('fullContent').removeObjects(selectedHosts);
-  },
+    var installedComponents = componentHelper.getInstalledComponents();
+    installedComponents.setEach('checkedForHostFilter', false);
+    return installedComponents;
+  }.property('App.router.clusterController.isLoaded'),
 
   masterComponents:function () {
-    var components = [];
-    this.get('componentsForFilter').forEach(function (component) {
-      if (component.get('isMaster')) {
-        components.push(component);
-      }
-    });
-    return components;
+    return this.get('componentsForFilter').filterProperty('isMaster', true);
   }.property('componentsForFilter'),
 
   slaveComponents:function () {
-    var components = [];
-    this.get('componentsForFilter').forEach(function (component) {
-      if (component.get('isSlave')) {
-        components.push(component);
-      }
-    });
-    return components;
+    return this.get('componentsForFilter').filterProperty('isSlave', true);
   }.property('componentsForFilter'),
 
   clientComponents: function() {
-    var components = [];
-    this.get('componentsForFilter').forEach(function(component) {
-      if (!component.get('isMaster') && !component.get('isSlave')) {
-        components.push(component);
-      }
-    });
-    return components;
+    return this.get('componentsForFilter').filterProperty('isClient', true);
   }.property('componentsForFilter'),
 
-  backgroundOperationsCount:function () {
-    return 5;
-  }.property(),
-
-  checkedComponentsIds:function () {
-    var checked = [];
-    this.get('componentsForFilter').forEach(function (comp) {
-      if (comp.get('checkedForHostFilter'))
-        checked.push(comp.get('id'));
-    });
-
-    return checked;
-  },
-
+  /**
+   * Filter hosts by componentName of <code>component</code>
+   * @param component App.HostComponent
+   */
   filterByComponent:function (component) {
-    var id = component.get('id');
-    /*this.get('componentsForFilter').setEach('isChecked', false);
-    component.set('isChecked', true);*/
+    var id = component.get('componentName');
+
     this.get('componentsForFilter').setEach('checkedForHostFilter', false);
     this.get('componentsForFilter').filterProperty('id', id).setEach('checkedForHostFilter', true);
-    //component.set('checkedForHostFilter', true);
-    this.set('filters.components', [component.get('id')]);
-    console.log(this.get('filters.components').objectAt(0));
-    this.set('comeWithFilter', true);
-  },
-
-
-  applyHostFilters:function (items) {
-
-    var field = 'hostName'; // make this function universal
-    var value = this.get('hostFilter' + field);
 
-    var itemsToDelete = [];
-    if (value) {
-      items.forEach(function (host, index) {
-        if (host) {
-          var fieldValue = host.get(field);
-          if (fieldValue) {
-            if (fieldValue.indexOf(value) == -1) {
-              itemsToDelete.push(host);
-            }
-          }
-        }
-      });
-    }
-
-    if (itemsToDelete.length) {
-      itemsToDelete.forEach(function (hostToDelete) {
-        var index = items.indexOf(hostToDelete);
-        items.removeAt(index);
-      })
-    }
-
-    return items;
+    this.set('comeWithFilter', true);
   },
 
-  changeContent:function () {
-    var items = [];
-    var filters = this.get('filters.components');
-    this.get('fullContent').forEach(function (item) {
-      if (filters.length) {
-        var inFilters = false;
-        item.get('components').forEach(function (component) {
-          if (filters.indexOf(component.get('id')) != -1) {
-            inFilters = true;
-          }
-        });
-
-
-        if (inFilters) {
-          items.push(item);
-        }
-      }
-      else {
-        items.push(item);
-      }
-    });
-
-    items = this.applyHostFilters(items);
-    this.set('total', items.length);
-
-    this.replace(0, this.get('length'), items);
-  }.observes('total'),
-
   decommissionButtonPopup:function () {
     var self = this;
     App.ModalPopup.show({
@@ -212,6 +98,12 @@ App.MainHostController = Em.ArrayControl
       console.log('Removing:  ' + _hostInfo.hostName);
     });
     this.get('fullContent').removeObjects(selectedHosts);
+  },
+
+  checkRemoved:function (host_id) {
+    var hosts = this.get('content');
+    var selectedHosts = hosts.filterProperty('id', host_id);
+    this.get('fullContent').removeObjects(selectedHosts);
   }
 
 });
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/add_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/add_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/add_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/add_controller.js Mon Feb  4 02:23:55 2013
@@ -156,7 +156,7 @@ App.AddHostController = App.WizardContro
     var masterComponentHosts = App.db.getMasterComponentHosts();
     if (!masterComponentHosts) {
       masterComponentHosts = [];
-      App.Component.find().filterProperty('isMaster', true).forEach(function (item) {
+      App.HostComponent.find().filterProperty('isMaster', true).forEach(function (item) {
         masterComponentHosts.push({
           component: item.get('componentName'),
           hostName: item.get('host.hostName'),

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/details.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/details.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/details.js Mon Feb  4 02:23:55 2013
@@ -22,9 +22,7 @@ App.MainHostDetailsController = Em.Contr
   name: 'mainHostDetailsController',
   content: null,
   isFromHosts: false,
-  isAdmin: function(){
-    return App.db.getUser().admin;
-  }.property('App.router.loginController.loginName'),
+
   routeHome: function () {
     App.router.transitionTo('main.dashboard');
   },
@@ -74,7 +72,7 @@ App.MainHostDetailsController = Em.Contr
     });
   },
 
-  startComponent: function(event){
+  startComponent: function (event) {
     var self = this;
     App.ModalPopup.show({
       header: Em.I18n.t('hosts.host.start.popup.header'),
@@ -96,10 +94,10 @@ App.MainHostDetailsController = Em.Contr
 
           console.log('Send request for STARTING successfully');
 
-          if(App.testMode){
-            component.set('workStatus', App.Component.Status.starting);
+          if (App.testMode) {
+            component.set('workStatus', App.HostComponentStatus.starting);
             setTimeout(function(){
-              component.set('workStatus', App.Component.Status.started);
+              component.set('workStatus', App.HostComponentStatus.started);
             },10000);
           } else {
             App.router.get('clusterController').loadUpdatedStatusDelayed(500);
@@ -126,7 +124,7 @@ App.MainHostDetailsController = Em.Contr
       }
     });
   },
-  stopComponent: function(event){
+  stopComponent: function (event) {
     var self = this;
     App.ModalPopup.show({
       header: Em.I18n.t('hosts.host.start.popup.header'),
@@ -147,14 +145,12 @@ App.MainHostDetailsController = Em.Contr
 
           console.log('Send request for STOPPING successfully');
 
-
-
-          if(App.testMode){
-            component.set('workStatus', App.Component.Status.stopping);
+          if (App.testMode) {
+            component.set('workStatus', App.HostComponentStatus.stopping);
             setTimeout(function(){
-              component.set('workStatus', App.Component.Status.stopped);
+              component.set('workStatus', App.HostComponentStatus.stopped);
             },10000);
-          } else{
+          } else {
             App.router.get('clusterController').loadUpdatedStatus();
             App.router.get('backgroundOperationsController.eventsArray').push({
               "when" : function(controller){
@@ -324,7 +320,7 @@ App.MainHostDetailsController = Em.Contr
    * var components = this.get('content.components');
    * components.forEach(function (cInstance) { var cName =
    * cInstance.get('componentName'); if (slaveComponents.contains(cName)) { if
-   * (cInstance.get('workStatus') === App.Component.Status.stopped &&
+   * (cInstance.get('workStatus') === App.HostComponentStatus.stopped &&
    * !cInstance.get('decommissioned')) { workingComponents.push(cName); } } else {
    * masterComponents.push(cName); } }); // debugger; if
    * (workingComponents.length || masterComponents.length) {

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service.js Mon Feb  4 02:23:55 2013
@@ -26,9 +26,7 @@ App.MainServiceController = Em.ArrayCont
     }
     return App.Service.find();
   }.property('App.router.clusterController.isLoaded'),
-  isAdmin: function(){
-    return App.db.getUser().admin;
-  }.property('App.router.loginController.loginName'),
+
   hdfsService: function () {
     var hdfsSvcs = App.HDFSService.find();
     if (hdfsSvcs && hdfsSvcs.get('length') > 0) {

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/add_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/add_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/add_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/add_controller.js Mon Feb  4 02:23:55 2013
@@ -161,7 +161,7 @@ App.AddServiceController = App.WizardCon
   saveMasterComponentHosts: function (stepController) {
     var obj = stepController.get('selectedServicesMasters');
     var masterComponentHosts = [];
-    var installedComponents = App.Component.find();
+    var installedComponents = App.HostComponent.find();
 
     obj.forEach(function (_component) {
         masterComponentHosts.push({
@@ -187,7 +187,7 @@ App.AddServiceController = App.WizardCon
     var masterComponentHosts = App.db.getMasterComponentHosts();
     if(!masterComponentHosts){
       masterComponentHosts = [];
-      App.Component.find().filterProperty('isMaster', true).forEach(function(item){
+      App.HostComponent.find().filterProperty('isMaster', true).forEach(function(item){
         masterComponentHosts.push({
           component: item.get('componentName'),
           hostName: item.get('host.hostName'),

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/configs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/configs.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/configs.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/configs.js Mon Feb  4 02:23:55 2013
@@ -430,7 +430,7 @@ App.MainServiceInfoConfigsController = E
     var message;
     var value;
     var flag;
-    if (this.get('content.isStopped') === true) {
+    if ((this.get('content.serviceName') !== 'HDFS' && this.get('content.isStopped') === true) || (this.get('content.serviceName') === 'HDFS') && this.get('content.isStopped') === true && App.Service.find('MAPREDUCE').get('isStopped')) {
       var result = this.saveServiceConfigProperties();
       flag = result.flag;
       if (flag === true) {
@@ -443,8 +443,13 @@ App.MainServiceInfoConfigsController = E
       }
 
     } else {
-      header = 'Stop Service';
-      message = 'Stop the service and wait till it stops completely. Thereafter you can apply configuration changes';
+      if (this.get('content.serviceName') !== 'HDFS') {
+        header = 'Stop Service';
+        message = 'Stop the service and wait till it stops completely. Thereafter you can apply configuration changes';
+      } else {
+        header = 'Stop Services';
+        message = 'Stop HDFS and MapReduce. Wait till both of them stops completely. Thereafter you can apply configuration changes';
+      }
     }
     App.ModalPopup.show({
       header: header,
@@ -534,7 +539,11 @@ App.MainServiceInfoConfigsController = E
     */
     result.flag = result.flag && this.createConfigurations();
     if (result.flag === true) {
-      result.flag = this.applyCreatedConfToService('new');
+      if (this.get('content.serviceName') !== 'HDFS') {
+        result.flag = this.applyCreatedConfToService(this.get('content.serviceName'));
+      } else {
+        result.flag = this.applyCreatedConfToService(this.get('content.serviceName')) && this.applyCreatedConfToService('MAPREDUCE');
+      }
     } else {
       result.message = 'Faliure in applying service configuration';
     }
@@ -824,11 +833,11 @@ App.MainServiceInfoConfigsController = E
     return {"type": siteName, "tag": tagName, "properties": siteProperties};
   },
 
-  applyCreatedConfToService: function (configStatus) {
+  applyCreatedConfToService: function (serviceName) {
     var result;
     var clusterName = App.router.getClusterName();
-    var url = App.apiPrefix + '/clusters/' + clusterName + '/services/' + this.get('content.serviceName');
-    var data = this.getConfigForService(configStatus);
+    var url = App.apiPrefix + '/clusters/' + clusterName + '/services/' + serviceName;
+    var data = this.getConfigForService(serviceName);
     var realData = data;
     $.ajax({
       type: 'PUT',
@@ -858,22 +867,17 @@ App.MainServiceInfoConfigsController = E
     return result;
   },
 
-  getConfigForService: function (config) {
+  getConfigForService: function (serviceName) {
     var data = {config: {}};
     this.get('serviceConfigTags').forEach(function (_serviceTag) {
-      if (config === 'new') {
-        if (_serviceTag.siteName === 'core-site') {
-          if (this.get('content.serviceName') === 'HDFS') {
-            data.config[_serviceTag.siteName] = _serviceTag.newTagName;
-          } else {
-            data.config[_serviceTag.siteName] = _serviceTag.tagName;
-          }
-        } else {
+      if (_serviceTag.siteName === 'core-site') {
+        if (this.get('content.serviceName') === 'HDFS') {
           data.config[_serviceTag.siteName] = _serviceTag.newTagName;
+        } else {
+          data.config[_serviceTag.siteName] = _serviceTag.tagName;
         }
-      }
-      else if (config = 'previous') {
-        data.config[_serviceTag.siteName] = _serviceTag.tagName;
+      } else if (this.get('content.serviceName') === serviceName) {
+        data.config[_serviceTag.siteName] = _serviceTag.newTagName;
       }
     }, this);
     return data;
@@ -983,27 +987,27 @@ App.MainServiceInfoConfigsController = E
     switch (serviceName) {
       case 'HDFS':
         var sNameNodeHost = serviceConfigs.findProperty('name', 'snamenode_host');
-        sNameNodeHost.defaultValue = this.get('content.components').findProperty('componentName', 'SECONDARY_NAMENODE').get('host.hostName');
+        sNameNodeHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'SECONDARY_NAMENODE').get('host.hostName');
         globalConfigs.push(sNameNodeHost);
         break;
       case 'MAPREDUCE':
         var jobTrackerHost = serviceConfigs.findProperty('name', 'jobtracker_host');
-        jobTrackerHost.defaultValue = this.get('content.components').findProperty('componentName', 'JOBTRACKER').get('host.hostName');
+        jobTrackerHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'JOBTRACKER').get('host.hostName');
         globalConfigs.push(jobTrackerHost);
         break;
       case 'HIVE':
         var hiveMetastoreHost = serviceConfigs.findProperty('name', 'hivemetastore_host');
-        hiveMetastoreHost.defaultValue = this.get('content.components').findProperty('componentName', 'HIVE_SERVER').get('host.hostName');
+        hiveMetastoreHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'HIVE_SERVER').get('host.hostName');
         globalConfigs.push(hiveMetastoreHost);
         break;
       case 'OOZIE':
         var oozieServerHost = serviceConfigs.findProperty('name', 'oozieserver_host');
-        oozieServerHost.defaultValue = this.get('content.components').findProperty('componentName', 'OOZIE_SERVER').get('host.hostName');
+        oozieServerHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'OOZIE_SERVER').get('host.hostName');
         globalConfigs.push(oozieServerHost);
         break;
       case 'HBASE':
         var hbaseMasterHost = serviceConfigs.findProperty('name', 'hbasemaster_host');
-        hbaseMasterHost.defaultValue = this.get('content.components').findProperty('componentName', 'HBASE_MASTER').get('host.hostName');
+        hbaseMasterHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'HBASE_MASTER').get('host.hostName');
         globalConfigs.push(hbaseMasterHost);
         break;
     }

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/item.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/item.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/item.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/item.js Mon Feb  4 02:23:55 2013
@@ -20,9 +20,7 @@ var App = require('app');
 
 App.MainServiceItemController = Em.Controller.extend({
   name: 'mainServiceItemController',
-  isAdmin: function(){
-    return App.db.getUser().admin;
-  }.property('App.router.loginController.loginName'),
+
   /**
    * Send specific command to server
    * @param url
@@ -76,7 +74,6 @@ App.MainServiceItemController = Em.Contr
       primary: 'Yes',
       secondary: 'No',
       onPrimary: function () {
-        self.get('content.components').setEach('workStatus', App.Component.Status.starting);
         self.sendCommandToServer('/services/' + self.get('content.serviceName').toUpperCase(), "PUT", {
           ServiceInfo: {
             state: 'STARTED'
@@ -89,9 +86,11 @@ App.MainServiceItemController = Em.Contr
           console.log('Send request for STARTING successfully');
 
           if (App.testMode) {
-            self.content.set('workStatus', App.Service.Health.starting);
+            self.set('content.workStatus', App.Service.Health.starting);
+            self.get('content.hostComponents').setEach('workStatus', App.HostComponentStatus.starting);
             setTimeout(function () {
-              self.content.set('workStatus', App.Service.Health.live);
+              self.set('content.workStatus', App.Service.Health.live);
+              self.get('content.hostComponents').setEach('workStatus', App.HostComponentStatus.started);
             }, 10000);
           } else {
             App.router.get('clusterController').loadUpdatedStatusDelayed(500);
@@ -134,7 +133,6 @@ App.MainServiceItemController = Em.Contr
       primary: 'Yes',
       secondary: 'No',
       onPrimary: function() {
-        self.get('content.components').setEach('workStatus', App.Component.Status.stopping);
         self.sendCommandToServer('/services/' + self.get('content.serviceName').toUpperCase(), "PUT",{
           ServiceInfo:{
             state: 'INSTALLED'
@@ -145,9 +143,11 @@ App.MainServiceItemController = Em.Contr
           }
           console.log('Send request for STOPPING successfully');
           if (App.testMode) {
-            self.content.set('workStatus', App.Service.Health.stopping);
+            self.set('content.workStatus', App.Service.Health.stopping);
+            self.get('content.hostComponents').setEach('workStatus', App.HostComponentStatus.stopping);
             setTimeout(function () {
-              self.content.set('workStatus', App.Service.Health.dead);
+              self.set('content.workStatus', App.Service.Health.dead);
+              self.get('content.hostComponents').setEach('workStatus', App.HostComponentStatus.stopped);
             }, 10000);
           } else {
             App.router.get('clusterController').loadUpdatedStatusDelayed(500);
@@ -237,6 +237,9 @@ App.MainServiceItemController = Em.Contr
     });
   },
   doAction: function (event) {
+    if ($(event.target).hasClass('disabled') || $(event.target.parentElement).hasClass('disabled')) {
+      return;
+    }
     var methodName = event.context;
     switch (methodName) {
       case 'runRebalancer':

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard.js Mon Feb  4 02:23:55 2013
@@ -21,9 +21,10 @@ var App = require('app');
 
 App.WizardController = Em.Controller.extend({
 
-  isStepDisabled: [],
+  isStepDisabled: null,
 
   init: function () {
+    this.set('isStepDisabled', []);
     this.clusters = App.Cluster.find();
     this.isStepDisabled.pushObject(Ember.Object.create({
       step: 1,
@@ -41,7 +42,7 @@ App.WizardController = Em.Controller.ext
   },
 
   setStepsEnable: function () {
-    for (var i = 2; i <= this.totalSteps; i++) {
+    for (var i = 1; i <= this.totalSteps; i++) {
       var step = this.get('isStepDisabled').findProperty('step', i);
       if (i <= this.get('currentStep')) {
         step.set('value', false);
@@ -133,6 +134,16 @@ App.WizardController = Em.Controller.ext
     if (this.get('isStepDisabled').findProperty('step', step).get('value') !== false) {
       return;
     }
+    // if going back from Step 9 in Install Wizard, delete the checkpoint so that the user is not redirected
+    // to Step 9
+    if (this.get('content.controllerName') == 'installerController' && this.get('currentStep') === '9' && step < 9) {
+      App.clusterStatus.setClusterStatus({
+        clusterName: this.get('clusterName'),
+        clusterState: 'CLUSTER_NOT_CREATED_1',
+        wizardControllerName: 'installerController',
+        localdb: App.db.data
+      });
+    }
     if ((this.get('currentStep') - step) > 1) {
       App.ModalPopup.show({
         header: Em.I18n.t('installer.navigation.warning.header'),

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step10_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step10_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step10_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step10_controller.js Mon Feb  4 02:23:55 2013
@@ -19,11 +19,14 @@
 var App = require('app');
 
 App.WizardStep10Controller = Em.Controller.extend({
-  name: 'wizardStep10Controller',
   clusterInfo: [],
 
+  /**
+   * check if were added regionservers then NAGIOS services should be restarted
+   * to update number of regionservers in NAGIOS
+   */
   isNagiosRestartRequired: function() {
-    return App.db.getSelectedServiceNames().contains('NAGIOS') && this.get('content.controllerName') !== 'installerController';
+    return this.get('content.controllerName') !== 'installerController' && App.Service.find('NAGIOS').get('isLoaded');
   }.property(),
 
   clearStep: function () {

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step1_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step1_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step1_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step1_controller.js Mon Feb  4 02:23:55 2013
@@ -26,7 +26,10 @@ App.WizardStep1Controller = Em.Controlle
   loadStep: function () {
     this.set('hasSubmitted',false);
   },
-
+  /**
+   * validate cluster name
+   * set clusterNameError if validation fails
+   */
   invalidClusterName : function(){
     if(!this.get('hasSubmitted')){
       this.set('clusterNameError', '');

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step2_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step2_controller.js?rev=1442010&r1=1442009&r2=1442010&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step2_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step2_controller.js Mon Feb  4 02:23:55 2013
@@ -48,7 +48,9 @@ App.WizardStep2Controller = Em.Controlle
     // return validator.isHostname(hostname) && (!(/^\-/.test(hostname) || /\-$/.test(hostname)));
     return true;
   },
-
+  /**
+   * set not installed hosts to the hostNameArr
+   */
   updateHostNameArr: function(){
     this.hostNameArr = this.get('hostNames').trim().split(new RegExp("\\s+", "g"));
     this.patternExpression();
@@ -61,7 +63,10 @@ App.WizardStep2Controller = Em.Controlle
     }
     this.set('hostNameArr', tempArr);
   },
-
+  /**
+   * validate host names
+   * @return {Boolean}
+   */
   isAllHostNamesValid: function () {
     var self = this;
     var result = true;
@@ -77,7 +82,9 @@ App.WizardStep2Controller = Em.Controlle
   },
 
   hostsError: null,
-
+  /**
+   * set hostsError if host names don't pass validation
+   */
   checkHostError: function () {
     if (this.get('hostNames').trim() === '') {
       this.set('hostsError', Em.I18n.t('installer.step2.hostName.error.required'));
@@ -169,7 +176,10 @@ App.WizardStep2Controller = Em.Controlle
 
     this.proceedNext();
   },
-
+  /**
+   * check is there a pattern expression in host name textarea
+   * push hosts that match pattern in hostNamesArr
+   */
   patternExpression: function(){
     this.isPattern = false;
     var self = this;
@@ -178,7 +188,7 @@ App.WizardStep2Controller = Em.Controlle
       var start, end, extra = {0:""};
       if(/\[\d*\-\d*\]/.test(a)){
         start=a.match(/\[\d*/);
-        end=a.match(/\-\d*/);
+        end=a.match(/\-\d*]/);
 
         start=start[0].substr(1);
         end=end[0].substr(1);
@@ -203,7 +213,11 @@ App.WizardStep2Controller = Em.Controlle
     });
     this.hostNameArr =  hostNames;
   },
-
+  /**
+   * launch hosts to bootstrap
+   * and save already registered hosts
+   * @return {Boolean}
+   */
   proceedNext: function(){
     if (this.get('manualInstall') === true) {
       this.manualInstallPopup();
@@ -226,7 +240,10 @@ App.WizardStep2Controller = Em.Controlle
       this.saveHosts();
     }
   },
-
+  /**
+   * show popup with hosts generated by pattern
+   * @param hostNames
+   */
   hostNamePatternPopup: function (hostNames) {
     var self = this;
     App.ModalPopup.show({
@@ -241,7 +258,10 @@ App.WizardStep2Controller = Em.Controlle
       })
     });
   },
-
+  /**
+   * show notify that installation is manual
+   * save hosts
+   */
   manualInstallPopup: function () {
     var self = this;
     App.ModalPopup.show({