Fixed invalid page rendering when ntopng.prefs.max_ui_strlen is undefined

This commit is contained in:
Luca Deri 2017-07-26 00:43:04 +02:00
parent 09c969a789
commit ac15c55377
2 changed files with 2 additions and 0 deletions

View file

@ -429,6 +429,7 @@ function shortHostName(name)
else
local max_len = ntop.getPref("ntopng.prefs.max_ui_strlen")
max_len = tonumber(max_len)
if(max_len == nil) then max_len = 24 end
chunks = {name:match("%w+:%w+:%w+:%w+:%w+:%w+")}
--io.write(#chunks.."\n")