You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2012/10/13 23:03:20 UTC

svn commit: r1397948 [1/3] - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/ ambari-web/app/ ambari-web/app/assets/data/ ambari-web/app/assets/data/services/ ambari-web/app/assets/data/services/summary/ ambari-web/app/assets/img/ ambari-web/ap...

Author: yusaku
Date: Sat Oct 13 21:03:18 2012
New Revision: 1397948

URL: http://svn.apache.org/viewvc?rev=1397948&view=rev
Log:
AMBARI-856. Add cluster heatmap. (yusaku)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hbase.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hdfs.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/mapreduce.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_critical_block.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_dead_block.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_live_block.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-minus.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-plus.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-toggler.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-critical.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-dead.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-live.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack_node_hover.png   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/horizon_chart.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/rack.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/rack.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host_detail.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_rack.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon/chart.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/metric.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap/heatmap_host.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap/heatmap_host_detail.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap/heatmap_rack.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/horizon/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/horizon.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/horizon/chart.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/menu.js
    incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/d3.v2.js
Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/form.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/hosts.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css
    incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
    incubator/ambari/branches/AMBARI-666/ambari-web/config.coffee
    incubator/ambari/branches/AMBARI-666/ambari-web/package.json

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Sat Oct 13 21:03:18 2012
@@ -12,6 +12,8 @@ AMBARI-666 branch (unreleased changes)
 
   NEW FEATURES
 
