Fixes broken historical flow (#6436)

This commit is contained in:
MatteoBiscosi 2022-03-16 16:15:25 +01:00
parent 5b2e6ae98c
commit 39fff194fa

View file

@ -5027,9 +5027,14 @@ function format_portidx_name(cached_dev, portidx)
if (cached_dev) and (cached_dev["interfaces"]) then
local port_info = cached_dev["interfaces"][tostring(portidx)]
if port_info then
package.path = dirs.installdir .. "/pro/scripts/lua/modules/?.lua;" .. package.path
snmp_location = require "snmp_location"
if port_info then
package.path = dirs.installdir .. "/pro/scripts/lua/modules/?.lua;" .. package.path
snmp_location = require "snmp_location"
if not port_info["id"] then
port_info["id"] = port_info["index"]
port_info["snmp_device_ip"] = cached_dev["host_ip"]
end
idx_name = snmp_location.snmp_port_link(port_info)
end