ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject ambari git commit: AMBARI-14991. use the same colors for cpu metrics between summary and host page (onechiporenko)
Date Thu, 11 Feb 2016 09:11:35 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk ba604ea6b -> af560ae37


AMBARI-14991. use the same colors for cpu metrics between summary and host page (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/af560ae3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/af560ae3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/af560ae3

Branch: refs/heads/trunk
Commit: af560ae372ba171cf8077a3c827df6fd1b4c0e2c
Parents: ba604ea
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Wed Feb 10 14:54:53 2016 +0200
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Thu Feb 11 10:38:08 2016 +0200

----------------------------------------------------------------------
 .../app/views/main/dashboard/cluster_metrics/cpu.js       | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/af560ae3/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js b/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js
index 407487d..eea3040 100644
--- a/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js
+++ b/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js
@@ -43,21 +43,21 @@ App.ChartClusterMetricsCPU = App.ChartLinearTimeView.extend({
       idle = null,
       data = Em.get(jsonData, this.get('seriesTemplate.path'));
     if (data) {
-      for (var name in data) {
+      Object.keys(data).forEach(function (name) {
         var seriesData = data[name];
         if (seriesData) {
           var s = {
             name: name,
             data: seriesData
           };
-          if (name.indexOf('Idle') > -1) {
+          if (name.contains('Idle')) {
             //CPU idle metric should be the last in series array
             idle = s;
-            continue;
+            return;
           }
           dataArray.push(s);
         }
-      }
+      });
       if (idle) {
         dataArray.push(idle);
       }
@@ -66,7 +66,7 @@ App.ChartClusterMetricsCPU = App.ChartLinearTimeView.extend({
   },
 
   colorForSeries: function (series) {
-    if (Em.I18n.t('dashboard.clusterMetrics.cpu.displayNames.idle') == series.name){
+    if (series.name && series.name.contains(Em.I18n.t('dashboard.clusterMetrics.cpu.displayNames.idle')))
{
       return '#CFECEC';
     }
     return null;


Mime
View raw message