Added check to avoid including custom files when not present

This commit is contained in:
Luca 2022-08-26 08:58:31 +02:00
parent f76ce47348
commit dbbb80dcf0

View file

@ -358,8 +358,13 @@ function page_utils.print_header(title, addLoginJS)
print[[<script type="application/javascript" src="]] print(http_prefix) print[[/dist/login.js?]] print(static_file_epoch) print[["></script>]]
end
if(ntop.isPro() and ntop.exists(dirs.installdir.."/css/custom-theme.css")) then
print [[
<link href="]] print(http_prefix) print[[/css/custom-theme.css?]] print(static_file_epoch) print[[" rel="stylesheet">
]]
end
print[[
<link href="]] print(http_prefix) print[[/css/custom-theme.css?]] print(static_file_epoch) print[[" rel="stylesheet">
<script type="application/javascript" src="]] print(http_prefix) print("/lua/locale.lua?"..locale_when .. "&user_language=" ..language); print[["> </script>
<script type="application/javascript" src="]] print(http_prefix) print[[/dist/third-party.js?]] print(static_file_epoch) print[["></script>
<script type="application/javascript" src="]] print(http_prefix) print[[/dist/ntopng.js?]] print(static_file_epoch) print[["></script>