diff --git a/app/templates/navbar.html b/app/templates/navbar.html
index 314c64c..5dbbe77 100644
--- a/app/templates/navbar.html
+++ b/app/templates/navbar.html
@@ -7,6 +7,9 @@
Outdated Packages
+
+ Traffic Stats
+
Repos
diff --git a/app/templates/stats.html b/app/templates/stats.html
new file mode 100644
index 0000000..38a8c0f
--- /dev/null
+++ b/app/templates/stats.html
@@ -0,0 +1,18 @@
+{% extends "layout.html" %}
+{% block title %}Traffic Stats{% endblock %}
+{% block inner_content %}
+
+
+
+
+
+{% endblock %}
diff --git a/app/web.py b/app/web.py
index 36e70f1..9343bab 100644
--- a/app/web.py
+++ b/app/web.py
@@ -147,6 +147,11 @@ async def repos(request: Request, response: Response) -> Response:
return templates.TemplateResponse("repos.html", {"request": request, "repos": get_repositories()}, headers=dict(response.headers))
+@router.get('/stats', dependencies=[Depends(Etag(get_etag))])
+async def stats(request: Request, response: Response) -> Response:
+ return templates.TemplateResponse("stats.html", {"request": request}, headers=dict(response.headers))
+
+
@router.get('/', dependencies=[Depends(Etag(get_etag))])
async def index(request: Request, response: Response) -> Response:
return RedirectResponse(request.url_for('queue'), headers=dict(response.headers))
diff --git a/tests/test_main.py b/tests/test_main.py
index 67c9c5e..1912847 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -25,7 +25,7 @@ def client():
@pytest.mark.parametrize("endpoint", [
'', 'repos', 'base', 'group', 'updates', 'outofdate', 'queue', 'new',
'search', 'base/foo', 'group/foo', 'package/foo',
- 'package',
+ 'package', 'stats',
])
def test_main_endpoints(client, endpoint):
r = client.get('/' + endpoint)