Commit Graph

366 Commits

Author SHA1 Message Date
augushong
d5329cdd45 feat(nginx-log): curd 生成 raw/position 后台并改只读
- NginxAccessLog + NginxLogPosition Scheme 加 #[Component] 注解
- Scheme Table name 补 ul_ 前缀(curd 严格校验要求)
- curd 生成 nginx 模块完整后台(controller/model/view/js)
- Base/App 双层只读控制器(参照 TimerLogBase 范式)
  - AccessLogBase: add/edit/delete/modify 全部 error
  - LogPositionBase: 同上
- 视图改造:
  - access_log 裁剪到 8 列核心字段(time_local/method/uri/status/remote_addr/request_time/body_bytes_sent/http_user_agent)
  - status/request_time 自定义 badge 渲染
  - toolbar 清空 + operat 仅保留详情(B 类只读页面)
  - log_position 全字段 + 只读化
- HTTP 验证:index 200 OK + add/edit/delete/modify 全部返回错误
2026-07-28 06:21:13 +08:00
augushong
7987001cd2 feat(nginx-log): NginxLogStat dashboard 控制器(Base/App 双层,日/周/月/年聚合)
- extend/base/admin/controller/system/NginxLogStatBase.php:完整逻辑
  - @ControllerAnnotation(title=Nginx访问统计) + @NodeAnotation(title=访问统计)
  - index() 页面/接口同体:isAjax() 返回 JSON,否则 fetch()
  - period 解析:day(24h)/week(7d)/month(30d)/year(12m)/custom,invalid 自动 fallback day
  - custom start>end 自动 swap
  - 整体指标:SUM stat_hour,avg_request_time 按 PV 加权平均
  - 趋势:day 按 stat_hour 聚合补 0-23;week/month/custom 按 stat_date 补日期序列;year 按 (stat_date DIV 100) 聚合补 1-12 月
  - Top N:sysconfig('nginx_log','topn_default',10),topN=0 不截断
  - 跨周期 UV 标注:uv_is_estimate = period !== 'day'
  - 空表/空范围不崩(返回 0/[])
- app/admin/controller/system/NginxLogStat.php:App 入口,仅 extends Base

