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 全部返回错误
This commit is contained in:
augushong
2026-07-28 06:21:13 +08:00
parent 7987001cd2
commit d5329cdd45
26 changed files with 1203 additions and 34 deletions

View File

@@ -5,20 +5,26 @@ namespace app\admin\model;
use app\common\model\TimeModel;
/**
* @property int $id
* @property string $file_path 日志文件绝对路径
* @property int $inode 文件 inode
* @property int $offset 字节偏移
* @property int $last_read_time 上次读取时间戳
* @property string $last_line_hash 上次最后一行 md5
* @property int $parse_fail_count 解析失败累计次数
* @property string $parse_fail_samples 解析失败样本
* @property int $create_time 创建时间戳
* @property int $update_time 更新时间戳
* @property int $id
* @property string $file_path 日志文件绝对路径
* @property int $inode 文件 inode,用于检测日志轮转
* @property int $offset 上次读取到的字节偏移
* @property int $last_read_time 上次读取时间戳
* @property string $last_line_hash 上次最后一行 md5 哈希(容错校验)
* @property int $parse_fail_count 解析失败累计次数
* @property string $parse_fail_samples 解析失败样本行(最多保留若干条)
* @property int $create_time 创建时间戳
* @property int $update_time 更新时间戳
*/
class NginxLogPosition extends TimeModel
{
protected $name = 'nginx_log_position';
protected $name = "nginx_log_position";
protected $deleteTime = false;
}