module Web.View.AdaptiveThresholds.Index where import Web.View.Prelude import Data.Time (diffUTCTime) data IndexView = IndexView { hubs :: ![Hub] , configs :: ![AdaptiveThresholdConfig] , insights :: ![LearningInsight] } instance View IndexView where html IndexView { .. } = [hsx|
{i.title}
{i.body}
{show i.computedAt}
Not calibrated
|] renderCfgStatus (Just cfg) = [hsx|Last calibrated: {show cfg.calibrationDate}
{maybe "" id cfg.notes}
|]