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

Commit

Permalink
[TASK] Add nodes as title and link to link-infobox
Browse files Browse the repository at this point in the history
  • Loading branch information
xf- committed Dec 1, 2018
1 parent 3dc4d10 commit aeb849a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/infobox/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,19 @@ define(['sorttable', 'snabbdom', 'd3-interpolate', 'helper', 'utils/node'],
V.h('td', icons),
V.h('td', nodeLink(n.node)),
V.h('td', n.node.clients),
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)),
V.h('td', [V.h('a', {
style: {
color: linkScale((n.link.source_tq + n.link.target_tq) / 2)
},
props: {
title: n.link.source.hostname + ' - ' + n.link.target.hostname,
href: router.generateLink({ link: n.link.id })
}, on: {
click: function (e) {
router.fullUrl({ link: n.link.id }, e);
}
}
}, helper.showTq(n.link.source_tq) + ' - ' + helper.showTq(n.link.target_tq))]),
V.h('td', helper.showDistance(n.link))
]);
}
Expand Down

0 comments on commit aeb849a

Please sign in to comment.