From aeb849aca842b3f9c3f4ddbec9a8e49304f42592 Mon Sep 17 00:00:00 2001
From: Xaver Maierhofer <xaver.maierhofer@xwissen.info>
Date: Sat, 1 Dec 2018 21:31:42 +0100
Subject: [PATCH] [TASK] Add nodes as title and link to link-infobox

---
 lib/infobox/node.js | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lib/infobox/node.js b/lib/infobox/node.js
index 64de003..1410303 100644
--- a/lib/infobox/node.js
+++ b/lib/infobox/node.js
@@ -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))
         ]);
       }
-- 
GitLab