WIP on redesign

This commit is contained in:
stuart nelson 2016-11-20 17:42:21 +01:00
parent 0fac7c8a5b
commit 4329fdb671
2 changed files with 42 additions and 9 deletions

View File

@ -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 -->

View File

@ -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