mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Parameters pass simplification
This commit is contained in:
parent
ecca16e402
commit
db01d1b211
7 changed files with 147 additions and 203 deletions
|
|
@ -2389,6 +2389,20 @@ end
|
|||
|
||||
-- ####################################################
|
||||
|
||||
-- Note: can only handle basic types
|
||||
function tableToJsObject(lua_table)
|
||||
local parts = {}
|
||||
|
||||
for k,v in pairs(lua_table) do
|
||||
if type(v) == 'string' then v = "'"..v.."'" end
|
||||
parts[#parts + 1] = k..":"..v
|
||||
end
|
||||
|
||||
return "{".. table.concat(parts, ", ") .."}"
|
||||
end
|
||||
|
||||
-- ####################################################
|
||||
|
||||
-- Compute the difference in seconds between local time and UTC.
|
||||
local function get_timezone()
|
||||
local now = os.time()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue