Add VLAN rules. (#8193)

This commit is contained in:
Nicolo Maio 2024-02-06 17:47:15 +01:00
parent e971e8e705
commit df2e4bd12a
7 changed files with 342 additions and 85 deletions

View file

@ -3401,6 +3401,19 @@ function timeseries_info.get_host_rules_schema(rule_type)
}
return metric_list
elseif rule_type == 'vlan' then
local metric_list = {}
for _, item in ipairs(community_timeseries) do
if (item.id == timeseries_id.vlan) then
if (item.schema == "vlan:score") then
item.show_volume = false
else
item.show_volume = true
end
metric_list[#metric_list + 1] = item
end
end
return metric_list
end
end