feat: agent avatars, task tags, search, edit/delete agents, cron readability, timezone fix

- Agent avatars: first-letter + deterministic color avatar in all views
- Agent management: edit (name/description) and delete with confirmation
- Execution API: validates agent existence, returns 410 if deleted
- Task tags: JSON array field, editable with tag pills UI
- Task search: by name (?q=) and by tags (?tags=) and by status
- Task edit: simplified to name/tags/description only (not agent params)
- Cron display: human-readable Chinese (e.g. '每5分钟', '每天 09:00')
- Timezone fix: UTC→local via dayjs.utc().local() across all pages
- Content area: full width (removed max-width:1200px constraints)
- Login page: standalone layout without sidebar
This commit is contained in:
2026-06-15 23:33:28 +08:00
parent cd41e59afc
commit b04c0ce321
18 changed files with 680 additions and 132 deletions
+3
View File
@@ -10,6 +10,7 @@ class TaskCreate(BaseModel):
description: str = Field(default="")
cron_expression: str = Field(..., max_length=64)
grace_period: int = Field(default=300, ge=0)
tags: list[str] = Field(default_factory=list)
class TaskUpdate(BaseModel):
@@ -18,6 +19,7 @@ class TaskUpdate(BaseModel):
cron_expression: str | None = None
grace_period: int | None = None
status: str | None = None # active / paused / stopped
tags: list[str] | None = None
class TaskOut(BaseModel):
@@ -29,6 +31,7 @@ class TaskOut(BaseModel):
cron_expression: str
grace_period: int
status: str
tags: list[str] = Field(default_factory=list)
last_run_at: datetime | None = None
last_run_result: str | None = None
next_run_at: datetime | None = None