added icon to show inhibited status

Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
This commit is contained in:
James Ritchie 2019-05-01 08:22:41 +00:00
parent c63d4b7584
commit a6bdc73fa4
2 changed files with 18 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -47,6 +47,7 @@ view labels maybeActiveId alert =
Nothing ->
text ""
, silenceButton alert
, inhibitedIcon alert
]
, if maybeActiveId == Just alert.fingerprint then
table [ class "table w-100 mb-1" ] (List.map annotation <| Dict.toList alert.annotations)
@ -117,3 +118,18 @@ silenceButton alert =
[ i [ class "fa fa-bell-slash-o mr-2" ] []
, text "Silence"
]
inhibitedIcon : GettableAlert -> Html Msg
inhibitedIcon alert =
case List.head alert.status.inhibitedBy of
Just sId ->
a
[ class "btn btn-outline-info border-0 text-info"
]
[ i [ class "fa fa-eye-slash mr-2" ] []
, text "Inhibited"
]
Nothing ->
text ""