You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2015/06/05 07:38:44 UTC

[2/2] ambari git commit: AMBARI-11709. Heatmaps are not getting displayed. (jaimin)

AMBARI-11709. Heatmaps are not getting displayed. (jaimin)


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

Branch: refs/heads/trunk
Commit: 368ee72fa45e82c878d9fbc51fa755fe1b44b9cd
Parents: 3afdc67
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Thu Jun 4 17:27:04 2015 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Thu Jun 4 22:38:24 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/mixins/common/widgets/widget_mixin.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/368ee72f/ambari-web/app/mixins/common/widgets/widget_mixin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js
index c48aecb..95c7555 100644
--- a/ambari-web/app/mixins/common/widgets/widget_mixin.js
+++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js
@@ -298,13 +298,13 @@ App.WidgetMixin = Ember.Mixin.create({
   },
 
   /**
-   * make GET call to get host component metrics accross
+   * make GET call to get metrics value for all host components
    * @param {object} request
    * @return {$.ajax}
    */
   getHostComponentsMetrics: function (request) {
     request.metric_paths.forEach(function (_metric, index) {
-      request.metric_paths[index] = "host_components/" + _metric;
+      request.metric_paths[index] = "host_components/" + _metric.metric_path;
     });
     return App.ajax.send({
       name: 'widgets.serviceComponent.metrics.get',
@@ -334,11 +334,12 @@ App.WidgetMixin = Ember.Mixin.create({
   },
 
   getHostsMetrics: function (request) {
+    var metricPaths = request.metric_paths.mapProperty('metric_path');
     return App.ajax.send({
       name: 'widgets.hosts.metrics.get',
       sender: this,
       data: {
-        metricPaths: request.metric_paths.join(',')
+        metricPaths: metricPaths.join(',')
       },
       success: 'getHostsMetricsSuccessCallback'
     });