diff options
author | Florian Eckert <fe@dev.tdt.de> | 2018-01-18 13:42:21 +0100 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2018-01-18 15:10:05 +0100 |
commit | 406564c7db61f5e80bc246554488d7b04566d4cb (patch) | |
tree | 0c769c17b9c6cfc5abe87b88e8864c0613aade37 /applications/luci-app-mwan3/luasrc/controller/mwan3.lua | |
parent | 5b92193978e037d646edf23559440f18bf66be2c (diff) |
luci-app-mwan3: refactoring detail status view and controller
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-mwan3/luasrc/controller/mwan3.lua')
-rw-r--r-- | applications/luci-app-mwan3/luasrc/controller/mwan3.lua | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua index e7e8dc93c..69e72b7fd 100644 --- a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua +++ b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua @@ -68,16 +68,13 @@ function mwan_Status() end function detailedStatus() - local mArray = {} - - -- detailed mwan status - local detailStatusInfo = ut.trim(sys.exec("/usr/sbin/mwan3 status")) - if detailStatusInfo ~= "" then - mArray.mwandetail = { detailStatusInfo } + local statusInfo = ut.trim(sys.exec("/usr/sbin/mwan3 status")) + luci.http.prepare_content("text/plain") + if statusInfo ~= "" then + luci.http.write(statusInfo) + else + luci.http.write("Unable to get status information") end - - luci.http.prepare_content("application/json") - luci.http.write_json(mArray) end function diagnosticsData(interface, task) |