mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
Fixes instance monitoring icon order
This commit is contained in:
parent
a9bc1a88ee
commit
08a87f27fd
3 changed files with 12 additions and 2 deletions
|
|
@ -36,12 +36,22 @@ local base_url = "lua/active_monitoring.lua?ifid=" .. ifid
|
|||
local title = i18n("graphs.active_monitoring")
|
||||
local host_label = ''
|
||||
|
||||
-- Host is used by the charts too, so we have to check a couple of characters to correctly format it
|
||||
-- because it can be manipulated by drawNewGraphs
|
||||
if not isEmptyString(host) then
|
||||
local tmp = string.split(host, ",metric:")
|
||||
if tmp then
|
||||
host = tmp[1] -- The first entry is the real host
|
||||
end
|
||||
end
|
||||
|
||||
if (not isEmptyString(host) and not isEmptyString(measurement)) then
|
||||
local tmp = active_monitoring_utils.getHost(host, measurement)
|
||||
if not isEmptyString(tmp) then
|
||||
host_label = active_monitoring_utils.formatAmHost(tmp.host, tmp.measurement, true)
|
||||
end
|
||||
if not isEmptyString(host_label) then
|
||||
title = string.format("<a href='%s/%s'>%s</a>", ntop.getHttpPrefix(), base_url, title)
|
||||
title = title .. " / " .. host_label
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue