prune old filler alerts
This commit is contained in:
parent
40c9973675
commit
8d2667715b
3 changed files with 43 additions and 16 deletions
|
@ -204,11 +204,12 @@ sideBarDisplay noScript = do
|
|||
{- Any yesod message appears as the first alert. -}
|
||||
maybe noop rendermessage =<< lift getMessage
|
||||
|
||||
{- Add newest 10 alerts to the sidebar. -}
|
||||
{- Add newest alerts to the sidebar. -}
|
||||
webapp <- lift getYesod
|
||||
alertpairs <- M.toList . alertMap
|
||||
<$> liftIO (getDaemonStatus $ daemonStatus webapp)
|
||||
mapM_ renderalert $ take 10 $ sortAlertPairs alertpairs
|
||||
mapM_ renderalert $
|
||||
take displayAlerts $ reverse $ sortAlertPairs alertpairs
|
||||
ident <- lift newIdent
|
||||
$(widgetFile "sidebar")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue