Fixes download JSON / download pcap buttons

This commit is contained in:
Simone Mainardi 2019-06-21 14:41:17 +02:00
parent fa9c5e6ee8
commit 1440fb1bb8

View file

@ -771,21 +771,19 @@ end
end
end
if(host["json"] ~= nil) then
print("<tr><th>"..i18n("download").."&nbsp;<i class=\"fa fa-download fa-lg\"></i></th><td")
if(not isAdministrator()) then print(" colspan=2") end
print("><A HREF='"..ntop.getHttpPrefix().."/lua/rest/get/host/data.lua?ifid="..ifId.."&"..hostinfo2url(host_info).."'>JSON</A></td>")
print [[<td>]]
if (isAdministrator() and ifstats.isView == false and ifstats.isDynamic == false and interface.isPacketInterface()) then
print("<tr><th>"..i18n("download").."&nbsp;<i class=\"fa fa-download fa-lg\"></i></th><td")
if(not isAdministrator()) then print(" colspan=2") end
print("><A HREF='"..ntop.getHttpPrefix().."/lua/rest/get/host/data.lua?ifid="..ifId.."&"..hostinfo2url(host_info).."'>JSON</A></td>")
print [[<td>]]
if (isAdministrator() and ifstats.isView == false and ifstats.isDynamic == false and interface.isPacketInterface()) then
local live_traffic_utils = require("live_traffic_utils")
live_traffic_utils.printLiveTrafficForm(ifId, host_info)
end
print[[</td>]]
print("</tr>\n")
local live_traffic_utils = require("live_traffic_utils")
live_traffic_utils.printLiveTrafficForm(ifId, host_info)
end
print[[</td>]]
print("</tr>\n")
if(host["ssdp"] ~= nil) then
print("<tr><th><A HREF='https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol'>SSDP (UPnP)</A></th><td colspan=2><i class=\"fa fa-external-link fa-lg\"></i> <A HREF='"..host["ssdp"].."'>"..host["ssdp"].."<A></td></tr>\n")