Skip to content

Commit

Permalink
Fixes interface name with view, in flow details (#8336)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoBiscosi committed Apr 23, 2024
1 parent cf4427d commit 2a9dd23
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion scripts/lua/flow_details.lua
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,27 @@ else
print(" <span class='badge bg-warning text-dark'>" .. i18n("periodic_flow") .. "</span>")
end
printInterfaceIndex(flow.iface_index)
if interface.isView() then
interface.select(flow.iface_index)
local _ifstats = interface.getStats()
local is_pcap = false
local is_packet = false
local is_zmq = false
local icon = ""
if interface.isPcapDumpInterface() then
icon = "<i class='fas fa-file'></i>"
is_pcap = true
elseif (interface.isPacketInterface()) then
icon = "<i class='fas fa-ethernet'></i>"
is_packet = true
elseif (interface.isZMQInterface()) then
icon = "<i class='fas fa-bezier-curve'></i>"
is_zmq = true
end
local if_name = getInterfaceName(flow.iface_index, true)
print("[ " .. icon .. " " .. if_name .. "]")
end
if(flow.flow_swapped == true) then
print(' <abbr title="'.. i18n("swapped_flow") ..'"><i class="fa-solid fa-repeat"></i></abbr>')
end
Expand Down

0 comments on commit 2a9dd23

Please sign in to comment.