Commit Graph

12 Commits

Author SHA1 Message Date
augushong
f1a2e8fd5d fix(nginx-log): service 文件加 Service 后缀(命名规范合规)
F2 Code quality review 发现:3 个新增 service 未遵守
.agents/rules/ulthon-naming-convention.md 第 19 行规定
(service 模块文件名需带 Service 后缀)。

变更:
- 重命名 6 个文件(3 Base + 3 App):
  NginxLogParser(Base)→NginxLogParserService(Base)
  NginxLogReader(Base)→NginxLogReaderService(Base)
  NginxLogAggregator(Base)→NginxLogAggregatorService(Base)
- 同步类名、use、类型 hint、new 引用
- NginxLogReaderServiceBase 异常消息前缀同步加 Service
- controller Base 引用更新(NginxLogImportBase / NginxLogStatAggregateBase)

验证:
- php -l 全部 8 个文件语法通过
- grep 残留旧名 = 0 结果(24 处引用全部带 Service 后缀)
2026-07-28 06:57:13 +08:00
augushong
0f9f12174c test(nginx-log): 权限节点扫描 + 端到端 QA 验证 + curd 路径修复
- 跑 admin:permission:nodes 扫描 138 个权限节点(17 个 nginx 相关节点)

- 17 个 nginx 节点 assign 给 role-id=1(写入 ul_system_auth_node 满足 plan 验收)

- curd 路径修复:菜单 href 由 system.nginx_access_log/index 改为 nginx.access_log/index(匹配 curd 生成的实际 URL,方案 B)

  - SystemMenu.php / v2.4.0.php / DB ul_system_menu 三处同步(含 id=303 log_position)

  - dashboard id=301 system.nginx_log_stat/index 保持不变(控制器确实在 system 模块)

- 端到端 QA 全通过:100 行日志 → import 74 行(静态过滤)→ aggregate stat_hour=1/url=6 → dashboard 数据完整

- 修复 T10 遗留 bug:cleanStatTables 用 Unix 时间戳当阈值,与 stat_date YYYYMMDD 不匹配导致误删

  - threshold 从 strtotime('today')-days*86400 改为 (int) date('Ymd', strtotime('today')-days*86400)

  - 验证:366 天前 stat 数据被删,今天 stat 数据保留

- 权限隔离:超管可访问,未登录被拦(code=40101 请先登录后台)

- Evidence: .omo/evidence/task-16-nginx-log-analytics-e2e/(15 个文件)
2026-07-28 06:47:24 +08:00
augushong
2b677c6f89 feat(nginx-log): NginxLogStatAggregate 定时任务 + timer config 注册 2026-07-28 06:02:07 +08:00
augushong
8eaa672ed6 feat(nginx-log): NginxLogClean 定时任务 + timer config 注册(完成 3 个 nginx 任务) 2026-07-28 06:00:15 +08:00
augushong
13b1313e92 feat(nginx-log): NginxLogImport 定时任务 + timer config 注册(Base/App 双层) 2026-07-28 05:48:46 +08:00
augushong
afd614e563 feat(timer): ClearLog 清理天数改为从配置读取,支持 env 覆盖
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-01 20:28:25 +08:00
augushong
e1bf94a55e feat(timer): 新增日志每日自动清理定时任务
- New LogClean timer controller (site type, frequency 86400s)
- run_type defaults to auto, only one node cleans per day
- Cleans system_timer_log records older than 30 days
2026-05-26 18:33:45 +08:00
augushong
00af0fa628 feat: 去掉控制器中的运行节点注册机制 2025-08-24 14:01:36 +08:00
augushong
dea794d058 feat: 增加call类型的定时任务; 2025-08-24 14:00:20 +08:00
augushong
a9d1429000 feat: 增加内置节点注册任务;优化定时器代码结构; 2025-08-23 23:22:52 +08:00
augushong
c0b5880ae1 增加docker配置;修复重置命令错误;优化timer请求机制支持本地 2024-04-07 13:47:52 +08:00
augushong
6195ac6be5 将所有主要逻辑代码迁移到extend中,并在service中注册调用; 2023-10-18 16:32:28 +08:00