Skip to content

beacon

BeaconRouter #

Bases: APIRouter

Source code in cogip/tools/dashboard/routes/beacon.py
 6
 7
 8
 9
10
11
12
13
14
15
class BeaconRouter(APIRouter):
    def __init__(self, templates: Jinja2Templates, *args, **kwargs):
        super().__init__(*args, **kwargs)

        @self.get("/", response_class=HTMLResponse)
        async def index(request: Request):
            """
            Homepage of the dashboard web server.
            """
            return templates.TemplateResponse("dashboard.html", {"request": request})

__init__(templates, *args, **kwargs) #

Source code in cogip/tools/dashboard/routes/beacon.py
 7
 8
 9
10
11
12
13
14
15
def __init__(self, templates: Jinja2Templates, *args, **kwargs):
    super().__init__(*args, **kwargs)

    @self.get("/", response_class=HTMLResponse)
    async def index(request: Request):
        """
        Homepage of the dashboard web server.
        """
        return templates.TemplateResponse("dashboard.html", {"request": request})