mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Added aliases REST API (#8053)
This commit is contained in:
parent
309e025c59
commit
2336ea1762
7 changed files with 1227 additions and 896 deletions
|
|
@ -1050,6 +1050,26 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
-- This function set the interface alias, return true if the
|
||||
-- alias is set, false otherwise
|
||||
function setInterfaceAlias(iface, alias)
|
||||
local ok = true
|
||||
|
||||
if(isEmptyString(iface)) then
|
||||
ok = false
|
||||
end
|
||||
|
||||
if(ok and (iface ~= alias) and not isEmptyString(alias)) then
|
||||
ntop.setCache(getInterfaceAliasKey(iface), alias)
|
||||
else
|
||||
ok = false
|
||||
end
|
||||
|
||||
return ok
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function setLocalNetworkAlias(network, alias)
|
||||
if((network ~= alias) or isEmptyString(alias)) then
|
||||
ntop.setHashCache(getLocalNetworkAliasKey(), network, alias)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue