1.1 KiB
1.1 KiB
Data Model: Fix UI Styling, WebSocket Port Mismatch, and URL Validation
Entities
ServiceConnection
Represents the configuration for an external service.
| Field | Type | Description | Validation |
|---|---|---|---|
base_url |
AnyHttpUrl |
The base URL of the service. | Normalized to include /api/v1 if missing. |
name |
string |
Friendly name for the connection. | Required. |
status |
string |
Connection status (connected, failed, etc.). | Read-only. |
TaskLogMessage
The structure of messages sent over the WebSocket for real-time logs.
| Field | Type | Description |
|---|---|---|
task_id |
string |
Unique identifier for the task. |
message |
string |
The log message text. |
timestamp |
datetime |
When the log was generated. |
level |
string |
Log level (INFO, ERROR, etc.). |
State Transitions
Connection Validation
- User inputs
base_url. - System validates URL format.
- System checks for
/api/v1suffix. - If missing, system appends
/api/v1. - System attempts connection and updates
status.