Skip to content

Commit

Permalink
Adds host/interface/network reports to nEdge
Browse files Browse the repository at this point in the history
  • Loading branch information
simonemainardi authored and emanuele-f committed Dec 24, 2018
1 parent b0954b3 commit ad10d52
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions scripts/lua/host_details.lua
Expand Up @@ -359,17 +359,17 @@ if((page == "historical") or ts_utils.exists("host:traffic", {ifid=ifId, host=ho
end

if not only_historical then
if (host["localhost"] == true) and (ts_utils.getDriverName() == "rrd") then
if(ntop.isEnterprise()) then
if(page == "traffic_report") then
print("\n<li class=\"active\"><a href=\"#\"><i class='fa fa-file-text report-icon'></i></a></li>\n")
if host["localhost"] and ts_utils.getDriverName() == "rrd" then
if ntop.isEnterprise() or ntop.isnEdgeEnterprise() then
if(page == "traffic_report") then
print("\n<li class=\"active\"><a href=\"#\"><i class='fa fa-file-text report-icon'></i></a></li>\n")
else
print("\n<li><a href=\""..url.."&page=traffic_report\"><i class='fa fa-file-text report-icon'></i></a></li>")
end
else
print("\n<li><a href=\""..url.."&page=traffic_report\"><i class='fa fa-file-text report-icon'></i></a></li>")
print("\n<li><a href=\"#\" title=\""..i18n('enterpriseOnly').."\"><i class='fa fa-file-text report-icon'></i></A></li>\n")
end
elseif not have_nedge then
print("\n<li><a href=\"#\" title=\""..i18n('enterpriseOnly').."\"><i class='fa fa-file-text report-icon'></i></A></li>\n")
end
end

if ntop.isEnterprise() and ifstats.inline and host_pool_id ~= host_pools_utils.DEFAULT_POOL_ID then
if page == "quotas" then
Expand Down
6 changes: 3 additions & 3 deletions scripts/lua/if_stats.lua
Expand Up @@ -246,15 +246,15 @@ if(isAdministrator() and areAlertsEnabled() and not ifstats.isView) then
end

if ts_utils.getDriverName() == "rrd" then
if(ntop.isEnterprise()) then
if ntop.isEnterprise() or ntop.isnEdgeEnterprise() then
if(page == "traffic_report") then
print("\n<li class=\"active\"><a href=\"#\"><i class='fa fa-file-text report-icon'></i></a></li>\n")
else
print("\n<li><a href=\""..url.."&page=traffic_report\"><i class='fa fa-file-text report-icon'></i></a></li>")
end
elseif not have_nedge then
else
print("\n<li><a href=\"#\" title=\""..i18n('enterpriseOnly').."\"><i class='fa fa-file-text report-icon'></i></A></li>\n")
end
end
end

if(isAdministrator()) then
Expand Down
8 changes: 4 additions & 4 deletions scripts/lua/network_details.lua
Expand Up @@ -72,17 +72,17 @@ if areAlertsEnabled() and not ifstats.isView then
end
end

if ts_utils.getDriverName() == "rrd" then
if(ntop.isEnterprise()) then
if ts_utils.getDriverName() == "rrd" then
if ntop.isEnterprise() or ntop.isnEdgeEnterprise() then
if(page == "traffic_report") then
print("\n<li class=\"active\"><a href=\"#\"><i class='fa fa-file-text report-icon'></i></a></li>\n")
else
print("\n<li><a href=\""..nav_url.."&page=traffic_report\"><i class='fa fa-file-text report-icon'></i></a></li>")
end
elseif not have_nedge then
else
print("\n<li><a href=\"#\" title=\""..i18n('enterpriseOnly').."\"><i class='fa fa-file-text report-icon'></i></A></li>\n")
end
end
end

if((network ~= nil) and (areAlertsEnabled())) then
if(page == "config") then
Expand Down

0 comments on commit ad10d52

Please sign in to comment.