Files

31 lines
1.8 KiB
Markdown
Raw Permalink 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.
# web/admin — iAOP 管理控制台
issue #135 / PRD 8.1/8.2。纯静态单页(无构建链):
模型管理 / 知识库管理 / 告警确认 / 审计查询。
## 使用
```bash
# 从 web/ 根目录起服务(依赖 ../auth 守卫与 ../chat/citations.json、
# ../cockpit/plans/alarm_panel.ti.json 相对路径)
cd web && python -m http.server 8084
# 打开 http://127.0.0.1:8084/admin/index.html
```
加载到 `../auth/auth.js` 时强制登录(未登录跳登录页);纯静态独立运行时降级免登录演示。
## 页面与后端语义对齐
| 页签 | 能力 | 对齐 |
|------|------|------|
| 模型管理 | 模板列表、版本/阶段视图(dev/staging/prod 徽标)、注册新版本(semver 递增校验)、promote 逐级提升、rollback 回退、全程审计 | `core/model-framework/template_registry.py`(Stage/next_stage/_log) |
| 知识库管理 | 文档列表(标题/来源/章节数/索引状态)、上传并索引(浏览器端)、来源引用查看 | `core/rag-kb/` 文档资产 + `web/chat/citations.json` 编译产物 |
| 告警确认 | 告警列表(P0/P1/P2 配色取自 `alarm_panel.ti.json`)、详情(LLM 解释 + SOP)、状态机 待处理→已确认→已闭环(P0 先确认后闭环) | PRD 8.1 Alert 状态机、`alert_rules.py` severity、`alarm_config.py` 配色 |
| 审计查询 | 统一审计日志(时间/操作者/动作/资源/原因)、关键词+动作筛选、导出 JSON | `template_registry._log` / `prompts.drain_audit` 风格(#134 UserStore 审计) |
## 边界
数据持久化在 localStorage(Demo 级;模型/告警含 Ti 示例种子数据);
后端 HTTP 服务就绪后替换各 Store 读写即可,页面结构不变。
LLM 解释直连推理服务 `http://39.101.182.167:30800/v1/chat/completions`。