YARN-9210. RM nodes web page can not display node info. Contributed by Jiandan Yang.

This commit is contained in:
Weiwei Yang 2019-01-23 11:02:15 +08:00
parent d3b06d179d
commit c77f7e25c9
1 changed files with 2 additions and 3 deletions

View File

@ -166,7 +166,7 @@ class NodesPage extends RmView {
nodeTableData.append("<br title='")
.append(String.valueOf(info.getLastHealthUpdate())).append("'>")
.append(Times.format(info.getLastHealthUpdate())).append("\",\"")
.append(info.getHealthReport()).append("\",\"")
.append(StringEscapeUtils.escapeJava(info.getHealthReport())).append("\",\"")
.append(String.valueOf(info.getNumContainers())).append("\",\"")
.append("<br title='").append(String.valueOf(usedMemory))
.append("'>").append(StringUtils.byteDesc(usedMemory * BYTES_IN_MB))
@ -201,9 +201,8 @@ class NodesPage extends RmView {
nodeTableData.length() - 1);
}
nodeTableData.append("]");
String nodeTableDataEscaped = StringEscapeUtils.escapeJava(nodeTableData.toString());
html.script().$type("text/javascript")
._("var nodeTableData=" + nodeTableDataEscaped)._();
._("var nodeTableData=" + nodeTableData)._();
tbody._()._();
}
}