Skip to content
Snippets Groups Projects
Verified Commit 15fa5390 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Better homepage

parent 3235ac5f
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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):
......
......@@ -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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment