diff --git a/docs/changelog/2026-06-21-btpanel-deploy.md b/docs/changelog/2026-06-21-btpanel-deploy.md index 782d73cc..506392a7 100644 --- a/docs/changelog/2026-06-21-btpanel-deploy.md +++ b/docs/changelog/2026-06-21-btpanel-deploy.md @@ -4,7 +4,9 @@ ## 摘要 -将 commit `82426b19`(独立宝塔模块 + SSH 自动获取 API)部署至生产 `api.synaglobal.vip`。 +将 `82426b19` + `d00294c8`(独立宝塔模块 + SSH 自动获取 API)部署至生产 `api.synaglobal.vip`。 + +**部署结果(2026-06-21)**:Gitea push → 生产 `git reset --hard origin/main` → `nexus-1panel.sh upgrade` 成功;容器 `nexus-prod-nexus-1` healthy;`/health` ok;容器内注册 28 条 `/api/btpanel/*` 路由。 ## 变更范围 diff --git a/docs/changelog/2026-06-21-btpanel-server-list-login.md b/docs/changelog/2026-06-21-btpanel-server-list-login.md new file mode 100644 index 00000000..53c1ce65 --- /dev/null +++ b/docs/changelog/2026-06-21-btpanel-server-list-login.md @@ -0,0 +1,29 @@ +# Changelog — 宝塔入口改为服务器列表(2026-06-21) + +**日期**:2026-06-21 + +## 摘要 + +将「宝塔 · 面板登录」从单台下拉选择改为主入口**服务器列表**,侧栏首项更名为「服务器列表」。 + +## 动机 + +- 2000+ 子机需一览配置状态与一键登录,单台 picker 不符合运维习惯 +- 与 Nexus 服务器列表心智一致:先选机再操作 + +## 涉及文件 + +- `frontend/src/pages/btpanel/BtPanelLoginPage.vue` — `v-data-table` 全量列表 + 搜索 + 行内「一键登录」 +- `frontend/src/App.vue` — 侧栏文案与图标 +- `frontend/src/router/index.ts` — `/btpanel/servers` 重定向至 `/btpanel/login` + +## 迁移 / 重启 + +- 仅前端;`vite build` 或 Docker upgrade 后生效 + +## 验证 + +```bash +cd frontend && npx vite build +# 登录 → 宝塔面板 → 服务器列表 → 表格展示全部服务器 → 行内一键登录 +``` diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 90968184..45577995 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -394,7 +394,7 @@ const sysItems = [ ] const btPanelItems = [ - { to: '/btpanel/login', title: '面板登录', icon: 'mdi-login' }, + { to: '/btpanel/login', title: '服务器列表', icon: 'mdi-server' }, { to: '/btpanel/monitor', title: '系统监控', icon: 'mdi-speedometer' }, { to: '/btpanel/sites', title: '网站列表', icon: 'mdi-web' }, { to: '/btpanel/sites/create', title: '创建网站', icon: 'mdi-web-plus' }, diff --git a/frontend/src/pages/btpanel/BtPanelLoginPage.vue b/frontend/src/pages/btpanel/BtPanelLoginPage.vue index ff08605a..834100fe 100644 --- a/frontend/src/pages/btpanel/BtPanelLoginPage.vue +++ b/frontend/src/pages/btpanel/BtPanelLoginPage.vue @@ -1,37 +1,141 @@ - - - - - - {{ server.configured ? 'API 已配置' : '未配置 API,将尝试 SSH 生成链接' }} - - - - 一键登录宝塔 - - 连接配置 - - - 链接约 3 小时内有效、一次性使用。请确保本机浏览器能访问该服务器面板端口。 - - - - - + + + + 宝塔 · 服务器列表 + + 选择服务器一键打开宝塔面板(临时链接约 3 小时有效) + + + + + + + + + + {{ item.configured ? 'API 已配置' : '未配置' }} + + + + + {{ bootstrapLabel(item.bootstrap_state) }} + + — + + + + {{ item.base_url || '—' }} + + + + + 一键登录 + + + 连接配置 + + + + diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 2110322c..8db445fa 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -23,6 +23,7 @@ const routes = [ { path: '/login', name: 'Login', component: () => import('@/pages/LoginPage.vue'), meta: { public: true } }, // ── 宝塔面板(独立模块,不与运维页合并)── { path: '/btpanel/login', name: 'BtPanelLogin', component: () => import('@/pages/btpanel/BtPanelLoginPage.vue') }, + { path: '/btpanel/servers', redirect: '/btpanel/login' }, { path: '/btpanel/monitor', name: 'BtPanelMonitor', component: () => import('@/pages/btpanel/BtPanelMonitorPage.vue') }, { path: '/btpanel/sites', name: 'BtPanelSites', component: () => import('@/pages/btpanel/BtPanelSitesPage.vue') }, { path: '/btpanel/sites/create', name: 'BtPanelSiteCreate', component: () => import('@/pages/btpanel/BtPanelSiteCreatePage.vue') },
- 链接约 3 小时内有效、一次性使用。请确保本机浏览器能访问该服务器面板端口。 -
+ 选择服务器一键打开宝塔面板(临时链接约 3 小时有效) +