From 2894ba5860600176cc59f17de8889bd87bd31b45 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 28 Feb 2013 15:51:53 -0400 Subject: [PATCH] webapp: Only show up to 10 queued transfers. The transfer queue can grow larger than 10 when queueing transfers for files that were just received, as well as requeueing failed transfers. I probably need to do some work to prevent that, as it could use a lot of RAM. But for now, cap the number of displayed transfers in the webapp, to avoid flooding the browser. --- Assistant/WebApp/DashBoard.hs | 2 +- debian/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Assistant/WebApp/DashBoard.hs b/Assistant/WebApp/DashBoard.hs index a9666c8796..045202174b 100644 --- a/Assistant/WebApp/DashBoard.hs +++ b/Assistant/WebApp/DashBoard.hs @@ -33,7 +33,7 @@ transfersDisplay :: Bool -> Widget transfersDisplay warnNoScript = do webapp <- lift getYesod current <- lift $ M.toList <$> getCurrentTransfers - queued <- lift $ liftAssistant getTransferQueue + queued <- lift $ take 10 <$> liftAssistant getTransferQueue autoUpdate ident NotifierTransfersR (10 :: Int) (10 :: Int) let transfers = simplifyTransfers $ current ++ queued if null transfers diff --git a/debian/changelog b/debian/changelog index b927f8623a..1face2f522 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ git-annex (4.20130228) UNRELEASED; urgency=low * Stop depending on testpack. * Android: Enable test suite. + * webapp: Only show up to 10 queued transfers. -- Joey Hess Wed, 27 Feb 2013 23:20:40 -0400