1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-19 10:37:01 +00:00

ui: Add fontawesome-free, use in status & mailbox

This commit is contained in:
James Hillyerd
2018-12-23 13:55:43 -08:00
parent 1a8b5184cd
commit 6189b56b79
7 changed files with 1493 additions and 1465 deletions

View File

@@ -261,6 +261,7 @@ configPanel maybeConfig =
Just config ->
framePanel "Configuration"
"fa-cog"
[ textEntry "Version" (config.version ++ ", built on " ++ config.buildDate)
, textEntry "SMTP Listener" config.smtpConfig.addr
, textEntry "POP3 Listener" config.pop3Listener
@@ -337,6 +338,7 @@ metricPanels model =
Just metrics ->
[ framePanel "General Metrics"
"fa-tachometer-alt"
[ textEntry "Uptime" <|
"Started "
++ Relative.relativeTime model.now metrics.startTime
@@ -348,6 +350,7 @@ metricPanels model =
, viewMetric model.webSockets
]
, framePanel "SMTP Metrics"
"fa-envelope"
[ viewMetric model.smtpConnOpen
, viewMetric model.smtpConnTotal
, viewMetric model.smtpReceivedTotal
@@ -355,6 +358,7 @@ metricPanels model =
, viewMetric model.smtpWarnsTotal
]
, framePanel "Storage Metrics"
"fa-archive"
[ textEntry "Retention Scan" (retentionScan model)
, viewMetric model.retentionDeletesTotal
, viewMetric model.retainedCount
@@ -495,10 +499,18 @@ graphZero data =
]
framePanel : String -> List (Html a) -> Html a
framePanel name html =
framePanel : String -> String -> List (Html a) -> Html a
framePanel name icon html =
let
fontIcon cn =
i [ class ("fas " ++ cn) ] []
in
div [ class "metric-panel" ]
[ h2 [] [ text name ]
[ h2 []
[ fontIcon icon
, text " "
, text name
]
, div [ class "metrics" ] html
]