chore(status): add very simple status page with nix/docker/version numbers
This commit is contained in:
parent
ca7a4d917f
commit
426af0f183
1
routes
1
routes
@ -69,6 +69,7 @@
|
||||
/info/glossary GlossaryR GET !free
|
||||
/info/faq FaqR GET !free
|
||||
/version VersionR GET !free
|
||||
/status StatusR GET !free
|
||||
|
||||
/help HelpR GET POST !free
|
||||
|
||||
|
||||
@ -132,6 +132,7 @@ breadcrumb HelpR = i18nCrumb MsgMenuHelp Nothing
|
||||
|
||||
breadcrumb HealthR = i18nCrumb MsgMenuHealth Nothing
|
||||
breadcrumb InstanceR = i18nCrumb MsgMenuInstance Nothing
|
||||
breadcrumb StatusR = i18nCrumb MsgMenuHealth Nothing -- never displayed
|
||||
|
||||
breadcrumb ProfileR = i18nCrumb MsgBreadcrumbProfile Nothing
|
||||
breadcrumb SetDisplayEmailR = i18nCrumb MsgUserDisplayEmail $ Just ProfileR
|
||||
|
||||
@ -11,6 +11,8 @@ import qualified Data.Set as Set
|
||||
|
||||
import Control.Concurrent.STM.Delay
|
||||
|
||||
import Data.FileEmbed (embedStringFile)
|
||||
|
||||
|
||||
getHealthR :: Handler TypedContent
|
||||
getHealthR = do
|
||||
@ -94,3 +96,25 @@ getInstanceR = do
|
||||
|]
|
||||
provideJson instanceInfo
|
||||
provideRep . return $ tshow instanceInfo
|
||||
|
||||
-- Most simple page for simple liveness checks
|
||||
getStatusR :: Handler Html
|
||||
getStatusR = withUrlRenderer
|
||||
[hamlet|
|
||||
$doctype 5
|
||||
<html lang=en>
|
||||
<head>
|
||||
<title>Alive
|
||||
<body>
|
||||
<p>
|
||||
Alive #{vnr_full}
|
||||
<p>
|
||||
Demo #{vnr_demo}
|
||||
<p>
|
||||
CI #{vnr_ci}
|
||||
|]
|
||||
where
|
||||
vnr_full :: Text = $(embedStringFile "nix/docker/version.json")
|
||||
vnr_demo :: Text = $(embedStringFile "nix/docker/demo-version.json")
|
||||
vnr_ci :: Text = $(embedStringFile "nix/docker/ci-version.json")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user