This is an automated email from the ASF dual-hosted git repository.
sunilg pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 6be665c YARN-8906. [UI2] NM hostnames not displayed correctly in Node
Heatmap Chart. Contributed by Akhil PB.
6be665c is described below
commit 6be665cfc6850aea612f40e26b3b6d5c0a0a3f41
Author: Sunil G <[email protected]>
AuthorDate: Mon Jun 3 15:53:23 2019 +0530
YARN-8906. [UI2] NM hostnames not displayed correctly in Node Heatmap
Chart. Contributed by Akhil PB.
(cherry picked from commit 59719dc560cf67f485d8e5b4a6f0f38ef97d536b)
---
.../hadoop-yarn-ui/src/main/webapp/app/components/nodes-heatmap.js | 6 ++++--
.../src/main/webapp/app/templates/components/nodes-heatmap.hbs | 1 -
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/nodes-heatmap.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/nodes-heatmap.js
index 1f772de..7eac266 100644
---
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/nodes-heatmap.js
+++
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/nodes-heatmap.js
@@ -230,12 +230,14 @@ export default BaseChartComponent.extend({
var node_id = data.get("id"),
node_addr = encodeURIComponent(data.get("nodeHTTPAddress")),
href = `#/yarn-node/${node_id}/${node_addr}/info`;
+ var nodeHostName = data.get("nodeHostName");
var a = g.append("a")
.attr("href", href);
a.append("text")
- .text(data.get("nodeHostName"))
+ .text(nodeHostName.length > 30 ? nodeHostName.substr(0, 30) + '...' :
nodeHostName)
.attr("y", yOffset + this.CELL_HEIGHT / 2 + 5)
- .attr("x", xOffset + this.CELL_WIDTH / 2)
+ .attr("x", nodeHostName.length > 30 ? xOffset + 10 : xOffset +
this.CELL_WIDTH / 2)
+ .style("text-anchor", nodeHostName.length > 30 ? "start" : "middle")
.attr("class", this.isNodeSelected(data) ? "heatmap-cell" :
"heatmap-cell-notselected");
if (this.isNodeSelected(data)) {
this.bindTP(a, rect);
diff --git
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/nodes-heatmap.hbs
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/nodes-heatmap.hbs
index f68bba6..d1ac8e7 100644
---
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/nodes-heatmap.hbs
+++
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/nodes-heatmap.hbs
@@ -25,4 +25,3 @@
<select id="heatmap-select" class="form-control"></select>
</div>
</div>
-<p/>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]