sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)
This commit is contained in:
1 parent
4f7f07504a
commit
8bc8b0e082
1651 files changed
+278599
-11416
No files matched your search
@@ -0,0 +1,24 @@
|
||||
"""Selected map engine for newly generated HTML pages."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from typing import Literal
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
HtmlMapEngine = Literal["echarts", "leaflet"]
|
||||
|
||||
|
||||
def html_map_engine() -> HtmlMapEngine:
|
||||
"""Return the admin-selected HTML map engine, defaulting to ECharts."""
|
||||
try:
|
||||
from deerflow.config.system_settings import load_system_settings
|
||||
|
||||
engine = load_system_settings().html_map.engine
|
||||
except Exception:
|
||||
logger.debug("Failed to read the HTML map engine; using ECharts", exc_info=True)
|
||||
return "echarts"
|
||||
if engine == "leaflet":
|
||||
return "leaflet"
|
||||
return "echarts"
|
||||
Reference in new issue
Block a user