ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [10/50] [abbrv] ambari git commit: AMBARI-13236. Selecting flume agent doesn't show graphs and metrics (srimanth)
Date Wed, 30 Sep 2015 14:45:30 GMT
AMBARI-13236. Selecting flume agent doesn't show graphs and metrics (srimanth)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: cda6853564bd68f38ed25543351247bea58e26b2
Parents: bc94537
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Thu Sep 24 17:48:51 2015 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Thu Sep 24 18:29:22 2015 -0700

----------------------------------------------------------------------
 .../service/info/metrics/flume/flume_metric_graphs.js   | 12 ++++++++----
 ambari-web/app/views/main/service/services/flume.js     |  2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cda68535/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graphs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graphs.js b/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graphs.js
index d38074e..415d423 100644
--- a/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graphs.js
+++ b/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graphs.js
@@ -49,11 +49,15 @@ App.MainServiceInfoFlumeGraphsView = App.MainServiceInfoSummaryMetricGraphsView.
     var metricNames = {};
     var metricItems = [];
     if (data != null && data.metrics != null && data.metrics.flume != null
&& data.metrics.flume.flume != null && data.metrics.flume.flume[metricType]
!= null) {
-      for (var name in data.metrics.flume.flume[metricType]) {
-        for (var metricName in data.metrics.flume.flume[metricType][name]) {
-          metricNames[metricName] = name;
+      for ( var name in data.metrics.flume.flume[metricType]) {
+        if (data.metrics.flume.flume[metricType].hasOwnProperty(name)) {
+          for ( var metricName in data.metrics.flume.flume[metricType][name]) {
+            if (data.metrics.flume.flume[metricType][name].hasOwnProperty(metricName)) {
+              metricNames[metricName] = name;
+            }
+          }
+          metricItems.push(name);
         }
-        metricItems.push(name);
       }
     }
     // Now that we have collected all metric names, we create

http://git-wip-us.apache.org/repos/asf/ambari/blob/cda68535/ambari-web/app/views/main/service/services/flume.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/flume.js b/ambari-web/app/views/main/service/services/flume.js
index 819e994..013a10b 100644
--- a/ambari-web/app/views/main/service/services/flume.js
+++ b/ambari-web/app/views/main/service/services/flume.js
@@ -187,6 +187,6 @@ App.MainDashboardServiceFlumeView = App.TableView.extend(App.MainDashboardServic
       mockData.id = 'metric' + index;
       mockData.toggleIndex = '#' + mockData.id;
     });
-    this.set('parentView.parentView.collapsedSections', mockMetricData);
+    this.set('parentView.collapsedSections', mockMetricData);
   }
 });


Mime
View raw message