A Python port of the Invisible Internet Project (I2P)
1"""Dashboard routes — main console page and summary.
2
3Serves the root page and /console with router status overview.
4
5Ported from net.i2p.router.web.helpers.SummaryHelper / HomeHelper.
6"""
7
8from __future__ import annotations
9
10from flask import Blueprint, render_template, current_app
11
12bp = Blueprint("dashboard", __name__)
13
14
15@bp.route("/")
16@bp.route("/console")
17def index():
18 """Render the main dashboard page."""
19 ctx = current_app.config["CONSOLE_CONTEXT"]
20 return render_template(
21 "dashboard.html",
22 status=ctx.status,
23 network=ctx.network_status,
24 version=ctx.version,
25 )