diff --git a/app/public/static/package_charts.js b/app/public/static/package_charts.js index c58f77e4..2397d158 100644 --- a/app/public/static/package_charts.js +++ b/app/public/static/package_charts.js @@ -34,12 +34,18 @@ async function load_data() { const response = await fetch(source); const json = await response.json(); + document.getElementById("loading").style.display = "none"; + + if (json == null) { + document.getElementById("empty-view").style.display = "block"; + return; + } + const jsonOther = json.platform_minetest.map((value, i) => value + json.platform_other[i] - json.reason_new[i] - json.reason_dependency[i] - json.reason_update[i]); - document.getElementById("loading").style.display = "none"; root.style.display = "block"; function getData(list) { diff --git a/app/templates/packages/stats.html b/app/templates/packages/stats.html index 7992f7b6..13cf1bed 100644 --- a/app/templates/packages/stats.html +++ b/app/templates/packages/stats.html @@ -7,7 +7,7 @@ {% block scriptextra %} - + {% endblock %} {% block content %} @@ -35,6 +35,9 @@