Adjusts naming conventions for rest/v1/get/alert/severity/counters.lua

This commit is contained in:
Simone Mainardi 2020-05-29 18:02:29 +02:00
parent c12ad4a341
commit f780152f89
4 changed files with 5 additions and 6 deletions

View file

@ -39,7 +39,7 @@ interface.select(ifid)
if isEmptyString(what) or what == "historical" then
local h_by_severity = alert_utils.getNumAlertsPerSeverity("historical", epoch_begin, epoch_end)
for k,v in pairs(h_by_severity, asc) do
v.label = alert_consts.alertSeverityLabel(v.severity, true)
v.severity = alert_consts.alertSeverityRaw(v.severity)
end
res['historical'] = h_by_severity
end
@ -47,7 +47,7 @@ end
if isEmptyString(what) or what == "historical-flows" then
local hf_by_severity = alert_utils.getNumAlertsPerSeverity("historical-flows", epoch_begin, epoch_end)
for k,v in pairs(hf_by_severity, asc) do
v.label = alert_consts.alertSeverityLabel(v.severity, true)
v.severity = alert_consts.alertSeverityRaw(v.severity)
end
res['historical-flows'] = hf_by_severity
end