fixed requires loop

This commit is contained in:
gabryon99 2020-11-20 12:20:25 +01:00
parent 0fc0a24f51
commit 1b25fc64c5
4 changed files with 15 additions and 17 deletions

View file

@ -4,14 +4,9 @@
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/pro/scripts/lua/enterprise/modules/?.lua;" .. package.path
require "lua_utils"
local template_utils = require("template_utils")
local infrastructure_utils
if (ntop.isEnterpriseL()) then
infrastructure_utils = require("infrastructure_utils")
end
local ui_utils = {}
@ -63,14 +58,4 @@ function ui_utils.create_navbar_title(title, subpage, title_link)
return "<a href='".. title_link .."'>".. title .. "</a>&nbsp;/&nbsp;<span>"..subpage.."</span>"
end
function ui_utils.format_label_am(host)
if (ntop.isEnterpriseL()) then
-- replace path used inside infrastructure utils
return string.gsub(host, "/"..infrastructure_utils.ENDPOINT_TO_EXTRACT_DATA, " <span class='badge badge-info'>".. i18n("infrastructure_dashboard.infrastructure") .."</span>")
end
return host
end
return ui_utils