Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ui/app/src/Views/AlertList/Views.elm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Dict
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.Keyed
import Html.Lazy exposing (lazy4)
import Set exposing (Set)
import Types exposing (Msg(..))
import Utils.Filter exposing (Filter)
Expand Down Expand Up @@ -83,10 +85,15 @@ view { alertGroups, groupBar, filterBar, receiverBar, tab, activeId, activeGroup
[ i [ class "fa fa-plus mr-3" ] [], text "Expand all groups" ]
)
]
, Utils.Views.apiData (defaultAlertGroups activeId activeGroups expandAll) alertGroups
, lazy4 alertGroupsView activeId activeGroups expandAll alertGroups
]


alertGroupsView : Maybe String -> Set Int -> Bool -> ApiData (List AlertGroup) -> Html Msg
alertGroupsView activeId activeGroups expandAll alertGroups =
Utils.Views.apiData (defaultAlertGroups activeId activeGroups expandAll) alertGroups


defaultAlertGroups : Maybe String -> Set Int -> Bool -> List AlertGroup -> Html Msg
defaultAlertGroups activeId activeGroups expandAll groups =
case groups of
Expand Down Expand Up @@ -178,7 +185,8 @@ alertGroup activeId activeGroups receiver labels routeLabels alerts groupId expa
div []
[ div [ class "mb-3" ] (expandButton :: labels_ ++ routeLabels_ ++ alertEl)
, if groupActive then
ul [ class "list-group mb-0" ] (List.map (AlertView.view labels activeId) alerts)
Html.Keyed.ul [ class "list-group mb-0" ]
(List.map (\alert -> ( alert.fingerprint, AlertView.view labels activeId alert )) alerts)

else
text ""
Expand Down
Loading