diff --git a/funkwhale_network/index.html b/funkwhale_network/index.html index 5d50dc90f56116b1a1834e32fda548aab585a691..63d1143561f881d50d6e8bfa4e85a526340b266d 100644 --- a/funkwhale_network/index.html +++ b/funkwhale_network/index.html @@ -16,6 +16,11 @@ </header> <p>Welcome on the Funkwhale Network Observatory, where you can get information about the Funkwhale Network!</p> <p>This project aims to gather anonymous data and statistics about existing Funkwhale servers, to monitor the state of the network.</li> + <section> + <h2>Dashboards</h2> + <p>We offer a collection of dashboards to dive in the data.</p> + <a href="{settings.GF_SERVER_ROOT_URL}" class="pure-button pure-button-primary">Go to the dashboards</a> + </section> <section> <h2>Submit a new instance</h2> <p>If you own an instance and want to see it tracked, simply fill in the instance domain name in the form below.</p> diff --git a/funkwhale_network/routes.py b/funkwhale_network/routes.py index 325a96e6629fd31a128c04bb9cce05f371b4db56..7cd614a0ebb93684eaf790c53592703afa1218a1 100644 --- a/funkwhale_network/routes.py +++ b/funkwhale_network/routes.py @@ -8,6 +8,7 @@ from . import crawler from . import db from . import exceptions from . import serializers +from . import settings BASE_DIR = os.path.dirname(os.path.abspath(__file__)) STATIC_DIR = os.path.join(BASE_DIR, "static") @@ -30,7 +31,9 @@ def validate_domain(raw): async def index(request): with open(os.path.join(BASE_DIR, "index.html"), "r") as f: index_html = f.read() - return web.Response(text=index_html, content_type="text/html") + return web.Response( + text=index_html.format(settings=settings), content_type="text/html" + ) async def domains(request): diff --git a/funkwhale_network/settings.py b/funkwhale_network/settings.py index 799bbd83dee57584a58bb0c4de8ea527e290c804..644faaf9e1fbfbe539e480e4cd3745c3c9b50baa 100644 --- a/funkwhale_network/settings.py +++ b/funkwhale_network/settings.py @@ -21,6 +21,7 @@ from . import middlewares MIDDLEWARES = [middlewares.conn_middleware] PORT = env.int("APP_PORT", default=8000) +GF_SERVER_ROOT_URL = env("GF_SERVER_ROOT_URL", default="/dashboards/") REDIS_CONFIG = { "host": env("REDIS_HOST", default="localhost"), "port": env.int("REDIS_PORT", default=6379),