网络页焕新:IP 画像/质量检测、链路诊断与功能开关
新增 /ip_profile、/ip_quality API 与网络 UI 组件,默认隐藏摄像头/拉流导航;同步更新 README。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
22
web2_feature_flags.py
Normal file
22
web2_feature_flags.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""功能开关:隐藏/屏蔽 UI 与 API,保留底层实现文件。"""
|
||||
|
||||
SHOW_CAMERA_FEATURE = False
|
||||
SHOW_PULL_STREAM_FEATURE = False
|
||||
|
||||
|
||||
def is_disabled_stream_worker_pm2(name: str) -> bool:
|
||||
low = (name or "").strip().lower()
|
||||
if not SHOW_CAMERA_FEATURE and low.startswith("camera"):
|
||||
return True
|
||||
if not SHOW_PULL_STREAM_FEATURE and low.startswith("pull_stream"):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def is_disabled_stream_worker_script(script: str) -> bool:
|
||||
stem = (script or "").strip().lower().removesuffix(".py")
|
||||
if not SHOW_CAMERA_FEATURE and stem.startswith("camera"):
|
||||
return True
|
||||
if not SHOW_PULL_STREAM_FEATURE and stem.startswith("pull_stream"):
|
||||
return True
|
||||
return False
|
||||
Reference in New Issue
Block a user