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/12/09 14:29:53 UTC

svn commit: r1418942 - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/app/templates/main/host/ ambari-web/app/views/main/host/metrics/

Author: yusaku
Date: Sun Dec  9 13:29:52 2012
New Revision: 1418942

URL: http://svn.apache.org/viewvc?rev=1418942&view=rev
Log:
AMBARI-1013. Host metrics charts should use live data (Srimanth Gunturi via yusaku)

Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/metrics.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/cpu.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/disk.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/load.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/memory.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/network.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/processes.js

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1418942&r1=1418941&r2=1418942&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Sun Dec  9 13:29:52 2012
@@ -470,6 +470,9 @@ AMBARI-666 branch (unreleased changes)
 
   BUG FIXES
 
+  AMBARI-1013. Host metrics charts should use live data. (Srimanth Gunturi
+  via yusaku)
+
   AMBARI-1009. Cluster level graphs need to use API for data. (Srimanth
   Gunturi via yusaku)
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/metrics.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/metrics.hbs?rev=1418942&r1=1418941&r2=1418942&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/metrics.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/metrics.hbs Sun Dec  9 13:29:52 2012
@@ -18,21 +18,21 @@
 
 <div class="host-metrics">
 	<div class="span4">
-	  {{view App.ChartHostMetricsCPU}}
+	  {{view App.ChartHostMetricsCPU contentBinding="view.content"}}
 	</div> 
 	<div class="span4">
-	  {{view App.ChartHostMetricsDisk}}
+	  {{view App.ChartHostMetricsDisk contentBinding="view.content"}}
 	</div> 
 	<div class="span4">
-	  {{view App.ChartHostMetricsLoad}}
+	  {{view App.ChartHostMetricsLoad contentBinding="view.content"}}
 	</div> 
 	<div class="span4">
-	  {{view App.ChartHostMetricsMemory}}
+	  {{view App.ChartHostMetricsMemory contentBinding="view.content"}}
 	</div> 
 	<div class="span4">
-	  {{view App.ChartHostMetricsNetwork}}
+	  {{view App.ChartHostMetricsNetwork contentBinding="view.content"}}
 	</div> 
 	<div class="span4">
-	  {{view App.ChartHostMetricsProcesses}}
+	  {{view App.ChartHostMetricsProcesses contentBinding="view.content"}}
 	</div> 
 </div>
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs?rev=1418942&r1=1418941&r2=1418942&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs Sun Dec  9 13:29:52 2012
@@ -90,7 +90,7 @@
         <h4>Host Metrics</h4>
       </div>
       <div class="row-fluid">
-	     {{view App.MainHostMetricsView}}
+	     {{view App.MainHostMetricsView contentBinding="view.content"}}
 	    </div>
 	  </div>
   </div>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/cpu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/cpu.js?rev=1418942&r1=1418941&r2=1418942&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/cpu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/cpu.js Sun Dec  9 13:29:52 2012
@@ -33,7 +33,8 @@ App.ChartHostMetricsCPU = App.ChartLinea
 
   url: function () {
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}?fields=metrics/cpu/cpu_user[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_wio[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_nice[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_aidle[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_system[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_idle[{fromSeconds},{toSeconds},{stepSeconds}]", {
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: this.get('content').get('hostName')
     }, "/data/hosts/metrics/cpu.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/disk.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/disk.js?rev=1418942&r1=1418941&r2=1418942&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/disk.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/disk.js Sun Dec  9 13:29:52 2012
@@ -32,14 +32,18 @@ App.ChartHostMetricsDisk = App.ChartLine
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
 
   url: function () {
-    return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}?fields=metrics/disk/disk_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/disk/part_max_used[{fromSeconds},{toSeconds},{stepSeconds}],metrics/disk/disk_free[{fromSeconds},{toSeconds},{stepSeconds}]", {
-      clusterName: App.router.get('clusterController.clusterName')
+    return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}?fields=metrics/disk/disk_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/part_max_used[{fromSeconds},{toSeconds},{stepSeconds}],metrics/disk/disk_free[{fromSeconds},{toSeconds},{stepSeconds}]", {
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: this.get('content').get('hostName')
     }, "/data/hosts/metrics/disk.json");
   }.property('App.router.clusterController.clusterName'),
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];
     if (jsonData && jsonData.metrics && jsonData.metrics.disk) {
+      if(jsonData.metrics.part_max_used){
+        jsonData.metrics.disk.part_max_used = jsonData.metrics.part_max_used;
+      }
       for ( var name in jsonData.metrics.disk) {
         var displayName;
         var seriesData = jsonData.metrics.disk[name];

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/load.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/load.js?rev=1418942&r1=1418941&r2=1418942&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/load.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/load.js Sun Dec  9 13:29:52 2012
@@ -32,7 +32,8 @@ App.ChartHostMetricsLoad = App.ChartLine
 
   url: function () {
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}?fields=metrics/load/load_fifteen[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_one[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_five[{fromSeconds},{toSeconds},{stepSeconds}]", {
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: this.get('content').get('hostName')
     }, "/data/hosts/metrics/load.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/memory.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/memory.js?rev=1418942&r1=1418941&r2=1418942&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/memory.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/memory.js Sun Dec  9 13:29:52 2012
@@ -33,7 +33,8 @@ App.ChartHostMetricsMemory = App.ChartLi
 
   url: function () {
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}?fields=metrics/memory/swap_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_cached[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_buffers[{fromSeconds},{toSeconds},{stepSeconds}]", {
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: this.get('content').get('hostName')
     }, "/data/hosts/metrics/memory.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/network.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/network.js?rev=1418942&r1=1418941&r2=1418942&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/network.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/network.js Sun Dec  9 13:29:52 2012
@@ -33,7 +33,8 @@ App.ChartHostMetricsNetwork = App.ChartL
 
   url: function () {
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}?fields=metrics/network/bytes_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/bytes_out[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_out[{fromSeconds},{toSeconds},{stepSeconds}]", {
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: this.get('content').get('hostName')
     }, "/data/hosts/metrics/network.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/processes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/processes.js?rev=1418942&r1=1418941&r2=1418942&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/processes.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/metrics/processes.js Sun Dec  9 13:29:52 2012
@@ -31,17 +31,18 @@ App.ChartHostMetricsProcesses = App.Char
   title: "Processes",
 
   url: function () {
-    return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}?fields=metrics/processes/proc_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/processes/proc_run[{fromSeconds},{toSeconds},{stepSeconds}]", {
-      clusterName: App.router.get('clusterController.clusterName')
+    return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}?fields=metrics/process/proc_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/process/proc_run[{fromSeconds},{toSeconds},{stepSeconds}]", {
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: this.get('content').get('hostName')
     }, "/data/hosts/metrics/processes.json");
   }.property('App.router.clusterController.clusterName'),
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];
-    if (jsonData && jsonData.metrics && jsonData.metrics.processes) {
-      for ( var name in jsonData.metrics.processes) {
+    if (jsonData && jsonData.metrics && jsonData.metrics.process) {
+      for ( var name in jsonData.metrics.process) {
         var displayName;
-        var seriesData = jsonData.metrics.processes[name];
+        var seriesData = jsonData.metrics.process[name];
         switch (name) {
           case "proc_total":
             displayName = "Total Processes";