feat(ops): 添加运维监控配置开关
- 在 .env.example 和 config.example.yaml 中添加 ops.enabled 配置项 - 默认值为 true,保持现有行为 - 当设置为 false 时,左侧栏隐藏运维监控菜单并禁用所有运维监控功能 - 修改后端 GetSettings API,让 ops_monitoring_enabled 受 config.ops.enabled 控制 - 数据清理和预聚合任务默认保持开启状态(通过运维监控设置对话框配置)
This commit is contained in:
@@ -402,7 +402,7 @@ func newContractDeps(t *testing.T) *contractDeps {
|
||||
authHandler := handler.NewAuthHandler(cfg, nil, userService, settingService, nil)
|
||||
apiKeyHandler := handler.NewAPIKeyHandler(apiKeyService)
|
||||
usageHandler := handler.NewUsageHandler(usageService, apiKeyService)
|
||||
adminSettingHandler := adminhandler.NewSettingHandler(settingService, nil, nil)
|
||||
adminSettingHandler := adminhandler.NewSettingHandler(settingService, nil, nil, nil)
|
||||
|
||||
jwtAuth := func(c *gin.Context) {
|
||||
c.Set(string(middleware.ContextKeyUser), middleware.AuthSubject{
|
||||
|
||||
Reference in New Issue
Block a user