mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Added check on networks number
This commit is contained in:
parent
27c31ac4a0
commit
750efea414
1 changed files with 10 additions and 5 deletions
|
|
@ -33,12 +33,17 @@ page_utils.print_page_title(getPageTitle())
|
|||
-- ##############################
|
||||
|
||||
if(ntop.isPro()) then
|
||||
local template_utils = require "template_utils"
|
||||
local networks_stats = interface.getNetworksStats()
|
||||
local numNetworks = table.len(networks_stats)
|
||||
|
||||
template_utils.render("pages/networks_map.html", {
|
||||
url = ntop.getHttpPrefix()..'/lua/pro/rest/v2/get/host/top/network_hosts_score.lua',
|
||||
prefix = ntop.getHttpPrefix()
|
||||
})
|
||||
if(numNetworks > 0) then
|
||||
local template_utils = require "template_utils"
|
||||
|
||||
template_utils.render("pages/networks_map.html", {
|
||||
url = ntop.getHttpPrefix()..'/lua/pro/rest/v2/get/host/top/network_hosts_score.lua',
|
||||
prefix = ntop.getHttpPrefix()
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- ##############################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue