From f115600e5be11871b44a8a85fd1a322b5166b94f Mon Sep 17 00:00:00 2001 From: Geno Date: Sun, 25 Feb 2018 18:01:49 +0100 Subject: [PATCH] [TASK] Add source/target address to link variables Support for babel --- lib/infobox/link.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/infobox/link.js b/lib/infobox/link.js index 50b35f8..ba2092f 100644 --- a/lib/infobox/link.js +++ b/lib/infobox/link.js @@ -6,10 +6,12 @@ define(['helper', 'snabbdom'], function (helper, V) { var subst = { '{SOURCE_ID}': d.source.node_id, '{SOURCE_NAME}': d.source.hostname.replace(/[^a-z0-9\-]/ig, '_'), - '{SOURCE_MAC}': d.source_mac, + '{SOURCE_ADDR}': d.source_addr, + '{SOURCE_MAC}': d.source_mac ? d.source_mac : d.source_addr, '{TARGET_ID}': d.target.node_id, '{TARGET_NAME}': d.target.hostname.replace(/[^a-z0-9\-]/ig, '_'), - '{TARGET_MAC}': d.target_mac, + '{TARGET_ADDR}': d.target_addr, + '{TARGET_MAC}': d.target_mac ? d.target_mac : d.target_addr, '{TYPE}': d.type, '{TIME}': time, '{LOCALE}': _.locale()