s
This commit is contained in:
@@ -35,6 +35,7 @@ from src.android_control import (
|
||||
from src.scrcpy_stream import cleanup_scrcpy_session, open_scrcpy_h264_stream, scrcpy_stream_info
|
||||
from src.scrcpy_vendor import ensure_scrcpy_jar
|
||||
from src.control_plane import (
|
||||
deployment_report,
|
||||
delete_root_file,
|
||||
list_root_files,
|
||||
list_root_summaries,
|
||||
@@ -45,6 +46,7 @@ from src.control_plane import (
|
||||
stack_summary,
|
||||
system_snapshot,
|
||||
write_root_file,
|
||||
load_stack_env,
|
||||
)
|
||||
from src.redroid_control import redroid_action, redroid_runtime_summary
|
||||
from src.hdmi_control import hdmi_capture_summary, hdmi_ffmpeg_probe
|
||||
@@ -622,7 +624,23 @@ async def get_process_info(process: str) -> dict:
|
||||
# ---------------- 服务信息(前端可展示 PM2 / 本地后端) ----------------
|
||||
@app.get("/health")
|
||||
async def health():
|
||||
return {"status": "ok"}
|
||||
await process_backend.ensure_mode()
|
||||
stack = stack_summary()
|
||||
env = load_stack_env()
|
||||
return {
|
||||
"status": "ok",
|
||||
"process_backend": process_backend.mode,
|
||||
"console_built": (CONSOLE_OUT / "index.html").is_file(),
|
||||
"stack_env_present": (CONFIG_DIR / "system-stack.env").is_file(),
|
||||
"port": env.get("PORT", os.environ.get("PORT", "8001")),
|
||||
"mdns_host": stack.get("mdns_host"),
|
||||
"control_url": stack.get("control_url"),
|
||||
}
|
||||
|
||||
|
||||
@app.get("/deploy/check")
|
||||
async def deploy_check():
|
||||
return await asyncio.to_thread(deployment_report)
|
||||
|
||||
|
||||
@app.get("/server_info")
|
||||
|
||||
Reference in New Issue
Block a user