Ver Fonte

AMBARI-1234. On Heatmap host hover, including list of components running. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1437177 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako há 12 anos atrás
pai
commit
b42f7303fc

+ 3 - 0
CHANGES.txt

@@ -16,6 +16,9 @@ Trunk (unreleased changes):
  various hadoop artifacts back to Ambari. (Nate Cole via mahadev)
 
  IMPROVEMENTS
+ 
+ AMBARI-1234. On Heatmap host hover, including list of components running.
+ (yusaku)
 
  AMBARI-1229. Dashboard - make disk usage pie chart in HDFS summary easier
  to understand. (yusaku)

+ 0 - 13
ambari-web/app/styles/application.less

@@ -1832,18 +1832,6 @@ ul.filter {
   }
 }
 
-.heatmap_host_details {
-  font-size: 10px;
-  line-height: 1.6em;
-  border: 1px solid #006F9F;
-  background: #fff;
-  width: 73px;
-  height: 79px;
-  padding: 10px 10px;
-  position: absolute;
-  z-index: 1000;
-}
-
 /*Start Heatmap*/
 .heatmap {
   #heatmap-metric-title{
@@ -1880,7 +1868,6 @@ ul.filter {
     border: 1px solid #D9D9D9;
     background: #f9f9f9;
     width: 280px;
-    height: 170px;
     padding: 10px 10px;
     position: absolute;
     z-index: 1000;

+ 3 - 0
ambari-web/app/templates/main/charts/heatmap/heatmap_host_detail.hbs

@@ -30,4 +30,7 @@ IP: {{view.details.ip}}<br/>
 {{/if}}
 {{#if view.details.memoryUsage}}
   Memory: {{view.details.memoryUsage}}%<br/>
+{{/if}}
+{{#if view.details.hostComponents}}
+  Components: {{view.details.hostComponents}}<br/>
 {{/if}}

+ 6 - 0
ambari-web/app/views/main/charts/heatmap/heatmap_host.js

@@ -54,6 +54,12 @@ App.MainChartsHeatmapHostView = Em.View.extend({
         } else {
           val = val.toFixed(1);
         }
+      } else if (i == 'hostComponents') {
+        if (val == undefined) {
+          val = null;
+        } else {
+          val = val.filterProperty('isMaster').concat(val.filterProperty('isSlave')).mapProperty('displayName').join(', ');
+        }
       }
       view.set('details.' + i, val);
     });

+ 2 - 1
ambari-web/app/views/main/charts/heatmap/heatmap_host_detail.js

@@ -31,6 +31,7 @@ App.MainChartsHeatmapHostDetailView = Em.View.extend({
     metricValue: 'metric-value',
     diskUsage: '10',
     cpuUsage: '10',
-    memoryUsage: '10'
+    memoryUsage: '10',
+    hostComponents: 'host components'
   }
 });