feat: 工具配置增强、站点拨测与日志中心多项改进
- 工具配置:新增卸载 API/UI、Go 工具链、流水线构建自动安装依赖 - 修复 ListTools VerifyTool 递归栈溢出导致获取工具配置失败 - Node.js Alpine 安装改用 unofficial-builds musl 预编译包与 index.json 解析 LTS - 站点拨测:详情页路由、告警自动恢复、并发拨测与默认可观测频率 - 日志中心:RBAC、查询构建器、ES/Loki 增强与审计 request/response 展示 - 发布配置:构建节点、流水线远程执行、Deploy RBAC 导航拆分
This commit is contained in:
1 parent
cde7bbe540
commit
7e1c8f583c
84 files changed
+7729
-1507
No files matched your search
@@ -99,6 +99,7 @@ func AutoMigrate(db *gorm.DB) error {
|
||||
&model.MetricData{},
|
||||
&model.Pipeline{},
|
||||
&model.PipelineRun{},
|
||||
&model.BuildNode{},
|
||||
&model.AppRelease{},
|
||||
&model.CronJob{},
|
||||
&model.Script{},
|
||||
@@ -157,6 +158,9 @@ func AutoMigrate(db *gorm.DB) error {
|
||||
&model.DeployUserGroupMember{}, // 用户组成员 // Logan.Li
|
||||
&model.ItemRole{}, // Jenkins-style Item Role (regex pipeline matching) // Logan.Li
|
||||
&model.UserItemRole{}, // User ↔ ItemRole association // Logan.Li
|
||||
&model.LogScopeRole{}, // 日志查询范围权限(正则匹配索引/Label)// Logan.Li
|
||||
&model.UserLogScopeRole{}, // 用户 ↔ 日志范围权限 // Logan.Li
|
||||
&model.BuildMasterConfig{}, // Master 构建节点并发配置 // Logan.Li
|
||||
&model.DeployTool{}, // 工具配置(懒加载/预装/禁用) // Logan.Li
|
||||
&model.AlertCondition{}, // 告警条件 // Logan.Li
|
||||
&model.AlertNotifyTemplate{}, // 告警通知模板 // Logan.Li
|
||||
@@ -216,4 +220,15 @@ func applySchemaPatches(db *gorm.DB) {
|
||||
patchLogDSColumn("AuthType", "auth_type")
|
||||
patchLogDSColumn("Token", "token")
|
||||
patchLogDSColumn("Headers", "headers")
|
||||
|
||||
// 日志权限关联表:AutoMigrate 在 MySQL 索引冲突时可能只创建策略表未创建用户关联表 // Logan.Li
|
||||
ensureTable := func(tbl interface{}, name string) {
|
||||
if !m.HasTable(tbl) {
|
||||
if err := db.AutoMigrate(tbl); err != nil {
|
||||
log.Printf("[DB] 补表 %s 失败: %v", name, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
ensureTable(&model.LogScopeRole{}, "monitor_log_scope_roles")
|
||||
ensureTable(&model.UserLogScopeRole{}, "monitor_user_log_scope_roles")
|
||||
}
|
||||
Reference in new issue
Block a user