From e2e785c12e46d837d05a94529f9bd45839b5aa2c Mon Sep 17 00:00:00 2001 From: George Lacey Date: Fri, 8 Apr 2022 10:31:58 +0100 Subject: [PATCH] Load repos and graphs concurrently --- borgweb/borg/static/borg/js/index.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/borgweb/borg/static/borg/js/index.js b/borgweb/borg/static/borg/js/index.js index e9543e4..68ecb13 100644 --- a/borgweb/borg/static/borg/js/index.js +++ b/borgweb/borg/static/borg/js/index.js @@ -26,15 +26,12 @@ window.addEventListener("DOMContentLoaded", function () { repo_list.labels.forEach(function (repo_label) { $.getJSON(`/repo/${repo_label}.json`, function (repo_json) { inflateRepo(repo_json, repo_label, template, container); - inflateSizeGraph() }) - function inflateSizeGraph() { - $.getJSON(`/repo/${repo_label}/size.json`, function (repo_size_json) { - draw_time_series_graph(`repo-${repo_label}-size-graph`, repo_size_json.repo, - repo_size_json.dates, repo_size_json.units); - }) - } + $.getJSON(`/repo/${repo_label}/size.json`, function (repo_size_json) { + draw_time_series_graph(`repo-${repo_label}-size-graph`, repo_size_json.repo, + repo_size_json.dates, repo_size_json.units); + }) }); })