Unifies host_details.lua link gen in host_details.lua flows page

This commit is contained in:
Simone Mainardi 2020-05-26 15:12:44 +02:00
parent 05e55530f5
commit d487199a19
2 changed files with 7 additions and 10 deletions

View file

@ -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