local function format_time(real_time, proc_time) if proc_time then return string.format("%.1f ms (%.1f ms)", real_time * 1000, proc_time * 1000) else return string.format("%.1f ms", real_time * 1000) end end local function open(class) slot.put('
", encode.html(tostring(k)), " | ", encode.html(tostring(v)), " |
') slot.put(encode.html(node.message)) slot.put('') close() elseif node_type == "request" then open("request") open_head(node) slot.put("REQUESTED") if node.view then slot.put(" VIEW") elseif node.action then slot.put(" ACTION") end slot.put( ": ", encode.html(node.module), "/", encode.html(node.view or node.action) ) close_with_children() elseif node_type == "config" then open("config") open_head(node) slot.put('Configuration "', encode.html(node.name), '"') close_with_children() elseif node_type == "filter" then open("filter") open_head(node) slot.put(encode.html(node.path)) close_with_children() elseif node_type == "view" then open("view") open_head(node) slot.put( "EXECUTE VIEW: ", encode.html(node.module), "/", encode.html(node.view) ) close_with_children() elseif node_type == "action" then if node.status and ( node.status == "ok" or string.find(node.status, "^ok_") ) then open("action_success") elseif node.status and ( node.status == "error" or string.find(node.status, "^error_") ) then open("action_softfail") else open("action_neutral") end open_head(node) slot.put( "EXECUTE ACTION: ", encode.html(node.module), "/", encode.html(node.action) ) close_head() if node.status == "softfail" then render_children( '