fix(observability): serve CSS from Flask static path
All checks were successful
CD Pipeline / deploy (push) Successful in 1m34s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m34s
This commit is contained in:
@@ -44,6 +44,7 @@ OBSERVABILITY_NAV_ITEMS = [
|
||||
]
|
||||
|
||||
CSS_PATH = Path("static/css/observability-system.css")
|
||||
WEB_CSS_PATH = Path("web/static/css/observability-system.css")
|
||||
SHELL_PATH = Path("templates/components/_ewoooc_shell.html")
|
||||
BASE_PATH = Path("templates/ewoooc_base.html")
|
||||
ROUTE_PATH = Path("routes/admin_observability_routes.py")
|
||||
@@ -192,6 +193,18 @@ def scan_css() -> list[str]:
|
||||
if snippet not in text:
|
||||
findings.append(f"{CSS_PATH}: missing required token/class `{snippet}`")
|
||||
|
||||
web_path = ROOT / WEB_CSS_PATH
|
||||
if not web_path.exists():
|
||||
findings.append(
|
||||
f"{WEB_CSS_PATH}: missing mirrored CSS served by Flask static route"
|
||||
)
|
||||
else:
|
||||
web_text = web_path.read_text(encoding="utf-8")
|
||||
if web_text != text:
|
||||
findings.append(
|
||||
f"{WEB_CSS_PATH}: must match {CSS_PATH} so production /static CSS is in sync"
|
||||
)
|
||||
|
||||
return findings
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user