UI redesign v2: modern ant/mono design + app version (v2.0.0)
Test / Tests (Python 3.12) (push) Canceled after 0s
Test / Tests (Python 3.12) (push) Canceled after 0s
This commit is contained in:
@@ -48,6 +48,9 @@ for _d in (UPLOAD_DIR, OUTPUT_DIR, WORK_DIR):
|
||||
|
||||
MAX_UPLOAD_MB = 400
|
||||
|
||||
# Semantic version exposed by /health so the UI can show "vX.Y.Z" in the footer.
|
||||
APP_VERSION = "2.0.0"
|
||||
|
||||
# req 3 (health): supported formats advertised to clients. Additive key — the
|
||||
# existing /health contract asserts only status + max_upload_mb.
|
||||
SUPPORTED_FORMATS = ["epub", "html", "htm", "md", "markdown", "txt", "log",
|
||||
@@ -623,10 +626,10 @@ def health():
|
||||
if not _cjk_fonts_present():
|
||||
problems.append("CJK fonts missing (fc-list found none)")
|
||||
body = {"status": "ok", "max_upload_mb": MAX_UPLOAD_MB,
|
||||
"supported_formats": SUPPORTED_FORMATS}
|
||||
"supported_formats": SUPPORTED_FORMATS, "version": APP_VERSION}
|
||||
if problems:
|
||||
body = {"status": "degraded", "max_upload_mb": MAX_UPLOAD_MB,
|
||||
"supported_formats": SUPPORTED_FORMATS, "problems": problems}
|
||||
"supported_formats": SUPPORTED_FORMATS, "version": APP_VERSION, "problems": problems}
|
||||
return jsonify(body), 503
|
||||
return jsonify(body), 200
|
||||
|
||||
|
||||
Reference in New Issue
Block a user