From 6a2719071f78922c60cdc55b420275358b1d461b Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Mon, 22 Nov 2021 12:05:13 +0100 Subject: [PATCH] chore(status): add time and container version to status page --- src/Handler/Health.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Handler/Health.hs b/src/Handler/Health.hs index 0bb11765b..f0229160c 100644 --- a/src/Handler/Health.hs +++ b/src/Handler/Health.hs @@ -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 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))