mirror of
https://github.com/openwrt/luci.git
synced 2026-06-17 14:50:21 +04:00
luci-mod-admin-full: produce valid JSON in status/realtime/connections_status
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
@@ -122,12 +122,12 @@ function action_connections()
|
||||
|
||||
luci.http.prepare_content("application/json")
|
||||
|
||||
luci.http.write("{ connections: ")
|
||||
luci.http.write('{ "connections": ')
|
||||
luci.http.write_json(sys.net.conntrack())
|
||||
|
||||
local bwc = io.popen("luci-bwc -c 2>/dev/null")
|
||||
if bwc then
|
||||
luci.http.write(", statistics: [")
|
||||
luci.http.write(', "statistics": [')
|
||||
|
||||
while true do
|
||||
local ln = bwc:read("*l")
|
||||
|
||||
Reference in New Issue
Block a user