Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit aeb849a

Browse files
committed
[TASK] Add nodes as title and link to link-infobox
1 parent 3dc4d10 commit aeb849a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lib/infobox/node.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,19 @@ define(['sorttable', 'snabbdom', 'd3-interpolate', 'helper', 'utils/node'],
7070
V.h('td', icons),
7171
V.h('td', nodeLink(n.node)),
7272
V.h('td', n.node.clients),
73-
V.h('td', { style: { color: linkScale((n.link.source_tq + n.link.target_tq) / 2) } }, helper.showTq(n.link.source_tq) + ' - ' + helper.showTq(n.link.target_tq)),
73+
V.h('td', [V.h('a', {
74+
style: {
75+
color: linkScale((n.link.source_tq + n.link.target_tq) / 2)
76+
},
77+
props: {
78+
title: n.link.source.hostname + ' - ' + n.link.target.hostname,
79+
href: router.generateLink({ link: n.link.id })
80+
}, on: {
81+
click: function (e) {
82+
router.fullUrl({ link: n.link.id }, e);
83+
}
84+
}
85+
}, helper.showTq(n.link.source_tq) + ' - ' + helper.showTq(n.link.target_tq))]),
7486
V.h('td', helper.showDistance(n.link))
7587
]);
7688
}

0 commit comments

Comments
 (0)