浏览代码

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

Jaimin Jetly 10 年之前
父节点
当前提交
368ee72fa4
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      ambari-web/app/mixins/common/widgets/widget_mixin.js

+ 4 - 3
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'
     });