You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2015/09/25 03:28:34 UTC

ambari git commit: AMBARI-13236. Selecting flume agent doesn't show graphs and metrics (srimanth)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1.2 8b405fae8 -> 7aa0c30bc


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/7aa0c30b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7aa0c30b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7aa0c30b

Branch: refs/heads/branch-2.1.2
Commit: 7aa0c30bc220e85394f0e1a93028827aa09491be
Parents: 8b405fa
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Thu Sep 24 17:48:51 2015 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Thu Sep 24 17:48:57 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/7aa0c30b/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/7aa0c30b/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);
   }
 });