Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Remove: domains crawled today

blueheron786e3a1371f179f
diff --git a/front-end/src/stats/index.html b/front-end/src/stats/index.html
index 59c4057..5b272d3 100644
--- a/front-end/src/stats/index.html
+++ b/front-end/src/stats/index.html
@@ -81,13 +81,6 @@
</div>
</div>
</section>
- <section>
- <div class="info tall">
- <div class="wrap tall">
- <canvas id="urls-by-domain"></canvas>
- </div>
- </div>
- </section>
<script src="./stats.js" type="module"></script>
</body>
</html>
diff --git a/front-end/src/stats/stats.js b/front-end/src/stats/stats.js
index 073e92c..b38dd47 100644
--- a/front-end/src/stats/stats.js
+++ b/front-end/src/stats/stats.js
@@ -52,27 +52,7 @@ import {Chart} from "chart.js/auto";
maintainAspectRatio: false
}
});
-
- const urlsByDomainCanvas = document.getElementById('urls-by-domain');
- const byDomainChart = new Chart(urlsByDomainCanvas, {
- type: 'bar',
- data: {
- datasets: [{
- label: "Top domains",
- borderWidth: 1
- }]
- },
- options: {
- scales: {
- x: {
- beginAtZero: true
- }
- },
- indexAxis: 'y',
- maintainAspectRatio: false
- }
- });
-
+
function numberWithCommas(x) {
// From https://stackoverflow.com/a/2901298/660902
if (x == null) return "0";
@@ -119,10 +99,6 @@ function numberWithCommas(x) {
byUserChart.data.datasets[0].data = stats.top_user_results.map(u => u[1]);
byUserChart.update();
- byDomainChart.data.labels = stats.top_domains.map(d => d[0]);
- byDomainChart.data.datasets[0].data = stats.top_domains.map(d => d[1]);
- byDomainChart.update();
-
datasetQueriesDailyChart.data.labels = Object.keys(stats.dataset_queries_daily);
datasetQueriesDailyChart.data.datasets[0].data = Object.values(stats.dataset_queries_daily);
datasetQueriesDailyChart.update();