diff options
author | 2012-07-30 12:21:53 -0400 | |
---|---|---|
committer | 2012-07-30 12:21:53 -0400 | |
commit | 8d2667715b0508c538cf652e2dcfe2b8a47d1aff (patch) | |
tree | 440e4f66e153b0ba23a862902096f67dcd1a1cca /Assistant/Threads/WebApp.hs | |
parent | 40c997367544d72c6ab55eb96a1c3344fcf4012c (diff) |
prune old filler alerts
Diffstat (limited to 'Assistant/Threads/WebApp.hs')
-rw-r--r-- | Assistant/Threads/WebApp.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs index d26855910..5349ec2a4 100644 --- a/Assistant/Threads/WebApp.hs +++ b/Assistant/Threads/WebApp.hs @@ -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") |