30 lines
1.2 KiB
Python
30 lines
1.2 KiB
Python
"""Web 层蓝图包:web_server.py 只保留 app 初始化与装配,路由按功能域拆分。
|
|
|
|
模块划分(按功能定位问题):
|
|
auth — 登录/登出/CSRF/权限装饰器/页面路由(/、/wall)
|
|
monitor — 状态/运行控制/设备操作/远程看屏
|
|
tasks — 任务计划/分组/自定义动作/元素抓取/步骤测试
|
|
admin — 用户管理/日志
|
|
tools — adb 终端/剪贴板注入/应用版本
|
|
devices — 设备池管理
|
|
apks — 应用管理
|
|
tailscale — Tailscale 管理
|
|
"""
|
|
from flask import Blueprint
|
|
|
|
|
|
def register_blueprints(app):
|
|
"""注册全部蓝图(url_prefix 为空,路由路径保持原样)。"""
|
|
from .auth import bp as auth_bp
|
|
from .monitor import bp as monitor_bp
|
|
from .tasks_api import bp as tasks_bp
|
|
from .admin_api import bp as admin_bp
|
|
from .tools_api import bp as tools_bp
|
|
from .devices_api import bp as devices_bp
|
|
from .apks_api import bp as apks_bp
|
|
from .tailscale_api import bp as tailscale_bp
|
|
from .agent_api import bp as agent_bp
|
|
for bp in (auth_bp, monitor_bp, tasks_bp, admin_bp, tools_bp,
|
|
devices_bp, apks_bp, tailscale_bp, agent_bp):
|
|
app.register_blueprint(bp)
|