🩹 — Fix a relative path bug

This commit is contained in:
Luc Didry 2024-04-25 13:35:10 +02:00
parent 02a4d5c30b
commit 1e36878688
No known key found for this signature in database
GPG key ID: EA868E12D0257E3C

View file

@ -1,6 +1,7 @@
"""Web interface for humans"""
from collections import defaultdict
from functools import cmp_to_key
from os import path
from typing import Annotated
from urllib.parse import urlparse
@ -17,7 +18,8 @@ from argos.server.routes.dependencies import get_config, get_db
route = APIRouter()
templates = Jinja2Templates(directory="argos/server/templates")
current_dir = path.dirname(__file__)
templates = Jinja2Templates(directory=path.join(current_dir, "../templates"))
SEVERITY_LEVELS = {"ok": 1, "warning": 2, "critical": 3, "unknown": 4}