性能:stat_hour 10 万行 + period=year 服务端 < 700ms(< 2s 要求)
依赖:T1 stat 模型、T9 Aggregate;blocks:T13 视图
2026-07-28 06:17:22 +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
ceb73c750a feat(nginx-log): NginxLogAggregator 聚合 service(Base/App 双层,delete-then-insert 幂等) 2026-07-28 00:52:51 +08:00
augushong
9fe55f81bf feat(nginx-log): NginxLogReader 增量读取 service(Base/App 双层,含轮转检测) 2026-07-28 00:39:11 +08:00
augushong
7d707c2150 feat(nginx-log): NginxLogParser 解析器 service(Base/App 双层) 2026-07-28 00:38:25 +08:00
augushong
0d19881a22 feat(nginx-log): 新增 6 张表 phinx migration + Scheme + model 2026-07-28 00:03:49 +08:00
augushong
908f84ee9f refactor(timer): TimerLog 控制器迁移到 Base 层 + toolbar 与事件监听修正
控制器逻辑移入 extend/base/admin/controller/system/TimerLogBase.php,app 层改为空壳继承。index.js 补 toolbar:[] + defaultToolbar:['filter'](B 类只读页面),修正 ua.table.on → layui.table.on。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-25 22:39:53 +08:00
augushong
009647f96f refactor(timer): TimerConfig 控制器与视图迁移到 Base 层
控制器逻辑移入 extend/base/admin/controller/system/TimerConfigBase.php,app 层改为空壳继承。9 个视图文件迁移到 extend/base/admin/view/system/timer_config/。index.js 补 toolbar: ['refresh', 'export'] 声明(C 类页面,去掉默认的 add/delete)。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-25 22:39:20 +08:00
augushong
12fe271ce0 feat(timer): 编辑页并发数配置表单
edit 表单放行 concurrency 字段,空值=继承代码默认写 NULL,正整数=覆盖。前端联动提示语义。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-25 21:58:20 +08:00
augushong
41a0f99735 feat(timer): 列表页节点视角下拉与归属可视化
新增节点视角下拉(全局/指定节点),calcOwnership 计算任务归属,触发操作联动节点选择器定向 trigger_node_id,并发列双通道显示(默认/覆盖值)。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-25 21:58:07 +08:00
augushong
f13384403a feat(timer): 后台触发/编辑/节点列表控制器改造
trigger 定向 trigger_node_id 必填穿透 status;edit/modify 改 concurrency 后 Cache::inc 递增脏标记触发立即 reload(D18);hostList 返回在线节点;normalizeConcurrency 归一化入库值。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-25 21:57:56 +08:00
augushong
236a343fa9 feat(timer): 新增并发数/触发节点/触发时间三字段及幂等分发
Scheme 定义 concurrency(nullable)/trigger_node_id/last_trigger_time 三字段,Model 声明属性,v2.3.0 分发代码幂等 ALTER 保证升级自动同步。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-25 21:57:14 +08:00
augushong
387d89c596 breaking(stack): 彻底移除 stack:mode 命令(含 app/extend/base/注册) 2026-07-22 00:50:56 +08:00
augushong
600ee5b085 refactor(agents): 删除 tools:agent:publish 命令,补全 helper.php 函数覆盖机制,修正多处文档 bug
- 删除 tools:agent:publish 整套(不再兼容多套 IDE,只保留 .agents 目录)
- helper.php 全部 27 个全局函数加 if (!function_exists()) 包裹,项目侧可在 app/common.php 定义同名函数覆盖
- ulthon-file-override-mechanism.md 新增全局函数覆盖章节
- AGENTS.md 删除智能体指导章节,PHP 8+ 改为 8.0+,MySQL 8+ 改为 5.7+
- AGENTS.md 项目结构树补全 tests/、extend/think/、source/ 子项
- README.md PHP 版本统一为 8.0+
- ulthon-base-app-architecture SKILL 路径补 admin/service/ 段
- ulthon-tools-http-call SKILL 补 --page-data 参数
- ulthon-naming-convention 补元数据头
- ulthon-update-workflow 统一 extend/think/ 归类
2026-07-21 19:35:28 +08:00
augushong
3f7050bf65 feat(test): 框架测试基建基类TestCaseBase+app层入口+冒烟测试
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-18 00:12:41 +08:00
augushong
e558a97e91 fix(host): 防止主节点重复并修复 setMaster 权限
Clear all is_master flags before electing new master to prevent multiple master records. Fix setMaster annotation from @auth true to proper @NodeAnotation format so permission node is generated correctly.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-26 18:33:46 +08:00
augushong
a47bbb2c6a fix(timer): 自动记录执行日志并捕获结果
Add execute() wrapper in TimerControllerBase that wraps do() with logStart/logEnd, captures return value to result field. Change site URL routing from /do to /execute with task_name injection. Add result field to system_timer_log scheme.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-26 18:33:45 +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
90e584f5a1 feat(timer): 新增定时器配置、日志和主机的后台管理界面
T10: TimerConfig CURD - task management with run_type/status editing,
     manual trigger button, task_name read-only, no add/delete
T11: TimerLog CURD - read-only log viewer with filters and color badges
T12: Host list enhanced - is_master column, setMaster button
2026-05-26 18:33:43 +08:00
augushong
25fab093fa feat(timer): 新增 run_type 调度、host_id 投递和日志清理
T7: TimerBase shouldExecuteTask() - main/auto/all/manual/disabled modes
    with two-phase DB row lock for auto mode
T8: TimerControllerBase - host_id param, logStart/logEnd methods
    TimerServiceBase - inject host_id into site URLs
T9: TimerLogClean command - php think admin:timer:log:clean --days=30
2026-05-26 18:33:42 +08:00
augushong
abeac2c3cb feat(timer): 新增配置同步到数据库及主节点选举
T5: TimerServiceBase.syncConfigToDatabase() - syncs task config to DB
T6: HostServiceBase - auto master election, stale node detection,
    getMasterNode/setMasterNode methods
