mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Minor Lua cleanup
This commit is contained in:
parent
f83797b141
commit
f67849e5b9
3 changed files with 105 additions and 50 deletions
|
|
@ -1808,10 +1808,10 @@ end
|
|||
-- The other two parameters should not be set
|
||||
function tprint(s, l, i)
|
||||
l = (l) or 1000; i = i or "";-- default item limit, indent string
|
||||
if (l<1) then io.write("ERROR: Item limit reached.\n"); return l-1 end;
|
||||
if (l<1) then print("ERROR: Item limit reached.<br>\n"); return l-1 end;
|
||||
local ts = type(s);
|
||||
if (ts ~= "table") then io.write(i..' '..ts..' '..tostring(s)..'\n'); return l-1 end
|
||||
io.write(i..' '..ts..'\n');
|
||||
if (ts ~= "table") then print(i..' '..ts..' '..tostring(s)..'<br>\n'); return l-1 end
|
||||
print(i..' '..ts..'<br>\n');
|
||||
for k,v in pairs(s) do
|
||||
local indent = ""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue