Skip to content

Commit

Permalink
Hide interface live traffic download when not a packet interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Dec 12, 2019
1 parent 9137716 commit 599a88d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/lua/if_stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -635,15 +635,17 @@ if(ifstats.zmqRecvStats ~= nil) then
print("</td></tr>\n")
end
end
if (isAdministrator() and ifstats.isView == false and ifstats.isDynamic == false) then

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 colspan=5>")

local live_traffic_utils = require("live_traffic_utils")
live_traffic_utils.printLiveTrafficForm(ifId)

print("</td></tr>\n")

end

if (isAdministrator() and ifstats.isView == false and ifstats.isDynamic == false) then
print("<tr><th width=250>"..i18n("if_stats_overview.reset_counters").."</th>")
print("<td colspan=5>")

Expand Down

0 comments on commit 599a88d

Please sign in to comment.