mirror of
https://github.com/prometheus/alertmanager
synced 2025-01-08 15:00:10 +00:00
WIP on redesign
This commit is contained in:
parent
0fac7c8a5b
commit
4329fdb671
15
index.html
15
index.html
@ -7,7 +7,20 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<header class="bg-black-90 fixed w-100 ph3 pv3 pv4-ns ph4-m ph5-l">
|
||||
<nav class="f6 fw6 ttu tracked">
|
||||
<a class="link dim white dib mr3" href="#" title="Home">AlertManager</a>
|
||||
<a class="link dim white dib mr3" href="#/alerts" title="Alerts">Alerts</a>
|
||||
<a class="link dim white dib mr3" href="#/silences" title="Silences">Silences</a>
|
||||
<a class="link dim white dib" href="#/status" title="Status">Status</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<!-- Container -->
|
||||
<div class="pt6 w-100 center pa3">
|
||||
<div id="app"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
<!-- Your source after making -->
|
||||
|
@ -58,10 +58,10 @@ notFoundView model =
|
||||
|
||||
genericListView : (a -> Html Msg) -> List a -> Html Msg
|
||||
genericListView fn list =
|
||||
div
|
||||
ul
|
||||
[ classList
|
||||
[ ( "cf", True )
|
||||
, ( "pa2", True )
|
||||
[ ( "list", True )
|
||||
, ( "pa0", True )
|
||||
]
|
||||
]
|
||||
(List.map fn list)
|
||||
@ -69,11 +69,31 @@ genericListView fn list =
|
||||
|
||||
silenceListView : Silence -> Html Msg
|
||||
silenceListView silence =
|
||||
a
|
||||
[ class "db link dim tc"
|
||||
, href ("#/silence/" ++ (toString silence.id))
|
||||
]
|
||||
[ silenceView silence ]
|
||||
let
|
||||
-- TODO: Check with fabxc if the alert being in the first position can
|
||||
-- be relied upon.
|
||||
alertName =
|
||||
case List.head silence.matchers of
|
||||
Just m ->
|
||||
m.value
|
||||
|
||||
Nothing ->
|
||||
""
|
||||
in
|
||||
li
|
||||
[ class "pa3 pa4-ns bb b--black-10" ]
|
||||
[ a
|
||||
[ class "db link dim blue"
|
||||
, href ("#/silence/" ++ (toString silence.id))
|
||||
]
|
||||
[ b [ class "db f4 mb1" ]
|
||||
[ text alertName ]
|
||||
]
|
||||
, span [ class "f5 db lh-copy measure" ]
|
||||
[ text silence.createdBy ]
|
||||
, span [ class "f5 db lh-copy measure" ]
|
||||
[ text silence.comment ]
|
||||
]
|
||||
|
||||
|
||||
silenceView : Silence -> Html msg
|
||||
|
Loading…
Reference in New Issue
Block a user