summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorRichard Wall <richard@aziz>2010-07-14 00:06:19 +0100
committerRichard Wall <richard@aziz>2010-07-14 00:06:19 +0100
commitf619f6f2974ffa59822dcb57baaf061d8986ff97 (patch)
treea0838cb031b289c7d631908292d75b2f6260fa80 /index.html
parent7f74405f80c8159eed0fa1f9535b86753f226141 (diff)
Limit the number of parallel downloads
Diffstat (limited to 'index.html')
-rw-r--r--index.html16
1 files changed, 12 insertions, 4 deletions
diff --git a/index.html b/index.html
index c848760..6018af7 100644
--- a/index.html
+++ b/index.html
@@ -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