Skip to content

Commit e20d804

Browse files
committed
ci: retry build
Signed-off-by: Cody Kaczynski <ckaczyns@akamai.com>
1 parent e713404 commit e20d804

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

ui/app/src/Data/Receiver.elm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ import Json.Encode as Encode
2020

2121
type alias Receiver =
2222
{ name : String
23-
, labels : Dict String String
23+
, labels : Maybe (Dict String String)
2424
}
2525

2626

2727
decoder : Decoder Receiver
2828
decoder =
2929
Decode.succeed Receiver
3030
|> required "name" Decode.string
31-
|> optional "labels" (Decode.dict Decode.string) Dict.empty
31+
|> optional "labels" (Decode.maybe (Decode.dict Decode.string)) Nothing
3232

3333

3434
encoder : Receiver -> Encode.Value
3535
encoder model =
3636
Encode.object
3737
[ ( "name", Encode.string model.name )
38-
, ( "labels", Encode.dict identity Encode.string model.labels )
38+
, ( "labels", Maybe.withDefault (Encode.object []) (Maybe.map (Encode.dict identity Encode.string) model.labels) )
3939
]

ui/app/src/Views/AlertList/Updates.elm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ port module Views.AlertList.Updates exposing (update)
33
import Alerts.Api as Api
44
import Browser.Navigation as Navigation
55
import Data.AlertGroup exposing (AlertGroup)
6+
import Data.Receiver exposing (Receiver)
67
import Dict
78
import Set
89
import Task
@@ -44,7 +45,7 @@ update msg ({ groupBar, alerts, filterBar, receiverBar, alertGroups } as model)
4445
|> Dict.toList
4546
|> List.map
4647
(\( labels, alerts_ ) ->
47-
AlertGroup (Dict.fromList labels) { name = "unknown", labels = Dict.empty } alerts_
48+
AlertGroup (Dict.fromList labels) (Receiver "unknown" Nothing) alerts_
4849
)
4950

5051
newGroupBar =

0 commit comments

Comments
 (0)