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 2013/01/10 21:02:28 UTC

svn commit: r1431593 - in /incubator/ambari/trunk: ./ ambari-web/app/views/common/chart/ ambari-web/app/views/main/dashboard/cluster_metrics/ ambari-web/app/views/main/host/metrics/

Author: yusaku
Date: Thu Jan 10 20:02:27 2013
New Revision: 1431593

URL: http://svn.apache.org/viewvc?rev=1431593&view=rev
Log:
AMBARI-1074. CPU Usage chart needs better idle time display.  (Srimanth Gunturi via yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js
    incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js
    incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js
    incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/cpu.js
    incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/memory.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1431593&r1=1431592&r2=1431593&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Jan 10 20:02:27 2013
@@ -454,6 +454,9 @@ AMBARI-666 branch (unreleased changes)
   AMBARI-676. Seperate directory for ambari-server. (jitendra)
 
   IMPROVEMENTS
+  
+  AMBARI-1074. CPU Usage chart needs better idle time display. (Srimanth
+  Gunturi via yusaku)
 
   AMBARI-1072. Change text on alerts "about XX hours ago". (Srimanth Gunturi
   via yusaku)

Modified: incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js?rev=1431593&r1=1431592&r2=1431593&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js Thu Jan 10 20:02:27 2013
@@ -350,7 +350,11 @@ App.ChartLinearTimeView = Ember.View.ext
         var self = this;
         var series_min_length = 100000000;
         seriesData.forEach(function (series, index) {
-          series.color = palette.color();
+          var seriesColor = self.colorForSeries(series);
+          if (seriesColor == null) {
+            seriesColor = palette.color();
+          }
+          series.color = seriesColor;
           series.stroke = 'rgba(0,0,0,0.3)';
           if (isPopup) {
             // calculate statistic data for popup legend

Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js?rev=1431593&r1=1431592&r2=1431593&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js Thu Jan 10 20:02:27 2013
@@ -74,7 +74,7 @@ App.ChartClusterMetricsCPU = App.ChartLi
   
   colorForSeries: function (series) {
     if ("Idle" == series.name){
-      return 'rgba(255,255,255,1)';
+      return '#CFECEC';
     }
     return null;
   }

Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js?rev=1431593&r1=1431592&r2=1431593&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js Thu Jan 10 20:02:27 2013
@@ -62,12 +62,5 @@ App.ChartClusterMetricsMemory = App.Char
       }
     }
     return seriesArray;
-  },
-  
-  colorForSeries: function (series) {
-    if("Total"==series.name){
-      return 'rgba(255,255,255,1)';
-    }
-    return null;
   }
 });
\ No newline at end of file

Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/cpu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/cpu.js?rev=1431593&r1=1431592&r2=1431593&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/cpu.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/cpu.js Thu Jan 10 20:02:27 2013
@@ -97,8 +97,8 @@ App.ChartHostMetricsCPU = App.ChartLinea
   },
 
   colorForSeries: function (series) {
-    if ("Idle" == series.name) {
-      return 'rgba(255,255,255,1)';
+    if ("CPU Idle" == series.name) {
+      return '#CFECEC';
     }
     return null;
   }

Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/memory.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/memory.js?rev=1431593&r1=1431592&r2=1431593&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/memory.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/metrics/memory.js Thu Jan 10 20:02:27 2013
@@ -83,12 +83,5 @@ App.ChartHostMetricsMemory = App.ChartLi
       }
     }
     return seriesArray;
-  },
-
-  colorForSeries: function (series) {
-    if ("Total" == series.name) {
-      return 'rgba(255,255,255,1)';
-    }
-    return null;
   }
 });
\ No newline at end of file