Commit Graph

21 Commits

Author SHA1 Message Date
augushong
8faa52ce90 feat(nginx-log): 多节点适配(node_id 全链路 + 全局/按节点聚合 + 节点筛选 + v2.4.0 升级脚本)
- 6 张表加 node_id 字段 + position/stat 改复合唯一键(migration)
- 6 个 Scheme 同步 node_id 注解 + 唯一键
- Reader 带 node_id 参数 + 懒加载接管(getLastPosition 回退查 node_id='')
- Aggregator 全局行(node_id='')+ 按节点循环 insertAggregatesForScope
- Stat 所有查询方法加 where node_id 条件
- Dashboard 控制器/视图加节点筛选下拉框 + AJAX 带 node_id
- AccessLog 列表加节点列 + 采集进度卡片显示节点信息
- import 定时任务 run_type 改 all(每节点采集自己的日志)
- v2.4.0 升级脚本追加 ALTER TABLE(幂等 check-then-alter)
- 菜单调整:去掉 Nginx 顶级菜单 + 读取位置管理,改为系统管理下挂两个子菜单
- ulthon-timer 文档补充 run_type=all 多节点部署注意事项
2026-08-08 10:33:20 +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
739b536f8d fix(host): Host 控制器禁用手动增删改与按钮配置修正
HostBase 补 add/edit/delete/modify 禁用方法(节点自动注册,不支持手动操作)。_common.js 的 addUrl/editUrl/deleteUrl/exportUrl/modifyUrl 改空字符串。index.js 补 toolbar: ['refresh'](C 类页面,去掉默认的 add/delete/export)。

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-25 22:40:05 +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
51d0ed7331 fix(auth): 修复角色分配用户列表layui filter传参导致参数绑定错误
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-18 21:33:33 +08:00
augushong
50cb069677 feat(auth): 角色管理新增分配用户后端方法(assignUsers+toggleUser)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-17 23:44:23 +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
6eefa1cd2e refactor(admin): 重构系统状态模块以支持模块化结构 2026-01-23 00:02:51 +08:00
augushong
35e7eb9a0e feat: 操作删除文件可直接删除实际文件 2025-08-31 11:34:56 +08:00
augushong
b1a6b37ee0 feat: 增加主机节点表结构代码 2025-08-23 22:44:47 +08:00
augushong
65e13e506a feat: 增加姓名字段;修改登录账号为可修改; 2025-03-21 14:19:04 +08:00
augushong
d3e85fa552 feat: 升级权限管理模式 2025-03-20 16:57:05 +08:00
augushong
e33863af46 refactor: 优化后台兼容接口请求的判断 2025-03-10 18:17:28 +08:00
augushong
7f92b0e07a feat: 实现后台请求兼容接口的模式 2025-03-10 18:06:51 +08:00
augushong
044d28bb93 修改配置文件设置文件大小优化 2024-10-21 11:20:25 +08:00
augushong
c79ad6b986 优化粘贴提示;优化菜单导入清空缓存 2024-10-15 16:19:38 +08:00
augushong
008e781d6b 增加菜单到导出和导入;增加粘贴全局操作;优化表单错误表现; 2024-10-15 16:06:36 +08:00
augushong
53cd57f160 给系统代码增加异常抛出 2024-03-23 16:56:49 +08:00
augushong
44edefb37b 重新修改主业务逻辑的命名规则 2023-09-23 17:48:36 +08:00
augushong
bee15dfea6 调整admin下的类库代码,将主要逻辑调整到extend下 2023-09-23 17:30:45 +08:00