[TASK] Add source/target address to link variables

Support for babel
This commit is contained in:
Geno 2018-02-25 18:01:49 +01:00 committed by Xaver Maierhofer
parent c32e951cf1
commit f115600e5b

View File

@ -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()