Fix mac-based serialization key and add a preference to enabled it (disabled by default)

This commit is contained in:
emanuele-f 2019-02-22 16:01:29 +01:00
parent 98cb560083
commit 4a97017f35
14 changed files with 57 additions and 33 deletions

View file

@ -340,10 +340,10 @@ function printSeries(options, tags, start_time, base_url, params)
local needs_separator = false
local separator_label = nil
if params.host_idkey then
if params.tskey then
-- this can contain a MAC address for local broadcast domain hosts
tags = table.clone(tags)
tags.host = params.host_idkey
tags.host = params.tskey
end
for _, serie in ipairs(series) do
@ -588,10 +588,10 @@ print[[
end
end
if options.host_idkey then
if options.tskey then
-- this can contain a MAC address for local broadcast domain hosts
tags = table.clone(tags)
tags.host = options.host_idkey
tags.host = options.tskey
end
local data = ts_utils.query(schema, tags, start_time, end_time)
@ -649,7 +649,7 @@ local page_params = {
ts_schema = schema,
zoom = zoomLevel or '',
epoch = selectedEpoch or '',
host_idkey = options.host_idkey,
tskey = options.tskey,
}
if(options.timeseries) then