chore: update ji local changes
- frontend: scheduled tasks pages, system-settings api, workspace nav menu - backend: system_settings router, app_config, log_system_config, config.yaml Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
aeef1dca59
commit
925675ab54
11 files changed
+172
-34
No files matched your search
@@ -509,6 +509,8 @@ Per-user runtime overrides (whitelisted fields) live at `{base_dir}/users/{user_
|
||||
|
||||
Both endpoints are whitelisted in `auth_middleware._PUBLIC_EXACT_PATHS`. The shared `_get_or_create_user_by_username()` helper (in `routers/auth.py`) backs both `/login/username` and `/login/token`.
|
||||
|
||||
- `log_system` - Admin-only external log-system entry (`deerflow/config/log_system_config.py`): `{enabled, url, label}`. Surfaced read-only by `GET /api/system-settings/log-system` (admin only); the frontend renders it as a "日志系统" item in the bottom-right settings menu (`workspace-nav-menu.tsx`) that opens `url` in a new tab. Disabled by default.
|
||||
|
||||
**`extensions_config.json`**:
|
||||
- `mcpServers` - Map of server name → config (enabled, type, command, args, env, url, headers, oauth, description)
|
||||
- `skills` - Map of skill name → state (enabled)
|
||||
|
||||
@@ -10,6 +10,7 @@ from pydantic import BaseModel, Field
|
||||
|
||||
from app.gateway.auth.password import hash_password_async
|
||||
from app.gateway.deps import get_optional_user_from_request
|
||||
from deerflow.config import get_app_config
|
||||
from deerflow.config.system_settings import (
|
||||
PromptPrefixSettings,
|
||||
SystemSettings,
|
||||
@@ -200,3 +201,23 @@ async def update_appearance_settings(
|
||||
else:
|
||||
saved = current
|
||||
return AppearanceResponse(default_theme=saved.appearance.default_theme)
|
||||
|
||||
|
||||
class LogSystemResponse(BaseModel):
|
||||
"""External log-system entry shown in the admin settings menu.
|
||||
|
||||
Sourced from ``config.yaml`` (``log_system`` section), so it is read-only
|
||||
here — there is no PUT counterpart.
|
||||
"""
|
||||
|
||||
enabled: bool = Field(..., description="Whether the entry is shown in the settings menu")
|
||||
url: str = Field(..., description="External log-system URL opened in a new tab")
|
||||
label: str = Field(..., description="Menu label shown for the entry")
|
||||
|
||||
|
||||
@router.get("/log-system", response_model=LogSystemResponse)
|
||||
async def get_log_system(request: Request) -> LogSystemResponse:
|
||||
"""Return the admin-configured external log-system link from config.yaml. Admin only."""
|
||||
await _require_admin(request)
|
||||
cfg = get_app_config().log_system
|
||||
return LogSystemResponse(enabled=cfg.enabled, url=cfg.url, label=cfg.label)
|
||||
@@ -208,6 +208,13 @@ auth_login:
|
||||
verify_ssl: false
|
||||
ca_cert_path: "" # 可选:PEM 格式 CA 包路径,设置后优先生效并启用校验
|
||||
|
||||
# 日志系统入口(仅管理员可见):右下角「设置」菜单中会多出一个「日志系统」入口,
|
||||
# 点击后在新标签页打开下面的 url。enabled 关掉则不显示该入口。
|
||||
log_system:
|
||||
enabled: true
|
||||
url: "https://your-log-system.example.com"
|
||||
label: "日志系统"
|
||||
|
||||
database:
|
||||
backend: sqlite
|
||||
sqlite_dir: .deer-flow/data
|
||||
|
||||
@@ -15,6 +15,7 @@ from deerflow.config.database_config import DatabaseConfig
|
||||
from deerflow.config.extensions_config import ExtensionsConfig
|
||||
from deerflow.config.gateway_config import GatewayConfig
|
||||
from deerflow.config.guardrails_config import GuardrailsConfig, load_guardrails_config_from_dict
|
||||
from deerflow.config.log_system_config import LogSystemConfig
|
||||
from deerflow.config.login_config import AuthLoginConfig
|
||||
from deerflow.config.memory_config import MemoryConfig, load_memory_config_from_dict
|
||||
from deerflow.config.model_config import ModelConfig
|
||||
@@ -108,6 +109,7 @@ class AppConfig(BaseModel):
|
||||
models: list[ModelConfig] = Field(default_factory=list, description="Available models")
|
||||
vision: VisionConfig = Field(default_factory=VisionConfig, description="Image recognition (识图) configuration")
|
||||
auth_login: AuthLoginConfig = Field(default_factory=AuthLoginConfig, description="Custom login modes (username password gate, token exchange)")
|
||||
log_system: LogSystemConfig = Field(default_factory=LogSystemConfig, description="Admin-only external log-system entry shown in the settings menu")
|
||||
sandbox: SandboxConfig = Field(description="Sandbox configuration")
|
||||
tools: list[ToolConfig] = Field(default_factory=list, description="Available tools")
|
||||
tool_groups: list[ToolGroupConfig] = Field(default_factory=list, description="Available tool groups")
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
"""Configuration for the admin-only external log-system entry.
|
||||
|
||||
A small read-only section in ``config.yaml`` that lets a deployment point the
|
||||
"日志系统" entry (shown in the bottom-right settings menu for admins) at an
|
||||
external log/observability system. The URL is opened in a new browser tab.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class LogSystemConfig(BaseModel):
|
||||
"""External log-system link surfaced in the admin settings menu."""
|
||||
|
||||
enabled: bool = Field(default=False, description="Whether the log-system entry is shown in the settings menu")
|
||||
url: str = Field(default="", description="External log-system URL opened in a new tab when the entry is clicked")
|
||||
label: str = Field(default="日志系统", description="Menu label shown for the entry")
|
||||
@@ -163,6 +163,12 @@ auth_login:
|
||||
# 永远 401。此处 uat 域名按自签处理,先关校验;生产请置 true 或配 ca_cert_path。
|
||||
verify_ssl: false
|
||||
ca_cert_path: "" # 可选:PEM 格式 CA 包路径,设置后优先生效并启用校验
|
||||
# 日志系统入口(仅管理员可见):右下角「设置」菜单中会多出一个「日志系统」入口,
|
||||
# 点击后在新标签页打开下面的 url。enabled 关掉则不显示该入口。
|
||||
log_system:
|
||||
enabled: true
|
||||
url: "https://your-log-system.example.com"
|
||||
label: "日志系统"
|
||||
database:
|
||||
backend: mysql
|
||||
mysql_url: $MYSQL_DATABASE_URL
|
||||
|
||||
Reference in new issue
Block a user