diff --git a/src/Handler/Health.hs b/src/Handler/Health.hs index e06f688ae..69db731e1 100644 --- a/src/Handler/Health.hs +++ b/src/Handler/Health.hs @@ -6,6 +6,7 @@ module Handler.Health where import Import +import Data.Time.Format.ISO8601 (iso8601Show) import Handler.Utils.DateTime (formatTimeW) import qualified Data.Aeson.Encode.Pretty as Aeson @@ -77,12 +78,12 @@ getHealthR = do #{boolSymbol (healthOk hcstatus)} # $case report $of HealthLDAPAdmins (Just found) - #{textPercent found 1} + #{textPercent found 1} $of HealthActiveJobExecutors (Just active) #{textPercent active 1} $of _
Environment version #{env_ver} -
- Current Time
- #{show currtime}
- Instance Start
+ Current Time
+ #{show currtime}
+
+ Instance Start
#{show starttime} #
- Uptime: #{show $ ddays starttime currtime} days.
+ Uptime: #{diffTime starttime}
Compile Time
#{show cTime} #
- Build age: #{show $ ddays cTime currtime} days.
+ Build age: #{diffTime cTime}
|]
- where
- -- vnr_full :: Text = $(embedStringFile "nix/docker/version.json") -- nix/ files not accessible during container construction
+ where
+ -- vnr_full :: Text = $(embedStringFile "nix/docker/version.json") -- nix/ files not accessible during container construction
cTime :: UTCTime
- cTime = $compileTime
-
- ddays :: UTCTime -> UTCTime -> Double
- ddays tstart tstop = (/100) $ fromIntegral $ round $ diffUTCTime tstop tstart / (36 * 24)
+ cTime = $compileTime
\ No newline at end of file