HDFS-11691. Add a proper scheme to the datanode links in NN web UI. Contributed by Kihwal Lee

(cherry picked from commit e4321ec843)
This commit is contained in:
Jason Lowe 2017-04-25 17:30:42 -05:00
parent c88e5e1836
commit d85dbd11ae
2 changed files with 3 additions and 3 deletions

View File

@ -316,7 +316,7 @@
{#LiveNodes} {#LiveNodes}
<tr> <tr>
<td ng-value="{state}-{name}" class="dfshealth-node-icon dfshealth-node-{state}">{name} ({xferaddr})</td> <td ng-value="{state}-{name}" class="dfshealth-node-icon dfshealth-node-{state}">{name} ({xferaddr})</td>
<td ng-value="{state}-{name}"><a href='//{dnWebAddress}'>{dnWebAddress}</a></td> <td ng-value="{state}-{name}"><a href='{dnWebAddress}'>{dnWebAddress}</a></td>
<td ng-value="{lastContact}">{lastContact}s</td> <td ng-value="{lastContact}">{lastContact}s</td>
<td ng-value="{usedPercentage}"> <td ng-value="{usedPercentage}">
<div> <div>

View File

@ -215,9 +215,9 @@
var port = n.infoAddr.split(":")[1]; var port = n.infoAddr.split(":")[1];
var securePort = n.infoSecureAddr.split(":")[1]; var securePort = n.infoSecureAddr.split(":")[1];
var dnHost = n.name.split(":")[0]; var dnHost = n.name.split(":")[0];
n.dnWebAddress = dnHost + ":" + port; n.dnWebAddress = "http://" + dnHost + ":" + port;
if (securePort != 0) { if (securePort != 0) {
n.dnWebAddress = dnHost + ":" + securePort; n.dnWebAddress = "https://" + dnHost + ":" + securePort;
} }
if (n.adminState === "In Service") { if (n.adminState === "In Service") {