Skip to content

Commit 599a88d

Browse files
committed
Hide interface live traffic download when not a packet interface
1 parent 9137716 commit 599a88d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/lua/if_stats.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,15 +635,17 @@ if(ifstats.zmqRecvStats ~= nil) then
635635
print("</td></tr>\n")
636636
end
637637
end
638-
639-
if (isAdministrator() and ifstats.isView == false and ifstats.isDynamic == false) then
638+
639+
if (isAdministrator() and ifstats.isView == false and ifstats.isDynamic == false and interface.isPacketInterface()) then
640640
print("<tr><th>"..i18n("download").."&nbsp;<i class=\"fa fa-download fa-lg\"></i></th><td colspan=5>")
641641

642642
local live_traffic_utils = require("live_traffic_utils")
643643
live_traffic_utils.printLiveTrafficForm(ifId)
644644

645645
print("</td></tr>\n")
646-
646+
end
647+
648+
if (isAdministrator() and ifstats.isView == false and ifstats.isDynamic == false) then
647649
print("<tr><th width=250>"..i18n("if_stats_overview.reset_counters").."</th>")
648650
print("<td colspan=5>")
649651

0 commit comments

Comments
 (0)