diff --git a/ui/app/src/Views/AlertList/Parsing.elm b/ui/app/src/Views/AlertList/Parsing.elm index f22c89bd..52324763 100644 --- a/ui/app/src/Views/AlertList/Parsing.elm +++ b/ui/app/src/Views/AlertList/Parsing.elm @@ -26,15 +26,11 @@ alertsParser = (\filter receiver silenced -> let parsed = - case receiver of - Nothing -> - Nothing - - Just receiver -> - if String.startsWith "~" receiver then - Just { key = "receiver", op = RegexMatch, value = String.dropLeft 1 receiver } - else - Just { key = "receiver", op = Eq, value = receiver } + Maybe.map + (\r -> + { key = "receiver", op = RegexMatch, value = "^(?:" ++ r ++ ")$" } + ) + receiver in Filter filter parsed silenced )