feat(ops): 添加运维监控配置开关
- 在 .env.example 和 config.example.yaml 中添加 ops.enabled 配置项 - 默认值为 true,保持现有行为 - 当设置为 false 时,左侧栏隐藏运维监控菜单并禁用所有运维监控功能 - 修改后端 GetSettings API,让 ops_monitoring_enabled 受 config.ops.enabled 控制 - 数据清理和预聚合任务默认保持开启状态(通过运维监控设置对话框配置)
This commit is contained in:
@@ -124,6 +124,15 @@ GEMINI_OAUTH_SCOPES=
|
||||
# GEMINI_QUOTA_POLICY={"tiers":{"LEGACY":{"pro_rpd":50,"flash_rpd":1500,"cooldown_minutes":30},"PRO":{"pro_rpd":1500,"flash_rpd":4000,"cooldown_minutes":5},"ULTRA":{"pro_rpd":2000,"flash_rpd":0,"cooldown_minutes":5}}}
|
||||
GEMINI_QUOTA_POLICY=
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Ops Monitoring Configuration (运维监控配置)
|
||||
# -----------------------------------------------------------------------------
|
||||
# Enable ops monitoring features (background jobs and APIs)
|
||||
# 是否启用运维监控功能(后台任务和接口)
|
||||
# Set to false to hide ops menu in sidebar and disable all ops features
|
||||
# 设置为 false 可在左侧栏隐藏运维监控菜单并禁用所有运维监控功能
|
||||
OPS_ENABLED=true
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Update Configuration (在线更新配置)
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -221,6 +221,19 @@ redis:
|
||||
# 数据库编号(0-15)
|
||||
db: 0
|
||||
|
||||
# =============================================================================
|
||||
# Ops Monitoring (Optional)
|
||||
# 运维监控 (可选)
|
||||
# =============================================================================
|
||||
ops:
|
||||
# Enable ops monitoring features (background jobs and APIs)
|
||||
# 是否启用运维监控功能(后台任务和接口)
|
||||
# Set to false to hide ops menu in sidebar and disable all ops features
|
||||
# 设置为 false 可在左侧栏隐藏运维监控菜单并禁用所有运维监控功能
|
||||
# Other detailed settings (cleanup, aggregation, etc.) are configured in ops settings dialog
|
||||
# 其他详细设置(数据清理、预聚合等)在运维监控设置对话框中配置
|
||||
enabled: true
|
||||
|
||||
# =============================================================================
|
||||
# JWT Configuration
|
||||
# JWT 配置
|
||||
|
||||
Reference in New Issue
Block a user