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> </head>
<body> <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> </body>
<!-- Your source after making --> <!-- Your source after making -->

View File

@ -58,10 +58,10 @@ notFoundView model =
genericListView : (a -> Html Msg) -> List a -> Html Msg genericListView : (a -> Html Msg) -> List a -> Html Msg
genericListView fn list = genericListView fn list =
div ul
[ classList [ classList
[ ( "cf", True ) [ ( "list", True )
, ( "pa2", True ) , ( "pa0", True )
] ]
] ]
(List.map fn list) (List.map fn list)
@ -69,11 +69,31 @@ genericListView fn list =
silenceListView : Silence -> Html Msg silenceListView : Silence -> Html Msg
silenceListView silence = silenceListView silence =
a let
[ class "db link dim tc" -- TODO: Check with fabxc if the alert being in the first position can
, href ("#/silence/" ++ (toString silence.id)) -- be relied upon.
] alertName =
[ silenceView silence ] 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 silenceView : Silence -> Html msg