Fix tab being hidden after deleting all the alerts when a filter is set

This commit is contained in:
emanuele-f 2016-12-15 10:50:29 +01:00
parent 2b5da87dff
commit 06872bd949

View file

@ -881,6 +881,13 @@ function checkDeleteStoredAlerts()
_GET["row_id"] = nil
-- in case of delete "older than" button, resets the time period after the delete took place
if isEmptyString(_GET["period_begin"]) then _GET["period_end"] = nil end
local new_num = getNumAlerts(_GET["status"], _GET)
if new_num == 0 then
-- reset the filter to avoid hiding the tab
_GET["alert_severity"] = nil
_GET["alert_type"] = nil
end
end
end