Make active alerts the default tab

Change the default filter from 'all' to 'active' on the alerts page.
This shows only active alerts by default, which is more useful for
monitoring current issues. Users can still click 'All Alerts' to see
the complete history.
This commit is contained in:
Graham McIntire 2026-01-17 12:55:03 -06:00
parent 9c2d95b55a
commit c88f2bbf96
No known key found for this signature in database

View file

@ -18,13 +18,13 @@ defmodule ToweropsWeb.AlertLive.Index do
{:ok,
socket
|> assign(:page_title, "Alerts")
|> assign(:filter, "all")
|> assign(:filter, "active")
|> load_alerts(organization.id)}
end
@impl true
def handle_params(params, _url, socket) do
filter = Map.get(params, "filter", "all")
filter = Map.get(params, "filter", "active")
{:noreply,
socket