2026-05-26 18:33:41 +08:00
augushong
d719a99d14 feat(timer): 新增多节点定时器协调的 Scheme 定义 2026-05-26 18:33:41 +08:00
augushong
db057aa90e feat(stack): 切换模式时自动删除多余的管理文件
All checks were successful
build-and-deploy / 直传代码并部署到 Host15 (push) Successful in 1m0s
- 重写 getModePlan: 跳过目标模式和 default 都不存在的文件 (不再抛异常)
- 重写 applyMode: 切换模式后自动清理孤立的管理文件, 删除前备份以支持 rollback
- 修复 HOSTPORT 为 3306 (容器内部端口, 非宿主机映射端口)
- 增加 backup_id 空值保护: 无备份时不执行删除
2026-04-29 23:35:56 +08:00
augushong
b44fcfd86c feat(stack): 新增 stack 模式管理功能
- 新增 `php think admin:stack:mode` 命令,支持 list/use/current/rollback 操作
- 新增 StackModeService 服务,负责模式切换、备份与回滚逻辑
- 在 source/stack/ 目录下添加 default、full、base-build 三种模式的配置文件
- 更新 UlthonAdminService 以注册新的命令行工具
2026-04-24 23:20:13 +08:00
augushong
8cc08bcb8c feat: 发布智能体版 2026-03-26 20:22:34 +08:00
augushong
1a88ff286e feat(uniapp): 集成 Pinia 状态管理并实现用户认证流程 2026-02-01 12:01:37 +08:00
augushong
5bee1b3733 feat(console): 添加 --force-force 参数以跳过所有交互确认 2026-01-31 23:00:51 +08:00
augushong
e8f58ef322 feat(command): 新增数据库调试命令行工具集 2026-01-26 23:10:10 +08:00
augushong
6eefa1cd2e refactor(admin): 重构系统状态模块以支持模块化结构 2026-01-23 00:02:51 +08:00
augushong
3a4194d3e9 feat: 新增系统状态页面功能 2026-01-22 23:28:13 +08:00
augushong
23826cd06e refactor(scheme): 优化数据库同步逻辑并增加备份表检查 2026-01-09 22:26:34 +08:00
augushong
edeae731f0 refactor: 删除废弃的scheme类文件 2026-01-09 21:40:20 +08:00
augushong
6b4a67aeb4 feat(scheme): 新增多个数据模型类文件 2026-01-09 21:38:25 +08:00
augushong
8de6b99bb3 feat(scheme): 新增数据库表结构同步方案 2026-01-09 21:08:51 +08:00
augushong
00af0fa628 feat: 去掉控制器中的运行节点注册机制 2025-08-24 14:01:36 +08:00
augushong
a9d1429000 feat: 增加内置节点注册任务;优化定时器代码结构; 2025-08-23 23:22:52 +08:00
augushong
b1a6b37ee0 feat: 增加主机节点表结构代码 2025-08-23 22:44:47 +08:00
augushong
46722e5a66 feat: 增加主机节点服务类 2025-08-23 22:30:33 +08:00
augushong
d3e85fa552 feat: 升级权限管理模式 2025-03-20 16:57:05 +08:00
augushong
3f48492089 增加数据库的文件字段数据迁移 2024-10-25 20:47:21 +08:00
augushong
d0add06ca0 新增LoadMigrationFiles事件,支持扩展提供的数据库迁移文件 2024-10-15 18:06:25 +08:00
augushong
e53445e41c 新增通用的虚拟数据模型;新增定时任务多进程;新增多进程阻塞模式的定时器; 2024-10-04 23:03:18 +08:00
augushong
575d432982 开始演示用例页面 2024-07-07 23:29:23 +08:00
augushong
7fcfb6249d 修复事件异常错误 2024-04-01 18:39:09 +08:00
augushong
667608d233 格式化代码;新增全局数据存储工具; 2024-02-22 22:30:39 +08:00
augushong
9a7b9016e6 修复命名空间错误;发布新版本 2024-01-03 16:27:41 +08:00
augushong
e6779f4921 增加测试机制;完善DebugMysql日志逻辑;更新debug_log表字段格式;发布新版本 2024-01-03 16:22:01 +08:00