luci-app-mwan3: add command to diag_command output view
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 22 Jun 2018 06:51:27 +0000 (08:51 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 30 Aug 2018 12:31:29 +0000 (14:31 +0200)
Add executed command to diagnostic output.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-mwan3/luasrc/controller/mwan3.lua

index 2d46953e5535052e5c3114a1621567c732da40c8..541d695ecfe04a710ef41ba7e232dca92673b7d0 100644 (file)
@@ -101,6 +101,10 @@ function diagnosticsData(interface, task)
                if addr and addr:match("^[a-zA-Z0-9%-%.:_]+$") then
                        local util = io.popen(cmd %{ut.shellquote(device), ut.shellquote(addr)})
                        if util then
+                               luci.http.write("Command:\n")
+                               luci.http.write(cmd %{ut.shellquote(device),
+                                       ut.shellquote(addr)} .. "\n\n")
+                               luci.http.write("Result:\n")
                                while true do
                                        local ln = util:read("*l")
                                        if not ln then break end