mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Unifies host_details.lua link gen in host_details.lua flows page
This commit is contained in:
parent
05e55530f5
commit
d487199a19
2 changed files with 7 additions and 10 deletions
|
|
@ -1426,18 +1426,17 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
local function params_page_equals(href_params, page_name)
|
||||
return href_params and href_params["page"] == page_name
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
-- @brief Implements the logic to decide whether to show or not the url for a given `host_info`
|
||||
local function hostdetails_exists(host_info, hostdetails_params)
|
||||
if params_page_equals(hostdetails_params, "historical") then
|
||||
if not hostdetails_params then
|
||||
hostdetails_params = {}
|
||||
end
|
||||
|
||||
if hostdetails_params["page"] == "historical" then
|
||||
if not areHostL7TimeseriesEnabled(interface.getId()) then
|
||||
return false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue