mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-30 20:15:47 +00:00
Fixes shorten string called with not number value (#7259)
This commit is contained in:
parent
73c6b7c35e
commit
5313b7d71f
2 changed files with 15 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