refactor: 整体迁移控制面至MySQL + 替换UI框架为Element Plus

1. 移除naive-ui依赖,迁移前端至Element Plus
2. 重构后端数据库层,切换为MySQL替代SQLite
3. 调整项目部署架构,停止exe打包改为源码部署
4. 新增设备上报接口与相关数据库模型
5. 优化配置路径与SQL语法,替换为MySQL占位符格式
6. 调整站点名称与文案,统一为「37du 插件管理平台」
7. 新增SQLite到MySQL迁移脚本
This commit is contained in:
2026-09-16 15:58:45 +08:00
parent 4363116e31
commit 84d3e103ec
54 changed files with 5542 additions and 1890 deletions
+6 -1
View File
@@ -9,7 +9,7 @@ from webhost.backend import config
from webhost.backend import state as _st
from webhost.backend import meta as _meta
from webhost.backend.plugins import PLUGINS, load_plugins
from webhost.backend.core.plugin_sync import sync_plugins
from webhost.backend.core.plugin_sync import sync_plugins, _cloud_plugin_manifest
from webhost.backend.core import shell_updater as _shell_updater
from webhost.backend.core.session import _require_login, _sess_account
@@ -53,6 +53,11 @@ def plugins_sync(request: Request) -> dict:
account = _require_login(request)
result = sync_plugins(account)
try:
# 以「登录账号的授权插件集」作为加载白名单(替代启动时 CONTROLPLANE_ACCOUNT 的固定白名单),
# 保证给员工账号授权插件后登录即可见/可运行;控制面不可达(manifest=None)时保持原白名单。
manifest = _cloud_plugin_manifest(account)
if manifest is not None:
_st.set_allowed({p.get("id") for p in manifest})
load_plugins(_st.ALLOWED, reload=True)
except Exception as _exc: # noqa: BLE001 重载失败不阻断返回
import logging