Files
model-platform/frontend/README.md
T

46 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Frontend
React Router SPA,已将原前端按功能拆分到 `app/`
```text
app/components/ 通用图标组件
app/features/platform/ 主框架、脚本工作区和 Jupyter 编辑
app/features/schedules/ DAG 调度页面
app/features/admin/ 工作台与系统管理
app/routes/ React Router 路由入口
app/services/ API 请求、DTO 和演示上下文
app/styles/ 分功能样式
```
本地开发:
```bash
pnpm install
pnpm dev
```
运维模块默认支持前端 Mock;当前本地 `frontend/.env` 已切换为后端 API
```bash
VITE_OPERATIONS_API_MODE=api
```
当前运维界面已同步对外原型 V1.11:模型大类与细分银行纵向卡片、银行/同业
双线趋势、待办/关注拆分、一屏监控明细以及监控诊断报告/历史报告汇总等最新术语。
切换后核心纵向链路会请求:
- `GET /api/v1/operations/models`
- `GET /api/v1/operations/models/{model_id}`
- `GET /api/v1/operations/models/{model_id}/monitor-results?month=YYYY-MM`
运维模块只消费登录接口返回的角色,不维护角色或权限。当前界面映射为:
- `admin` / `is_system_admin=true` → 管理员
- `developer` / `model_team` → 模型团队
- `business` / `business_team` / `biz` → 业务团队
菜单和操作按钮按登录角色适配;实际授权由独立权限模块负责。业务团队没有模型开发 Workspace 时,运维域使用“运维全局视图”,不会卡在 Workspace 加载状态。
生产构建由根目录 `nginx/Dockerfile` 完成,构建结果复制到 Nginx 静态目录。