From b7bf164feae617c840c5f43006de1fd62baba91e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 12 Jul 2018 18:55:16 +0200 Subject: [PATCH] luci-mod-admin-full: produce valid JSON in status/realtime/connections_status Signed-off-by: Jo-Philipp Wich --- .../luci-mod-admin-full/luasrc/controller/admin/status.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua index 4471fd597..ff95f3d91 100644 --- a/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua +++ b/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua @@ -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") -- 2.25.1