+  AMBARI-856. Add cluster heatmap. (yusaku)
+
   AMBARI-855. Create the skeleton for a custom data adapter in Ambari Web.
   (yusaku)
 

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hbase.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hbase.json?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hbase.json (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hbase.json Sat Oct 13 21:03:18 2012
@@ -0,0 +1,20 @@
+{
+  "hbase": {
+    "service_type": "HBASE",
+    "installed": true,
+    "hbasemaster_addr": "ec2-23-21-1-25.compute-1.amazonaws.com:60010",
+    "total_regionservers": "1",
+    "memory_heap_used": 15691080,
+    "memory_heap_max": 498991104,
+    "version": "0.92.1.15, rUnknown",
+    "start_time": 1348935496,
+    "cluster_id": "83ad5508-f036-43e2-acc5-25408d34efe8",
+    "active_time": 1348935496,
+    "coprocessors": [],
+    "average_load": 3,
+    "regions_in_transition_count": 0,
+    "live_regionservers": 1,
+    "zookeeper_quorum": ["ip-10-108-29-23.ec2.internal:2181"],
+    "dead_regionservers": 0
+  }
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hdfs.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hdfs.json?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hdfs.json (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/hdfs.json Sat Oct 13 21:03:18 2012
@@ -0,0 +1,31 @@
+{
+  "hdfs": {
+    "service_type": "HDFS",
+    "installed": true,
+    "namenode_addr": "ec2-23-21-1-25.compute-1.amazonaws.com:50070",
+    "secondary_namenode_addr": "ec2-23-21-1-25.compute-1.amazonaws.com:50090",
+    "total_nodes": "1",
+    "memory_heap_used": 151642616,
+    "memory_heap_max": 453050368,
+    "dfs_dirfiles_count": 252,
+    "dfs_blocks_total": 146,
+    "dfs_blocks_underreplicated": 145,
+    "dfs_blocks_missing": 0,
+    "dfs_blocks_corrupt": 0,
+    "dfs_state": "Operational",
+    "start_time": 1348935028,
+    "live_nodes": 1,
+    "dead_nodes": 0,
+    "decommissioning_nodes": 0,
+    "version": "1.0.3.15, r",
+    "safemode": false,
+    "pending_upgrades": false,
+    "dfs_configured_capacity": 885570207744,
+    "dfs_percent_used": 4.91,
+    "dfs_percent_remaining": 95.09,
+    "dfs_total_bytes": 885570207744,
+    "dfs_used_bytes": 104898560,
+    "nondfs_used_bytes": 43365113856,
+    "dfs_free_bytes": 842100195328
+  }
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/mapreduce.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/mapreduce.json?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/mapreduce.json (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/summary/mapreduce.json Sat Oct 13 21:03:18 2012
@@ -0,0 +1,35 @@
+{
+  "mapreduce": {
+    "service_type": "MAPREDUCE",
+    "installed": true,
+    "jobtracker_addr": "ec2-23-21-1-25.compute-1.amazonaws.com:50030",
+    "trackers_total": "1",
+    "jobhistory_addr": "ec2-23-21-1-25.compute-1.amazonaws.com:51111",
+    "memory_heap_used": 94499048,
+    "memory_heap_max": 482344960,
+    "trackers_live": 1,
+    "trackers_graylisted": 0,
+    "trackers_blacklisted": 0,
+    "version": "1.0.3.15, r",
+    "queue_info": {
+      "type": ""
+    },
+    "waiting_jobs": 0,
+    "trackers_excluded": 0,
+    "map_task_capacity": 2,
+    "reduce_task_capacity": 2,
+    "job_total_submissions": 4,
+    "job_total_completions": 4,
+    "running_jobs": 0,
+    "running_map_tasks": 0,
+    "running_reduce_tasks": 0,
+    "occupied_map_slots": 0,
+    "occupied_reduce_slots": 0,
+    "reserved_map_slots": 0,
+    "reserved_reduce_slots": 0,
+    "waiting_maps": 0,
+    "waiting_reduces": 0,
+    "start_time": 1348935243,
+    "average_node_capacity": 4
+  }
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_critical_block.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_critical_block.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_critical_block.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_dead_block.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_dead_block.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_dead_block.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_live_block.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_live_block.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/heatmap_node_live_block.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-minus.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-minus.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-minus.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-plus.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-plus.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-plus.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-toggler.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-toggler.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-state-toggler.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-critical.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-critical.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-critical.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-dead.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-dead.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-dead.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-live.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-live.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack-status-live.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack_node_hover.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack_node_hover.png?rev=1397948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/rack_node_hover.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt Sat Oct 13 21:03:18 2012
@@ -22,4 +22,7 @@ This product includes Sinon.JS (http://s
 Copyright (c) 2010-2012, Christian Johansen.
 
 This product includes ember-i18n (http://github.com/zendesk/ember-i18n - MIT license)
-Copyright (C) 2011 by James A. Rosen; Zendesk, Inc.
\ No newline at end of file
+Copyright (c) 2011 by James A. Rosen; Zendesk, Inc.
+
+This product includes D3.js (http://d3js.org - BSD license)
+Copyright (c) 2012, Michael Bostock.
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js Sat Oct 13 21:03:18 2012
@@ -50,3 +50,8 @@ require('controllers/main/alert');
 require('controllers/main/host');
 require('controllers/main/host/details');
 require('controllers/main/dashboard');
+require('controllers/main/charts');
+require('controllers/main/charts/heatmap');
+require('controllers/main/charts/horizon_chart');
+require('controllers/main/charts/horizon_chart');
+require('controllers/main/rack');

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js Sat Oct 13 21:03:18 2012
@@ -31,6 +31,7 @@ App.LoginController = Em.Object.extend({
     this.set('errorMessage', '');
 
     var user = this.validateCredentials();
+   
     if (user) {
       App.get('router').login(this.get('loginName'), user);
     } else {
@@ -46,16 +47,18 @@ App.LoginController = Em.Object.extend({
   validateCredentials: function () {
     //TODO: REST api that validates the login
     var thisController = this;
-
-    var user = App.store.filter(App.User, function (data) {
-      return data.get('user_name') == thisController.get('loginName') && data.get('password') == thisController.get('password');
-    });
-
-    var clientId = user.content[0];
-
-    if (user.content[0] !== undefined) {
-      return App.store.findByClientId(App.User, clientId);
-    }
+    var auth = App.get('router').authenticated();
+    console.log(auth);
+//    if (auth) {
+      var user = App.store.filter(App.User, function (data) {
+        return data.get('user_name') == thisController.get('loginName') && data.get('password') == thisController.get('password');
+      });
+
+      var clientId = user.content[0];
+      if (user.content[0] !== undefined) {
+        return App.store.findByClientId(App.User, clientId);
+      }
+//    }
   }
 
 });
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts.js?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts.js Sat Oct 13 21:03:18 2012
@@ -0,0 +1,23 @@
+/**
+ * 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.MainChartsController = Em.ArrayController.extend({
+  name:'mainChartsController'
+})
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js Sat Oct 13 21:03:18 2012
@@ -0,0 +1,46 @@
+/**
+ * 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.MainChartsHeatmapController = Em.Controller.extend({
+  name:'mainChartsHeatmapController',
+  cluster: App.Cluster.find(1),
+
+  /**
+   * return class name for build rack visual schema
+   * @this App.MainChartsHeatmapController
+   */
+  visualSchema: function() {
+    var maxHostsPerRack = this.cluster.get('maxHostsPerRack');
+    switch(maxHostsPerRack) {
+      case 10:
+        return 'rack-5-2'
+      case 20:
+        return 'rack-5-4'
+      case 30:
+        return 'rack-5-6'
+      case 40:
+        return 'rack-5-8'
+      case 50:
+        return 'rack-5-10'
+      default:
+        return 'rack-5-10'
+    }
+  }.property('cluster')
+})
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/horizon_chart.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/horizon_chart.js?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/horizon_chart.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/horizon_chart.js Sat Oct 13 21:03:18 2012
@@ -0,0 +1,23 @@
+/**
+ * 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.MainChartsHorizonChartController = Em.Controller.extend({
+  name:'mainChartsHorizonChartController'
+})
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js Sat Oct 13 21:03:18 2012
@@ -21,12 +21,8 @@ var App = require('app');
 App.MainHostDetailsController = Em.Controller.extend({
   name: 'mainHostDetailsController',
   content: null,
-
   isFromHosts: false,
-
-  isStarting: function(){
-    return this.get('content.workStatus');
-  }.property('content.workStatus'),
+  isStarting: true,
   isStopping: function(){
     return !this.get('isStarting');
   }.property('isStarting'),
@@ -47,7 +43,7 @@ App.MainHostDetailsController = Em.Contr
         component.set('workStatus', true);
         var stopped = self.get('content.components').filterProperty('workStatus', false);
         if (stopped.length == 0)
-          self.set('content.workStatus', true);
+          self.set('isStarting', true);
         this.hide();
       },
       onSecondary: function() {
@@ -67,7 +63,7 @@ App.MainHostDetailsController = Em.Contr
         component.set('workStatus', false);
         var started = self.get('content.components').filterProperty('workStatus', true);
         if (started.length == 0)
-          self.set('content.workStatus', false);
+          self.set('isStarting', false);
         this.hide();
       },
       onSecondary: function() {
@@ -86,7 +82,7 @@ App.MainHostDetailsController = Em.Contr
       secondary: 'No',
       onPrimary: function() {
         self.get('content.components').setEach('workStatus', true);
-        self.set('content.workStatus', !self.get('content.workStatus'));
+        self.set('isStarting', !self.get('isStarting'));
         this.hide();
       },
       onSecondary: function() {
@@ -103,7 +99,7 @@ App.MainHostDetailsController = Em.Contr
       secondary: 'No',
       onPrimary: function() {
         self.get('content.components').setEach('workStatus', false);
-        self.set('content.workStatus', !self.get('content.workStatus'));
+        self.set('isStarting', !self.get('isStarting'));
         this.hide();
       },
       onSecondary: function() {

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/rack.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/rack.js?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/rack.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/rack.js Sat Oct 13 21:03:18 2012
@@ -0,0 +1,23 @@
+/**
+ * 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.MainRackController = Em.ArrayController.extend({
+  name:'mainRackController'
+})
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js Sat Oct 13 21:03:18 2012
@@ -182,6 +182,17 @@ Em.I18n.translations = {
   'services.service.stop.popup.header': 'Confirmation',
   'services.service.start.popup.body': 'Are you sure?',
   'services.service.stop.popup.body': 'Are you sure?',
+  'services.service.summary.version': 'Version',
+  'services.service.summary.nameNode': 'NameNode',
+  'services.service.summary.nameNodeUptime': 'NameNode Uptime',
+  'services.service.summary.nameNodeHeap': 'NameNode Heap',
+  'services.service.summary.pendingUpgradeStatus': 'HDFS Pending Upgrade Status',
+  'services.service.summary.safeModeStatus': 'HDFS Safe Mode Status',
+  'services.service.summary.dataNodes': 'DataNodes (live/dead/decom)',
+  'services.service.summary.diskCapacity': 'HDFS Disk Capacity',
+  'services.service.summary.blocksTotal': 'Blocks (total)',
+  'services.service.summary.blockErrors': 'Block Errors (corr./miss./underrep.)',
+  'services.service.summary.totalFiles': 'Total Files + Directory Count',
 
   'hosts.host.start.popup.header': 'Confirmation',
   'hosts.host.stop.popup.header': 'Confirmation',
@@ -192,5 +203,18 @@ Em.I18n.translations = {
   'hosts.decommission.popup.body': 'Are you sure?',
   'hosts.decommission.popup.header': 'Confirmation',
   'hosts.delete.popup.body': 'Are you sure?',
-  'hosts.delete.popup.header': 'Confirmation'
+  'hosts.delete.popup.header': 'Confirmation',
+
+  'charts.horizon.chart.showText': 'show',
+  'charts.horizon.chart.hideText': 'hide',
+  'charts.horizon.chart.attributes.cpu': 'CPU',
+  'charts.horizon.chart.attributes.memory': 'Memory',
+  'charts.horizon.chart.attributes.network': 'Network',
+  'charts.horizon.chart.attributes.io': 'I/O',
+
+  'metric.default': 'default',
+  'metric.cpu': 'cpu',
+  'metric.memory': 'disk used',
+  'metric.network': 'network',
+  'metric.io': 'io'
 };
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models.js Sat Oct 13 21:03:18 2012
@@ -30,3 +30,5 @@ require('models/service_metrics');
 require('models/alert');
 require('models/user');
 require('models/pagination');
+require('models/host');
+require('models/rack');
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js Sat Oct 13 21:03:18 2012
@@ -50,109 +50,12 @@ DS.Model.reopen({
 });
 */
 
-App.Host = DS.Model.extend({
-  hostName: DS.attr('string'),
-  cluster: DS.belongsTo('App.Cluster'),
-  components: DS.hasMany('App.Component'),
-  cpu: DS.attr('string'),
-  memory: DS.attr('string'),
-  diskUsage: DS.attr('string'),
-  loadAvg: DS.attr('string'),
-  os: DS.attr('string'),
-  ip: DS.attr('string'),
-  healthStatus: DS.attr('string'),
-  workStatus: DS.attr('boolean')
-});
-
-App.Host.FIXTURES = [
-  {
-    id: 1,
-    host_name: 'z_host1',
-    cluster_id: 1,
-    components:[1, 2, 4],
-    cpu: '2x2.5GHz',
-    memory: '8GB',
-    disk_usage: '40',
-    load_avg: '0.2, 1.2, 2.4',
-    ip: '123.123.123.123',
-    health_status: 'LIVE',
-    work_status: true
-  },
-  {
-    id: 2,
-    host_name: 'host2',
-    cluster_id: 1,
-    components:[4, 5],
-    cpu: '2x2.5GHz',
-    memory: '8GB',
-    disk_usage: '20',
-    load_avg: '0.2, 1.2, 2.4',
-    ip: '255.255.255.255',
-    health_status: 'DEAD',
-    work_status: true
-  },
-  {
-    id: 3,
-    host_name: 'n_host3',
-    cluster_id: 2,
-    components:[4, 5, 7],
-    health_status: 'LIVE',
-    work_status: false
-  },
-  {
-    id: 4,
-    host_name: 'b_host4',
-    cluster_id: 2,
-    components:[1, 2, 4, 5],
-    health_status: 'DEAD',
-    work_status: false
-  },
-  {
-    id: 5,
-    host_name: 'host5',
-    cluster_id: 1,
-    components:[3, 4, 5],
-    cpu: '2x2.5GHz',
-    memory: '8GB',
-    disk_usage: '20',
-    load_avg: '0.2, 1.2, 2.4',
-    ip: '255.255.255.255',
-    health_status: 'DEAD',
-    work_status: true
-  },
-  {
-    id: 6,
-    host_name: 'a_host6',
-    cluster_id: 1,
-    components:[4, 5],
-    cpu: '2x2.5GHz',
-    memory: '8GB',
-    disk_usage: '20',
-    load_avg: '0.2, 1.2, 2.4',
-    ip: '255.255.255.255',
-    health_status: 'LIVE',
-    work_status: false
-
-  },
-  {
-    id: 7,
-    host_name: 'host7',
-    cluster_id: 1,
-    components:[3, 4, 7],
-    cpu: '2x2.5GHz',
-    memory: '8GB',
-    disk_usage: '20',
-    load_avg: '0.2, 1.2, 2.4',
-    ip: '255.255.255.255',
-    health_status: 'LIVE',
-    work_status: true
-  }
-];
-
 App.Cluster = DS.Model.extend({
-    clusterName: DS.attr('string'),
-    stackName: DS.attr('string'),
-    hosts: DS.hasMany('App.Host')
+  clusterName: DS.attr('string'),
+  stackName: DS.attr('string'),
+  hosts: DS.hasMany('App.Host'),
+  racks: DS.hasMany('App.Rack'),
+  maxHostsPerRack: DS.attr('number')
 });
 
 App.Cluster.FIXTURES = [
@@ -160,14 +63,14 @@ App.Cluster.FIXTURES = [
     id: 1,
     cluster_name: 'cluster1',
     stack_name: 'HDP',
-    hosts: [1, 2]
+    hosts: [1, 2, 3, 4],
+    racks: [1, 2, 3, 4, 5, 6],
+    max_hosts_per_rack: 10
   },
-
-{
+  {
     id: 2,
     cluster_name: 'cluster2',
     stack_name: 'BigTop',
-    hosts: [3]
+    hosts: [5, 6, 7]
   }
-];
-
+];
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/form.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/form.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/form.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/form.js Sat Oct 13 21:03:18 2012
@@ -78,7 +78,7 @@ App.Form = Em.View.extend({
     var object = this.get('object');
     if (object instanceof Em.Object) {
       $.each(this.fields, function () {
-        this.set('value', this.get('displayType') == 'password' ? '' : object.get(this.get('name')));
+        this.set('value', (this.get('displayType') == 'password') ? '' : object.get(this.get('name')));
       });
     } else {
       this.clearValues();
@@ -93,7 +93,7 @@ App.Form = Em.View.extend({
   getValues: function () {
     var values = {};
     $.each(this.fields, function () {
-      if (!(this.get('displayType') == 'password') && validator.empty(this.get('value'))) // if this is not empty password field
+      if (!(this.get('displayType') == 'password' && validator.empty(this.get('value')))) // if this is not empty password field
         values[this.get('name')] = this.get('value');
     });
     return values;

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/host.js Sat Oct 13 21:03:18 2012
@@ -122,7 +122,6 @@ App.Host.FIXTURES = [
     memory_usage: 26,
     network_usage: 36,
     io_usage: 39
-
   },
   {
     id: 7,
@@ -139,5 +138,53 @@ App.Host.FIXTURES = [
     memory_usage: 16,
     network_usage: 16,
     io_usage: 29
+  },
+  {
+    id: 8,
+    host_name: 'host8',
+    cluster_id: 1,
+    components:[3, 4, 7],
+    cpu: '2x2.5GHz',
+    memory: '8GB',
+    disk_usage: '20',
+    load_avg: '0.2, 1.2, 2.4',
+    ip: '255.255.255.255',
+    health_status: 'LIVE',
+    cpu_usage: 53,
+    memory_usage: 11,
+    network_usage: 14,
+    io_usage: 27
+  },
+  {
+    id: 9,
+    host_name: 'host9',
+    cluster_id: 1,
+    components:[3, 4, 7],
+    cpu: '2x2.5GHz',
+    memory: '8GB',
+    disk_usage: '20',
+    load_avg: '0.2, 1.2, 2.4',
+    ip: '255.255.255.255',
+    health_status: 'LIVE',
+    cpu_usage: 53,
+    memory_usage: 26,
+    network_usage: 56,
+    io_usage: 19
+  },
+  {
+    id: 10,
+    host_name: 'host10',
+    cluster_id: 1,
+    components:[3, 4, 7],
+    cpu: '2x2.5GHz',
+    memory: '8GB',
+    disk_usage: '20',
+    load_avg: '0.2, 1.2, 2.4',
+    ip: '255.255.255.255',
+    health_status: 'LIVE',
+    cpu_usage: 53,
+    memory_usage: 16,
+    network_usage: 16,
+    io_usage: 29
   }
 ];
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/hosts.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/hosts.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/hosts.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/hosts.js Sat Oct 13 21:03:18 2012
@@ -26,6 +26,7 @@ App.HostInfo = Ember.Object.extend({
   memory: '2',
   message: 'Information',
   barColor: 'progress-info',
-  isChecked: true
+  isChecked: true,
+  horizonData:
+    [{"cpu":"61","date":"2012-09-05T11:03:00+03:00","id":"0","memory":"44","name":"Node-0.0","network":"36","status":"LIVE","rackName":"Rack-0","io":"23"},{"cpu":"1","date":"2012-09-05T11:06:00+03:00","id":"0","memory":"46","name":"Node-0.0","network":"54","status":"LIVE","rackName":"Rack-0","io":"96"},{"cpu":"36","date":"2012-09-05T11:09:00+03:00","id":"0","memory":"65","name":"Node-0.0","network":"42","status":"LIVE","rackName":"Rack-0","io":"49"},{"cpu":"50","date":"2012-09-05T11:12:00+03:00","id":"0","memory":"46","name":"Node-0.0","network":"76","status":"LIVE","rackName":"Rack-0","io":"67"},{"cpu":"79","date":"2012-09-05T11:15:00+03:00","id":"0","memory":"91","name":"Node-0.0","network":"14","status":"LIVE","rackName":"Rack-0","io":"47"},{"cpu":"65","date":"2012-09-05T11:18:00+03:00","id":"0","memory":"44","name":"Node-0.0","network":"90","status":"LIVE","rackName":"Rack-0","io":"74"},{"cpu":"42","date":"2012-09-05T11:21:00+03:00","id":"0","memory":"96","name":"Node-0.
 0","network":"29","status":"LIVE","rackName":"Rack-0","io":"6"},{"cpu":"76","date":"2012-09-05T11:24:00+03:00","id":"0","memory":"28","name":"Node-0.0","network":"52","status":"LIVE","rackName":"Rack-0","io":"1"},{"cpu":"24","date":"2012-09-05T11:27:00+03:00","id":"0","memory":"66","name":"Node-0.0","network":"75","status":"LIVE","rackName":"Rack-0","io":"31"},{"cpu":"71","date":"2012-09-05T11:30:00+03:00","id":"0","memory":"8","name":"Node-0.0","network":"1","status":"LIVE","rackName":"Rack-0","io":"36"},{"cpu":"3","date":"2012-09-05T11:33:00+03:00","id":"0","memory":"57","name":"Node-0.0","network":"12","status":"LIVE","rackName":"Rack-0","io":"71"},{"cpu":"85","date":"2012-09-05T11:36:00+03:00","id":"0","memory":"44","name":"Node-0.0","network":"76","status":"LIVE","rackName":"Rack-0","io":"54"},{"cpu":"49","date":"2012-09-05T11:39:00+03:00","id":"0","memory":"8","name":"Node-0.0","network":"28","status":"LIVE","rackName":"Rack-0","io":"60"},{"cpu":"46","date":"2012-09-05
 T11:42:00+03:00","id":"0","memory":"75","name":"Node-0.0","network":"7","status":"LIVE","rackName":"Rack-0","io":"86"},{"cpu":"61","date":"2012-09-05T11:45:00+03:00","id":"0","memory":"11","name":"Node-0.0","network":"65","status":"LIVE","rackName":"Rack-0","io":"65"},{"cpu":"5","date":"2012-09-05T11:48:00+03:00","id":"0","memory":"24","name":"Node-0.0","network":"14","status":"LIVE","rackName":"Rack-0","io":"62"},{"cpu":"30","date":"2012-09-05T11:51:00+03:00","id":"0","memory":"40","name":"Node-0.0","network":"52","status":"LIVE","rackName":"Rack-0","io":"98"},{"cpu":"5","date":"2012-09-05T11:54:00+03:00","id":"0","memory":"38","name":"Node-0.0","network":"17","status":"LIVE","rackName":"Rack-0","io":"27"},{"cpu":"22","date":"2012-09-05T11:57:00+03:00","id":"0","memory":"80","name":"Node-0.0","network":"62","status":"LIVE","rackName":"Rack-0","io":"38"}]
 });
-

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/rack.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/rack.js?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/rack.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/rack.js Sat Oct 13 21:03:18 2012
@@ -0,0 +1,86 @@
+/**
+ * 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.Rack = DS.Model.extend({
+  name: DS.attr('string'),
+  hosts: DS.hasMany('App.Host'),
+  status: DS.attr('string'),
+  liveHostsCount: DS.attr('number'),
+  criticalHostsCount: DS.attr('number'),
+  deadHostsCount: DS.attr('number')
+});
+
+App.Rack.FIXTURES = [
+  {
+    id: 1,
+    name: 'Rack-0',
+    hosts: [1, 2, 3, 4, 8, 9, 10],
+    status: 'LIVE',
+    live_hosts_count: 5,
+    critical_hosts_count: 0,
+    dead_hosts_count: 2
+  },
+  {
+    id: 2,
+    name: 'Rack-1',
+    hosts: [5, 6, 7],
+    status: 'LIVE',
+    live_hosts_count: 2,
+    critical_hosts_count: 0,
+    dead_hosts_count: 1
+  },
+  {
+    id: 3,
+    name: 'Rack-2',
+    hosts: [1, 2, 3, 4, 8, 9, 10],
+    status: 'LIVE',
+    live_hosts_count: 5,
+    critical_hosts_count: 0,
+    dead_hosts_count: 2
+  },
+  {
+    id: 4,
+    name: 'Rack-3',
+    hosts: [5, 6, 7],
+    status: 'LIVE',
+    live_hosts_count: 2,
+    critical_hosts_count: 0,
+    dead_hosts_count: 1
+  },
+  {
+    id: 5,
+    name: 'Rack-4',
+    hosts: [1, 2, 3, 4, 8, 9, 10],
+    status: 'LIVE',
+    live_hosts_count: 5,
+    critical_hosts_count: 0,
+    dead_hosts_count: 2
+  },
+  {
+    id: 6,
+    name: 'Rack-5',
+    hosts: [5, 6, 7],
+    status: 'LIVE',
+    live_hosts_count: 2,
+    critical_hosts_count: 0,
+    dead_hosts_count: 1
+  }
+];
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js Sat Oct 13 21:03:18 2012
@@ -33,6 +33,10 @@ App.User = DS.Model.extend({
 
 App.UserForm = App.Form.extend({
   className:App.User,
+  object: function(){
+    return App.router.get('mainAdminUserEditController.content');
+  }.property('App.router.mainAdminUserEditController.content'),
+
   fieldsOptions:[
     { name:"userName", displayName:"Username" },
     { name:"password", displayName:"Password", displayType:"password", isRequired: function(){ return this.get('form.isObjectNew'); }.property('form.isObjectNew') },
@@ -43,14 +47,13 @@ App.UserForm = App.Form.extend({
   disableUsername:function () {
     var field = this.getField("userName");
     if (field) field.set("disabled", this.get('isObjectNew') ? false : "disabled");
-
   }.observes('isObjectNew'),
   disableAdminCheckbox:function () {
     if (!this.get('isObjectNew')) {
       var object = this.get('object');
       var field = this.getField("admin");
       if (field) {
-        field.set("disabled", object.get('userName') == App.get('router').getLoginName() ? "disabled" : false);
+        field.set("disabled", (object.get('userName') == App.get('router').getLoginName()) ? "disabled" : false);
       }
     }
   }.observes('isObjectNew'),
@@ -107,5 +110,11 @@ App.User.FIXTURES = [
     id:4,
     user_name:'danip',
     admin:0
+  },
+  {
+    id:5,
+    user_name:'test',
+    password:'test',
+    admin:0
   }
 ];
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js Sat Oct 13 21:03:18 2012
@@ -93,6 +93,7 @@ App.Router = Em.Router.extend({
 
   getAuthenticated: function () {
     // TODO: this needs to be hooked up with server authentication
+//    this.authenticated();
     var auth = App.db.getAuthenticated();
     var authResp = (auth && auth === true);
     this.set('loggedIn', authResp);
@@ -139,6 +140,54 @@ App.Router = Em.Router.extend({
 
   },
 
+  resetAuth: function (authenticated) {
+    if (!authenticated){
+      App.db.cleanUp();
+      this.set('loggedIn', false);
+      this.set('loginController.loginName', '');
+      this.set('loginController.password', '');
+      this.transitionTo('login');
+    }
+    return authenticated;
+  },
+
+  authenticated: function () {
+    var authenticated = false;
+    var controller = this.get('loginController');
+    var hash = window.btoa(controller.get('loginName') + ":" + controller.get('password'));
+    $.ajax({
+      url : '/api/check',
+      dataType : 'json',
+      type: 'GET',
+      async: false,
+      beforeSend: function(xhr) {
+        xhr.setRequestHeader("Authorization", "Basic " + hash);
+      },
+      statusCode:{
+        200:function(){
+          console.log('Authorization status: 200');
+          authenticated = true;
+        },
+        401:function(){
+          console.log('Authorization status: 401');
+        },
+        403:function(){
+          console.log('Authorization status: 403');
+        }
+      },
+      success: function(data){
+        console.log('Success: ');
+      },
+      error:function (req){
+        console.log("Error: " + req.statusText);
+      }
+    });
+//    this.resetAuth(authenticated);
+    this.setAuthenticated(authenticated);
+
+    return this.getAuthenticated();
+  },
+
   defaultSection: 'installer',
 
   getSection: function () {

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js Sat Oct 13 21:03:18 2012
@@ -47,6 +47,33 @@ module.exports = Em.Route.extend({
     route:'/charts',
     connectOutlets:function (router, context) {
       router.get('mainController').connectOutlet('mainCharts');
+    },
+    enter:function (router) {
+      Em.run.next(function () {
+        router.transitionTo('heatmap');
+      });
+    },
+    index: Ember.Route.extend({
+      route: '/',
+      redirectsTo: 'heatmap'
+    }),
+    heatmap: Em.Route.extend({
+      route:'/heatmap',
+      connectOutlets: function(router, context) {
+        router.get('mainChartsController').connectOutlet('mainChartsHeatmap');
+      }
+    }),
+    horizon_chart: Em.Route.extend({
+      route:'/horizon_chart',
+      connectOutlets: function(router, context) {
+        router.get('mainChartsController').connectOutlet('mainChartsHorizon');
+      }
+    }),
+    showChart:function (router, event) {
+      var parent = event.view._parentView;
+      parent.deactivateChildViews();
+      event.view.set('active', "active");
+      router.transitionTo(event.context);
     }
   }),
 
@@ -154,7 +181,6 @@ module.exports = Em.Route.extend({
       editUser:Em.Route.extend({
         route:'/edit/:userName',
         connectOutlets:function (router, user) {
-          console.log(user);
           router.get('mainAdminController').connectOutlet('mainAdminUserEdit', user);
         }
       }),

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css Sat Oct 13 21:03:18 2012
@@ -145,43 +145,6 @@
     width: 100px;
 }
 
-#host-details .back{
-    display: block;
-    width: 105px;
-    margin-bottom: 5px;
-}
-#host-details .box-header .host-title{
-    margin:0;
-    padding-left: 17px;
-}
-#host-details .box-header .button-section{
-    margin-bottom: 5px;
-}
-#host-details hr{
-    margin-bottom: 0;
-    clear: both;
-}
-#host-details .content{
-    padding: 10px;
-    background: #F6FAFD;
-}
-#host-details .host-configuration .dl-horizontal dt{
-    width: 90px;
-    line-height: 20px;
-}
-#host-details .host-configuration .dl-horizontal dd{
-    margin-left: 100px;
-    line-height: 20px;
-}
-#host-details .host-components{
-    padding: 10px;
-    padding-bottom: 0;
-    border: 1px solid #DEDEDE;
-    background: #fff;
-}
-#host-details .host-components .btn-group{
-    margin:0 5px 10px 0;
-}
 /*End Hosts*/
 /*fieldset begin*/
 .fieldset {

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Sat Oct 13 21:03:18 2012
@@ -139,7 +139,7 @@ footer {
     margin: 0;
   }
 
-  margin-bottom:40px;
+  margin-bottom: 40px;
 }
 
 @green: #69BE28;
@@ -237,6 +237,14 @@ a:focus {
 @status-corrupt-marker: url("../img/status-corrupt.jpg");
 @arrow-right: url("../img/arrow-right.png");
 
+/*Rack images*/
+@rack-status-live: url("../img/rack-status-live.png");
+@rack-status-critical: url("../img/rack-status-critical.png");
+@rack-status-dead: url("../img/rack-status-dead.png");
+@rack-state-toggler: url("../img/rack-state-toggler.png");
+@rack-state-plus: url("../img/rack-state-plus.png");
+@rack-state-minus: url("../img/rack-state-minus.png");
+
 /*****start styles for boxes*****/
 .box {
   border: 1px solid #D4D4D4;
@@ -250,7 +258,7 @@ a:focus {
   .box-header,
   .box-footer {
     padding: 10px;
-    /*background: #dedede;*/
+  /*background: #dedede;*/
     .gradient(#dedede, #ffffff, #dedede)
   }
   .box-header:after,
@@ -273,6 +281,7 @@ a:focus {
     }
   }
 }
+
 /*****end styles for boxes*****/
 
 /*****start styles for dashboard page*****/
@@ -298,10 +307,26 @@ a:focus {
     text-align: left;
     width: 120px;
   }
-  dd{
+  dd {
     margin-left: 145px;
   }
 }
+#summary-info {
+  margin-top: 20px;
+
+  tr td:first-child {
+    font-weight: bold;
+    background: #d0d0d0;
+  }
+
+  a {
+    text-decoration: underline;
+    &:hover {
+      text-decoration: none;
+    }
+  }
+}
+
 /*end services summary*/
 
 /*start alerts summary*/
@@ -327,6 +352,7 @@ a:focus {
     background-image: @status-corrupt-marker;
   }
 }
+
 .go-to {
   float: right;
   background-position: right center;
@@ -335,6 +361,7 @@ a:focus {
   padding-right: 40px;
   margin-top: 10px;
 }
+
 /*end alerts summary*/
 
 /*****end styles for dashboard page*****/
@@ -392,6 +419,43 @@ a:focus {
     background-repeat: no-repeat;
     background-position: 0px 4px;
   }
+  .back {
+    display: block;
+    width: 105px;
+    margin-bottom: 5px;
+  }
+  .box-header .host-title {
+    margin:0;
+    padding-left: 17px;
+  }
+  .box-header .button-section {
+    margin-bottom: 5px;
+  }
+  hr {
+    margin-bottom: 0;
+    clear: both;
+  }
+  .content {
+    padding: 10px;
+  }
+  .host-configuration .dl-horizontal dt {
+    width: 90px;
+    line-height: 20px;
+  }
+  .host-configuration .dl-horizontal dd {
+    margin-left: 100px;
+    line-height: 20px;
+  }
+  .host-components {
+    padding: 10px;
+    padding-bottom: 0;
+    border: 1px solid #DEDEDE;
+    border-radius: 4px;
+    background: #F5F5F5;
+  }
+  .host-components .btn-group {
+    margin:0 5px 10px 0;
+  }
 }
 
 /*End Hosts*/
@@ -509,4 +573,294 @@ ul.filter {
 
 #user-auth-method select {
   width: 320px;
+}
+
+/*start charts rack*/
+.rack {
+  width: 224px;
+  display: inline-block;
+  vertical-align: top;
+  border: 1px solid #D4D4D4;
+  border-radius: 5px;
+  margin-right: 4px;
+  margin-bottom: 10px;
+
+  .rackHeader {
+    background-color: #CDCDCD;
+    border-top-right-radius: 5px;
+    border-top-left-radius: 5px;
+    padding: 5px 5px 5px 10px;
+    border-bottom: 1px solid #D4D4D4;
+
+    .statusName {
+      font-size: 16px;
+      color: #006F9F;
+      text-shadow: #ffffff 0px 0px 1px;
+      font-weight: bold;
+      padding-bottom: 8px;
+      vertical-align: top;
+    }
+    .toggler {
+      background-repeat: no-repeat;
+      background-image: @rack-state-toggler;
+      display: block;
+      height: 22px;
+      position: relative;
+      width: 32px;
+      float: right;
+
+      span {
+        background-repeat: no-repeat;
+        background-image: @rack-state-plus;
+        display: block;
+        height: 17px;
+        left: 7px;
+        position: absolute;
+        top: 3px;
+        width: 18px;
+      }
+
+      span.isActive {
+        background-image: @rack-state-minus !important;
+        top: 10px;
+      }
+    }
+  }
+  .hostsSummary {
+    border-left: 1px solid #CDCDCD;
+    border-right: 1px solid #CDCDCD;
+    border-bottom: 1px solid #9f9f9f;
+    background-color: #f7f8fa;
+    font-size: 12px;
+    padding: 4px 0 4px 9px;
+    .textBlock {
+      color: #000000;
+      padding-right: 10px;
+
+      div {
+        height: 12px;
+        margin: 0 3px 0 0;
+        width: 12px;
+        display: inline-block;
+      }
+    }
+  }
+  .indicatorR {
+    background-color: #E2001A;
+  }
+
+  .indicatorY {
+    background-color: #F29400;
+  }
+
+  .indicatorG {
+    background-color: #88BF67;
+  }
+  .statusIndicator  {
+    display: inline-block;
+    width: 20px;
+    height: 19px;
+    margin-right: 10px;
+    margin-top: 4px;
+    float: left;
+    background-repeat: no-repeat;
+  }
+  .rackName {
+    margin-top: 4px;
+    float: left;
+  }
+  .statusIndicator.LIVE{
+    background-image: @rack-status-live;
+  }
+
+  .statusIndicator.CRITICAL{
+    background-image: @rack-status-critical;
+  }
+
+  .statusIndicator.DEAD{
+    background-image: @rack-status-dead;
+  }
+
+  .hosts {
+    padding: 4px;
+    overflow: hidden;
+    display: none;
+
+    .ember-view {
+      float: left;
+      width: 43px;
+      height: 43px;
+
+      .hostBlock {
+        margin: 4px;
+        width: 35px;
+        height: 35px;
+        position: relative;
+      }
+    }
+    .hostBlock {
+      border-radius: 4px;
+    }
+    .hostBlock.LIVE {
+      background-color: #87BE73;
+    }
+    .hostBlock.DEAD {
+      background-color: #E40024;
+    }
+    .hostBlock.CRITICAL {
+      background: #F39236;
+    }
+    .ember-view:hover {
+    }
+  }
+
+  .hosts.isActive {
+    display: block;
+  }
+}
+
+/*Start Heatmap*/
+.heatmap {
+  .rack.rack-5-2 {
+    .hosts {
+      height: 86px;
+    }
+  }
+  .rack.rack-5-4 {
+    .hosts {
+      height: 172px;
+    }
+  }
+  .rack.rack-5-6 {
+    .hosts {
+      height: 258px;
+    }
+  }
+  .rack.rack-5-8 {
+    .hosts {
+      height: 344px;
+    }
+  }
+  .rack.rack-5-10 {
+    .hosts {
+      height: 430px;
+    }
+  }
+  .heatmap_host_details {
+    font-size: 12px;
+    line-height: 1.6em;
+    border: 1px solid #D9D9D9;
+    background: #f9f9f9;
+    width: 100px;
+    height: 100px;
+    padding: 10px 10px;
+    position: absolute;
+    z-index: 1000;
+  }
+}
+/*End Heatmap*/
+.noDisplay {
+  display: none !important;
+}
+
+.display {
+  display: block !important;
+}
+
+.displayInline {
+  display: inline-block !important;
+}
+
+/* CHARTS */
+.chart {
+  overflow: hidden;
+  padding-bottom: 25px;
+
+  .attributes {
+    width: 75px;
+    float: left;
+    margin: 45px 0 0 0;
+
+    p {
+      margin-bottom: 9px;
+    }
+  }
+
+  .hostName {
+    font-weight: bold;
+  }
+
+  .horizon {
+    border-bottom: 1px solid #000000;
+    overflow: hidden;
+    position: relative;
+  }
+  .horizon {
+    border-bottom: 1px solid #000000;
+    border-top: 1px solid #000000;
+  }
+  .horizon + .horizon {
+    border-top: medium none;
+  }
+  .horizon canvas {
+    display: block;
+  }
+  .horizon .title, .horizon .value {
+    bottom: 0;
+    line-height: 30px;
+    margin: 0 6px;
+    position: absolute;
+    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+    white-space: nowrap;
+  }
+  .horizon .title {
+    left: 0;
+  }
+  .horizon .value {
+    right: 0;
+  }
+
+  .rule {
+    display: none;
+    width: 30px;
+    height: 124px;
+    padding-top: 27px;
+    position: absolute;
+    border-left: 1px dashed #a52a2a;
+
+    .stateValue {
+      margin: 15px 0 0 3px;
+      line-height: 15px;
+    }
+  }
+
+  .axis {
+    font: 10px sans-serif;
+
+    path {
+      display: none;
+    }
+
+    line {
+      shape-rendering: crispedges;
+      stroke: #000000;
+    }
+  }
+
+  .line {
+    background: none repeat scroll 0 0 #000000;
+  /* opacity: 0.2; */
+    z-index: 2;
+  }
+}
+
+/* CHARTS END */
+
+
+ul.noStyle {
+  list-style: none;
+}
+
+ul.inline li {
+  display: inline;
 }
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/metric.hbs Sat Oct 13 21:03:18 2012
@@ -0,0 +1,23 @@
+<!--
+* 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.
+-->
+Metrics <i class="icon-question-sign"></i>
+<ul class="displayInline nav nav-pills">
+  {{#each metric in view.metrics}}
+    {{view view.itemView metricBinding="metric"}}
+  {{/each}}
+</ul>
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs Sat Oct 13 21:03:18 2012
@@ -16,5 +16,6 @@
 * limitations under the License.
 -->
 
-<h5>Charts</h5>
-<div>Here we are</div>
\ No newline at end of file
+{{view App.MetricFilteringWidget controllerBinding="App.router.mainChartsController"}}
+  {{view App.MainChartsMenuView}}
+{{outlet}}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap.hbs?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap.hbs Sat Oct 13 21:03:18 2012
@@ -0,0 +1,23 @@
+<!--
+* 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="heatmap">
+  {{#each rack in controller.cluster.racks}}
+    {{view App.MainChartsHeatmapRackView rackBinding="rack" visualSchemaBinding="controller.visualSchema"}}
+  {{/each}}
+  {{view App.MainChartsHeatmapHostDetailView}}
+</div>
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host.hbs?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host.hbs Sat Oct 13 21:03:18 2012
@@ -0,0 +1,19 @@
+<!--
+* 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 {{bindAttr class="view.content.healthStatus view.hostClass"}}></div>
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host_detail.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host_detail.hbs?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host_detail.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host_detail.hbs Sat Oct 13 21:03:18 2012
@@ -0,0 +1,23 @@
+<!--
+* 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.
+-->
+
+<h6>{{view.details.name}}</h6>
+CPU: {{view.details.cpuUsage}}%<br/>
+Memory: {{view.details.memoryUsage}}%<br/>
+Network: {{view.details.networkUsage}}%<br/>
+I/O: {{view.details.ioUsage}}%
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_rack.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_rack.hbs?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_rack.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_rack.hbs Sat Oct 13 21:03:18 2012
@@ -0,0 +1,49 @@
+<!--
+* 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="rackHeader">
+  <div class="statusName clearfix">
+    <div {{bindAttr class="view.statusIndicator rack.status"}}></div>
+    <div class="rackName">{{rack.name}}</div>
+    <!--<a href="#" class="toggler" {{!action toggleRack target="view" on="click" }}>-->
+      <!--<span {{!bindAttr class="view.heatmapTogglerClass"}}></span>-->
+    <!--</a>-->
+  </div>
+</div>
+<!--<div class="hostsSummary clearfix">-->
+  <!--<div class="textBlock">Total hosts: {{!rack.hosts.length}}</div>-->
+  <!--{{!#if view.heatmapIsOpened}}-->
+    <!--<div class="textBlock">-->
+      <!--<div class="indicatorG"></div>-->
+      <!--Hosts in live state: {{!rack.liveHostsCount}}-->
+    <!--</div>-->
+    <!--<div class="textBlock">-->
+      <!--<div class="indicatorY"></div>-->
+      <!--Hosts in critical state: {{!rack.criticalHostsCount}}-->
+    <!--</div>-->
+    <!--<div class="textBlock">-->
+      <!--<div class="indicatorR"></div>-->
+      <!--Hosts in dead state: {{!rack.deadHostsCount}}-->
+    <!--</div>-->
+  <!--{{!/if}}-->
+<!--</div>-->
+<div {{bindAttr class="view.heatmapTogglerClass view.hostsBlockClass"}}>
+  {{#each rack.hosts}}
+    {{view App.MainChartsHeatmapHostView contentBinding="this"}}
+  {{/each}}
+</div>
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon.hbs?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon.hbs Sat Oct 13 21:03:18 2012
@@ -0,0 +1,21 @@
+<!--
+* 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.
+-->
+
+{{#each node in view.hosts}}
+  {{view App.MainChartsHorizonChartView hostBinding="node"}}
+{{/each}}

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon/chart.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon/chart.hbs?rev=1397948&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon/chart.hbs (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/horizon/chart.hbs Sat Oct 13 21:03:18 2012
@@ -0,0 +1,34 @@
+<!--
+* 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="row">
+  <div {{bindAttr class="view.healthStatusClass"}}></div>
+  <div class="span10 hostName">{{view.host.hostName}}</div>
+  <div class="span1">
+    <a href="#"{{action toggleChart target="view"}}>{{view.showChartText}}</a>
+  </div>
+</div>
+
+<div {{bindAttr class="view.chartClass"}}>
+  <div class="attributes">
+    {{#each metric in view.usedMetrics}}
+      <p>{{metric}}</p>
+    {{/each}}
+  </div>
+  <div {{bindAttr id="view.chartContainerId"}}></div>
+</div>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs Sat Oct 13 21:03:18 2012
@@ -15,7 +15,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 -->
-<div id="host-details" class="row">
+<div id="host-details">
   {{#if controller.isFromHosts}}
   <a class="btn back" {{action backToHostsList}}>← Back to Hosts</a>
   {{/if}}
@@ -32,7 +32,6 @@
           Stop
         </button>
       </div>
-      <hr />
     </div>
     <div class="content">
       {{view App.MainHostMenuView}}

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs Sat Oct 13 21:03:18 2012
@@ -36,6 +36,69 @@
           <div class="service-links">{{component.componentName}}: <a {{action filterHosts component}} href="javascript:void(null)">{{component.componentName}}</a></div>
         {{/if}}
 			{{/each}}
+      {{#if view.serviceStatus.hdfs}}
+      <table id="summary-info" class="table table-bordered table-condensed">
+        <tr>
+          <td>{{t services.service.summary.version}}</td>
+          <td>{{view.attributes.version}}</td>
+        </tr>
+        <tr>
+          <td>{{t services.service.summary.nameNode}}</td>
+          <td><a {{bindAttr href="view.attributes.namenode_addr"}}>{{view.attributes.namenode_addr}}</a></td>
+        </tr>
+        <tr>
+          <td>{{t services.service.summary.nameNodeUptime}}</td>
+          <td>{{view.attributes.start_time}}</td>
+        </tr>
+        <tr>
+        <tr>
+          <td>{{t services.service.summary.nameNodeHeap}}</td>
+          <td>{{view.attributes.memory_heap_used}} MB / {{view.attributes.memory_heap_max}} MB ({{view.attributes.memory_heap_percent_used}}% used)</td>
+        </tr>
+        <tr>
+          <td>{{t services.service.summary.pendingUpgradeStatus}}</td>
+          <td>
+            {{#if view.attributes.pending_upgrades}}
+              some message
+            {{else}}
+              no pending upgrades
+            {{/if}}
+          </td>
+        </tr>
+        <tr>
+          <td>{{t services.service.summary.safeModeStatus}}</td>
+          <td>
+            {{#if view.attributes.safemode}}
+              in safemode
+            {{else}}
+              not in safemode
+            {{/if}}
+          </td>
+        </tr>
+        <tr>
+          <td>{{t services.service.summary.dataNodes}}</td>
+          <td>
+            <a href="javascript:void(null)">{{view.attributes.live_nodes}}</a> / <a href="javascript:void(null)">{{view.attributes.dead_nodes}}</a> / <a href="javascript:void(null)">{{view.attributes.decommissioning_nodes}}</a>
+          </td>
+        </tr>
+        <tr>
+          <td>{{t services.service.summary.diskCapacity}}</td>
+          <td>{{view.attributes.used_bytes}} GB / {{view.attributes.dfs_total_bytes}} GB ({{view.attributes.dfs_percent_used}}% used)</td>
+        </tr>
+        <tr>
+          <td>{{t services.service.summary.blocksTotal}}</td>
+          <td>{{view.attributes.dfs_blocks_total}}</td>
+        </tr>
+        <tr>
+          <td>{{t services.service.summary.blockErrors}}</td>
+          <td>{{view.attributes.dfs_blocks_corrupt}} / {{view.attributes.dfs_blocks_missing}} / ({{view.attributes.dfs_blocks_underreplicated}})</td>
+        </tr>
+        <tr>
+          <td>{{t services.service.summary.totalFiles}}</td>
+          <td>{{view.attributes.dfs_dirfiles_count}}</td>
+        </tr>
+      </table>
+      {{/if}}
 		</div>
 	</div>
 	<div class="span6">

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js Sat Oct 13 21:03:18 2012
@@ -26,14 +26,10 @@ Em.CoreObject.reopen({
   }
 });
 
+Handlebars.registerHelper('log', function(variable) {
+  console.log(variable);
+});
 
-//Em.Object.getMixinProperties = function(){
-//  var properties = {};
-//  this.PrototypeMixin.mixins.forEach(function(i,mix){
-//    if(mix.properties) {
-//      properties = mix.properties;
-//    }
-//  });
-//
-//  return properties;
-//}
\ No newline at end of file
+Handlebars.registerHelper('warn', function(variable) {
+  console.warn(variable);
+});
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js?rev=1397948&r1=1397947&r2=1397948&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js Sat Oct 13 21:03:18 2012
@@ -21,7 +21,9 @@
 // load all views here
 
 require('views/application');
+require('views/common/chart');
 require('views/common/modal_popup');
+require('views/common/metric');
 require('views/common/form/field');
 require('views/login');
 require('views/main');
@@ -52,6 +54,13 @@ require('views/main/service/info/summary
 require('views/main/service/info/metrics');
 require('views/main/service/info/configs');
 require('views/main/service/info/audit');
+require('views/main/charts/menu');
+require('views/main/charts/heatmap');
+require('views/main/charts/horizon');
+require('views/main/charts/horizon/chart');
+require('views/main/charts/heatmap/heatmap_rack');
+require('views/main/charts/heatmap/heatmap_host');
+require('views/main/charts/heatmap/heatmap_host_detail');
 require('views/installer');
 require('views/installer/step1_view');
 require('views/installer/step2_view');