chore(status): add time and container version to status page

This commit is contained in:
Steffen Jost 2021-11-22 12:05:13 +01:00
parent e17b74741e
commit 6a2719071f

View File

@ -101,26 +101,30 @@ getInstanceR = do
-- Most simple page for simple liveness checks
getStatusR :: Handler Html
getStatusR = withUrlRenderer
getStatusR = do
currtime <- show <$> liftIO getCurrentTime
withUrlRenderer
[hamlet|
$doctype 5
<html lang=en>
<head>
<title>Alive
<body>
<p>
Current Time {#{currtime}}
<p>
Compile Time {#{comptime}}
<p>
Alive #{vnr_full}
|]
{-
<p>
Alive #{vnr_full}
<p>
Demo #{vnr_demo}
<p>
CI #{vnr_ci}
-}
where
-- vnr_full :: Text = $(embedStringFile "./nix/docker/version.json")
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")
comptime :: Text = $(stringE =<< runIO (show <$> getCurrentTime))