Files
Nexus/docs/changelog/2026-06-08-servers-category-pagination-sort-deploy.md
T
Nexus Agent c435413563 feat(servers): 分类筛选/批量改分类、分页中文与列排序,脚本库按分类选机
支持 300+ 台服务器按分类浏览与批量管理,修复分页「全部」与排序;门控 Gate3 强制本地 API。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 04:30:24 +08:00

2.3 KiB
Raw Blame History

2026-06-08 — 服务器分类/分页/排序 + 脚本库选机(生产部署)

日期

2026-06-08

变更摘要

服务器列表:按分类筛选与分组视图、批量改分类、列排序修复、Vuetify 分页中文化与「全部」多页拉取;脚本库执行/临时命令改为按分类选机;新增 Excel 批量导入脚本。

动机

生产已导入 300+ 台服务器,需按业务分类浏览、批量调整分类,并在脚本库按分类勾选目标机;原分页「全部」无效、排序箭头无响应、分页文案为英文。

涉及文件

文件 说明
server/infrastructure/database/server_repo.py uncategorized 筛选;update_category_batch()target_path 可排序
server/api/servers.py POST /api/servers/batch/category
server/api/schemas.py BatchCategoryUpdate / BatchCategoryResult
server/application/services/credential_poller.py 批量添加支持 名称<TAB>IP
frontend/src/pages/ServersPage.vue 分类 Chip、列表/分类视图、批量改分类、排序
frontend/src/pages/ScriptsPage.vue ServerCategoryPicker 选机
frontend/src/composables/useServerCategories.ts 分类列表与计数
frontend/src/composables/useServerPagination.ts 分类筛选、sort_by/sort_order
frontend/src/composables/useServerList.ts loadServers({ all: true })
frontend/src/components/servers/ServerCategoryPicker.vue 可复用按分类选择器
frontend/src/constants/dataTable.ts 分页选项含「全部」(-1)
frontend/src/utils/paginatedFetch.ts -1 时多页拉取
frontend/src/utils/serverTableSort.ts 列 key → API 字段映射
frontend/src/plugins/vuetify.ts 全局 zhHans
scripts/import_servers_from_xls.py Excel 批量导入(add-by-ip
tests/test_credential_poller.py 批量名称解析用例

是否需迁移

是否需重启

是(后端 API);前端需 vite build 后随 Docker 镜像部署

验证方式

  1. pytest tests/test_credential_poller.py
  2. bash deploy/pre_deploy_check.shGate 17
  3. 生产 #/servers:分类筛选、分组、批量改分类、列排序、分页「全部」
  4. 生产 #/scripts:按分类选机执行脚本
  5. curl https://api.synaglobal.vip/healthok/app/ → 200