29 lines
1.8 KiB
Markdown
29 lines
1.8 KiB
Markdown
# Platform Web Routes
|
|
|
|
First-party routes must be declared here before page implementation.
|
|
|
|
## Required Navigation
|
|
|
|
- `/`: 平台概览(平台管理员默认落地页).
|
|
- `/servers`: 服务器管理(服主/服务器管理员默认落地页).
|
|
- `/servers/:serverId`: 服务器详情 route(日常运维工作台:概览、日志、配置、插件控制、AI 助手、操作历史).
|
|
- `/plugins`: 插件市场.
|
|
- `/users`: 用户管理.
|
|
- `/ai-providers`: AI 提供商管理.
|
|
- `/maintenance`: 系统维护(审计事件与运行节点).
|
|
- `/plugin-pages/:pluginId/:routeKey?serverInstanceId=:serverId`: platform-hosted plugin page route with optional server context; IDs are URL encoded and the route is not shown in primary navigation.
|
|
|
|
## Role Scoping
|
|
|
|
Navigation entries are generated from the current user's capability set (`contracts/workspace.ts`):
|
|
|
|
- Platform administrators see 平台概览、服务器管理、插件市场、用户管理、AI 提供商管理、系统维护.
|
|
- Server owners and server administrators see only 服务器管理 and their server detail workspaces; unauthorized hashes redirect to the role default workspace.
|
|
- Default landing: platform administrators land on `/`, server owners/administrators land on `/servers`.
|
|
- Server creation opens inline from 服务器管理 (no separate `/servers/new` page).
|
|
|
|
Server and plugin detail flows must use routes, modals, or drawers. Do not build a fixed left-list/right-detail page.
|
|
# Server Detail lifecycle route
|
|
|
|
The `serverDetail` route owns the Client Manager workspace as an overview operations surface. It is a detail workflow, not a permanent split pane: list pages remain full-width and destructive lifecycle commands use shared confirmation dialogs. Route state does not contain component secrets or Run session material.
|