mirror of https://github.com/CIRCL/lookyloo
fix: Remove yearly redirects
parent
6b07885d68
commit
6e1c41da8e
|
@ -1477,7 +1477,7 @@ class Lookyloo():
|
|||
statistics['weeks'].append(week_stat)
|
||||
|
||||
for year in sorted(stats.keys()):
|
||||
year_stats: Dict[str, Union[int, List]] = {'year': year, 'months': [], 'yearly_submissions': 0, 'yearly_redirects': 0}
|
||||
year_stats: Dict[str, Union[int, List]] = {'year': year, 'months': [], 'yearly_submissions': 0}
|
||||
for month in sorted(stats[year].keys()):
|
||||
month_stats = stats[year][month]
|
||||
if len(month_stats) == 1:
|
||||
|
@ -1491,8 +1491,6 @@ class Lookyloo():
|
|||
|
||||
year_stats['months'].append(month_stats) # type: ignore
|
||||
year_stats['yearly_submissions'] += month_stats['submissions']
|
||||
if 'redirects' in month_stats:
|
||||
year_stats['yearly_redirects'] += month_stats['redirects']
|
||||
statistics['years'].append(year_stats)
|
||||
|
||||
return statistics
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"redirect.png": "PAjzlPV97rEFvH55mG1ZC9wRl98be3yMeX/nENuFkJcds6/AXgSR2ig/QyPULgobSnNgiYieLVWY/oqsgeywrQ==",
|
||||
"secure.svg": "H8ni7t0d60nCJDVGuZpuxC+RBy/ipAjWT627D12HlZGg6LUmjSwPTQTUekm3UJupEP7TUkhXyq6WHc5gy7QBjg==",
|
||||
"stats.css": "/kY943FwWBTne4IIyf7iBROSfbGd82TeBicEXqKkRwawMVRIvM/Pk5MRa7okUyGIxaDjFQGmV/U1vy+PhN6Jbw==",
|
||||
"stats_graph.js": "TwQlHlfbYZxewL3291UzoKERoUhI5aRPUdNnM2B88vpxV5xkXchILRELpVqWB1WI/QO4m9f0PgiExlxCchqsXA==",
|
||||
"stats_graph.js": "S/sMNQK1UMMLD0xQeEa7sq3ce8o6oPxwxGlyKVtaHOODjair86dbBDm7cu6pa/elMRDJT1j09jEFjWp+5GbhTw==",
|
||||
"tree.css": "R/pWQnE8kMacDrzGy/NpA1tJoHAZpOjFiX6dqtBe+PqAnhYMn1CIQzODh8Ifvh6hBTPLRWX3bsabfEvfaI7Z6A==",
|
||||
"tree.js": "yutMvl9vXhN0htkl40tRHF3r5LCDsH+MJplB6ihMENIsMryEyVoTr4Zq1UadgMG5tP+W2/jqm2zfXh414Kk8AA==",
|
||||
"up.jpg": "d1ljZJ9f5JekyM6RLFFH2Ua44j6neiQBdUIXOenRTjGppQr3JaeglpQIH6BjPCJL177+TH52U3UIRNS5YAyKIg==",
|
||||
|
|
|
@ -8,18 +8,12 @@ d3.json('/json/stats').then(json => {
|
|||
var datasets = []
|
||||
json.years.forEach(year => {
|
||||
var submissions_year = { label: `Submissions ${year.year}`, x: [], y: [] }
|
||||
var unique_urls_year = { label: `Unique URLs ${year.year}`, x: [], y: [] }
|
||||
year.months.forEach(month => {
|
||||
submissions_year.x.push(month.month_number)
|
||||
unique_urls_year.x.push(month.month_number)
|
||||
|
||||
submissions_year.y.push(month.submissions)
|
||||
if (month.uniq_urls != null) {
|
||||
unique_urls_year.y.push(month.uniq_urls)
|
||||
}
|
||||
});
|
||||
datasets.push(submissions_year)
|
||||
datasets.push(unique_urls_year)
|
||||
});
|
||||
|
||||
var x_scale = d3.scaleLinear()
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
<h2>Year: {{ year['year'] }}</h2>
|
||||
<ul>
|
||||
<li><b>Total submissions</b>: {{ year['yearly_submissions'] }}</li>
|
||||
<li><b>Total redirects</b>: {{ year['yearly_redirects'] }}</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div class="table-responsive">
|
||||
|
|
Loading…
Reference in New Issue