Browse Source

AMBARI-1074. CPU Usage chart needs better idle time display. (Srimanth Gunturi via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1431593 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 years ago
parent
commit
519dd02fe4

+ 3 - 0
CHANGES.txt

@@ -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)

+ 5 - 1
ambari-web/app/views/common/chart/linear_time.js

@@ -350,7 +350,11 @@ App.ChartLinearTimeView = Ember.View.extend({
         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

+ 1 - 1
ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js

@@ -74,7 +74,7 @@ App.ChartClusterMetricsCPU = App.ChartLinearTimeView.extend({
   
   colorForSeries: function (series) {
     if ("Idle" == series.name){
-      return 'rgba(255,255,255,1)';
+      return '#CFECEC';
     }
     return null;
   }

+ 0 - 7
ambari-web/app/views/main/dashboard/cluster_metrics/memory.js

@@ -62,12 +62,5 @@ App.ChartClusterMetricsMemory = App.ChartLinearTimeView.extend({
       }
     }
     return seriesArray;
-  },
-  
-  colorForSeries: function (series) {
-    if("Total"==series.name){
-      return 'rgba(255,255,255,1)';
-    }
-    return null;
   }
 });

+ 2 - 2
ambari-web/app/views/main/host/metrics/cpu.js

@@ -97,8 +97,8 @@ App.ChartHostMetricsCPU = App.ChartLinearTimeView.extend({
   },
 
   colorForSeries: function (series) {
-    if ("Idle" == series.name) {
-      return 'rgba(255,255,255,1)';
+    if ("CPU Idle" == series.name) {
+      return '#CFECEC';
     }
     return null;
   }

+ 0 - 7
ambari-web/app/views/main/host/metrics/memory.js

@@ -83,12 +83,5 @@ App.ChartHostMetricsMemory = App.ChartLinearTimeView.extend({
       }
     }
     return seriesArray;
-  },
-
-  colorForSeries: function (series) {
-    if ("Total" == series.name) {
-      return 'rgba(255,255,255,1)';
-    }
-    return null;
   }
 });