diff --git a/app/deps.py b/app/deps.py index 894f0ff..66c6671 100644 --- a/app/deps.py +++ b/app/deps.py @@ -15,6 +15,9 @@ from .pulp_client import PulpClient TEMPLATES_DIR = Path(__file__).resolve().parent / "templates" templates = Jinja2Templates(directory=str(TEMPLATES_DIR)) +# 데모(가짜 데이터) 모드를 모든 템플릿에서 참조 가능하게 전역 노출 → 배너/배지로 명시. +# 설정은 lru_cache 라 프로세스 내 상수. 실연동 오인 방지용(스펙: 데모는 화면 확인 전용). +templates.env.globals["demo_mode"] = get_settings().pulp_demo def get_pulp_client() -> Iterator[PulpClient]: diff --git a/app/templates/partials/health.html b/app/templates/partials/health.html index 6c367a1..3a6da1b 100644 --- a/app/templates/partials/health.html +++ b/app/templates/partials/health.html @@ -1,4 +1,6 @@ -{% if online %} +{% if demo_mode %} +데모 모드 · 가짜 데이터 +{% elif online %} {{ detail }} {% else %} {{ detail }}