feat: optimize the view of TrustUnits
just show node names in the view of TrustUnits
This commit is contained in:
parent
2aa98c4f17
commit
a117a53b0b
@ -262,7 +262,7 @@ function showNodeTrustUnits(obj) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
let html = "<table class='table display row-border' id='trustNodesUnitTabDivTab'>" +
|
let html = "<table class='table display row-border' id='trustNodesUnitTabDivTab'>" +
|
||||||
"<thead><tr><th>序号</th><th>ID</th><th>类型</th><th>创建者</th><th>节点数目</th><th>节点公钥</th></tr></thead>" +
|
"<thead><tr><th>序号</th><th>ID</th><th>类型</th><th>创建者</th><th>节点数目</th><th>节点列表</th></tr></thead>" +
|
||||||
"<tbody>";
|
"<tbody>";
|
||||||
const tableTail = "</tbody></table>";
|
const tableTail = "</tbody></table>";
|
||||||
if (global.nodeUnits) {
|
if (global.nodeUnits) {
|
||||||
@ -275,13 +275,13 @@ function showNodeTrustUnits(obj) {
|
|||||||
<td>TCP</td>
|
<td>TCP</td>
|
||||||
<td>${global.nodeUnits[i].key.substring(0, at_ - 1)}</td>
|
<td>${global.nodeUnits[i].key.substring(0, at_ - 1)}</td>
|
||||||
<td>${nodes.length}</td>
|
<td>${nodes.length}</td>
|
||||||
<td>${JSON.stringify(nodes)}</td>
|
<td>${nodes.map(x => x.nodeName).sort().join(',')}</td>
|
||||||
</tr>`
|
</tr>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (global.p2pNodes) {
|
if (global.p2pNodes) {
|
||||||
html += "<tr><td>" + (i+1) + "</td> <td>P2PUnit</td><td>P2P</td> <td>bdledger</td> <td>" + global.p2pNodes.length + "</td> <td>" + JSON.stringify(global.p2pNodes) + "</td> </tr>";
|
html += "<tr><td>" + (i + 1) + "</td> <td>P2PUnit</td><td>P2P</td> <td>bdledger</td> <td>" + global.p2pNodes.length + "</td> <td>" + JSON.stringify(global.p2pNodes) + "</td> </tr>";
|
||||||
}
|
}
|
||||||
html += tableTail;
|
html += tableTail;
|
||||||
$("#trustNodesUnitTabDiv").html(html);
|
$("#trustNodesUnitTabDiv").html(html);
|
||||||
$("#trustNodesUnitTabDivTab").DataTable({
|
$("#trustNodesUnitTabDivTab").DataTable({
|
||||||
|
Loading…
Reference in New Issue
Block a user