mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Mappend observation point to alias (when present)
This commit is contained in:
parent
cc87464999
commit
8346730577
3 changed files with 19 additions and 6 deletions
|
|
@ -4354,14 +4354,25 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function getObsPointAlias(observation_point_id)
|
||||
function getObsPointAlias(observation_point_id, add_id, add_href)
|
||||
local alias = ntop.getHashCache(getObsPointAliasKey(), observation_point_id)
|
||||
|
||||
local ret
|
||||
|
||||
if not isEmptyString(alias) then
|
||||
return alias
|
||||
if(add_id == true) then
|
||||
ret = observation_point_id .. " [".. alias .."]"
|
||||
else
|
||||
ret = alias
|
||||
end
|
||||
else
|
||||
ret = tostring(observation_point_id)
|
||||
end
|
||||
|
||||
return tostring(observation_point_id)
|
||||
if(add_href == true) then
|
||||
ret = "<A HREF=\"".. ntop.getHttpPrefix() .."/lua/pro/enterprise/observation_points.lua\">"..ret.."</A>"
|
||||
end
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue