Skip to content

Instantly share code, notes, and snippets.

@amitaibu amitaibu/status.elm
Created Jul 10, 2018

Embed
What would you like to do?
type alias Site =
{ label : String
, machineName : String
, statusCount : EveryDict Status Int
-- For UI puropses
, showStatus : EveryDict Status Bool
}
type Status
= Critical
| Warning
| Ok
getCount : Status -> EveryDict Status Int -> Int
getCount status dict =
EveryDict.get status dict
|> Maybe.withDefault 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.