forcegraph: show links with unknown nodes
This commit is contained in:
parent
9f48cb1f3b
commit
97a00b6925
7 changed files with 36 additions and 24 deletions
|
@ -326,6 +326,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
|
|||
var tbody = document.createElement("tbody")
|
||||
|
||||
d.neighbours.forEach( function (d) {
|
||||
var unknown = !(d.node)
|
||||
var tr = document.createElement("tr")
|
||||
|
||||
var td1 = document.createElement("td")
|
||||
|
@ -335,12 +336,13 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
|
|||
var td2 = document.createElement("td")
|
||||
var a1 = document.createElement("a")
|
||||
a1.classList.add("hostname")
|
||||
a1.textContent = d.node.nodeinfo.hostname
|
||||
a1.href = "#"
|
||||
a1.onclick = router.node(d.node)
|
||||
a1.textContent = unknown ? d.id : d.node.nodeinfo.hostname
|
||||
if (!unknown)
|
||||
a1.href = "#"
|
||||
a1.onclick = router.node(d.node)
|
||||
td2.appendChild(a1)
|
||||
|
||||
if (has_location(d.node)) {
|
||||
if (!unknown && has_location(d.node)) {
|
||||
var span = document.createElement("span")
|
||||
span.classList.add("icon")
|
||||
span.classList.add("ion-location")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue