mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixes shorten string called with not number value (#7259)
This commit is contained in:
parent
69e4ebc852
commit
d4fe237404
2 changed files with 14 additions and 8 deletions
|
|
@ -858,14 +858,14 @@ local function label2formattedlabel(alt_name, host_info, show_vlan, shorten_len)
|
|||
|
||||
-- Special shorting function for IP addresses
|
||||
if res ~= ip then
|
||||
if shorten_len == false then
|
||||
-- Don't touch the string, requested as-is without shortening
|
||||
elseif tonumber(shorten_len) then
|
||||
-- Shorten according to the specified length
|
||||
res = shortenString(res, shorten_len)
|
||||
else
|
||||
-- Use the default system-wide setting for the shortening
|
||||
res = shortenString(res, shorten_len)
|
||||
if (not shorten_len) or (shorten_len == false) then
|
||||
-- Don't touch the string, requested as-is without shortening
|
||||
elseif tonumber(shorten_len) then
|
||||
-- Shorten according to the specified length
|
||||
res = shortenString(res, shorten_len)
|
||||
else
|
||||
-- Use the default system-wide setting for the shortening
|
||||
res = shortenString(res)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue