diff options
author | Richard Wall <richard@aziz> | 2010-07-14 00:06:19 +0100 |
---|---|---|
committer | Richard Wall <richard@aziz> | 2010-07-14 00:06:19 +0100 |
commit | f619f6f2974ffa59822dcb57baaf061d8986ff97 (patch) | |
tree | a0838cb031b289c7d631908292d75b2f6260fa80 /index.html | |
parent | 7f74405f80c8159eed0fa1f9535b86753f226141 (diff) |
Limit the number of parallel downloads
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -43,6 +43,14 @@ * Setup chart date range controls and all charts **/ + var p = new jarmon.Parallimiter(1); + function serialDownloader(url) { + return p.addCallable( + function() { + return jarmon.downloadBinary(url); + }); + } + // Extract the chart template from the page var chartTemplate = $('.chart-container').remove(); @@ -71,19 +79,19 @@ jarmon.COLLECTD_RECIPES.cpu, jarmon.COLLECTD_RECIPES.memory, jarmon.COLLECTD_RECIPES.load), - templateFactory('.system-charts')), + templateFactory('.system-charts'), serialDownloader), jarmon.Chart.fromRecipe( rrdUrlList, jarmon.COLLECTD_RECIPES.interface, - templateFactory('.network-charts')), + templateFactory('.network-charts'), serialDownloader), jarmon.Chart.fromRecipe( rrdUrlList, jarmon.COLLECTD_RECIPES.dns, - templateFactory('.dns-charts')), + templateFactory('.dns-charts'), serialDownloader), jarmon.Chart.fromRecipe( rrdUrlList, application_recipes, - templateFactory('.application-charts')) + templateFactory('.application-charts'), serialDownloader) ); // Show a loading icon when a chart is being redrawn |