Formatting

This commit is contained in:
stuart nelson 2016-11-06 22:03:38 +01:00
parent 809fa55bca
commit 0fac7c8a5b
2 changed files with 8 additions and 2 deletions

View File

@ -39,11 +39,15 @@ getSilence id =
Task.perform FetchFail SilenceFetchSucceed (Http.get showResponseDecoder url)
-- Make these generic when I've gotten to Alerts
showResponseDecoder : Json.Decoder Silence
showResponseDecoder =
(Json.at [ "data" ] silenceDecoder)
listResponseDecoder : Json.Decoder (List Silence)
listResponseDecoder =
Json.at [ "data", "silences" ] (Json.list silenceDecoder)

View File

@ -36,7 +36,7 @@ view model =
Debug.log "view: name" name
in
div []
(silenceView model.silence :: (List.map matcherView model.silence.matchers))
(silenceView model.silence :: (List.map matcherView model.silence.matchers))
_ ->
notFoundView model
@ -102,9 +102,11 @@ silenceView silence =
]
]
matcherView : Matcher -> Html msg
matcherView matcher =
dt [ class "m10 black w-100" ] [ text (String.join " " [matcher.name, "=", matcher.value]) ]
dt [ class "m10 black w-100" ] [ text (String.join " " [ matcher.name, "=", matcher.value ]) ]
objectData : String -> Html msg
objectData data =