Add test connection feature for database targets

This commit introduces a new endpoint to test database connection. The frontend now includes a button to test the connection before creating a target, with real-time feedback on success or failure. Related styles and components were updated for better user experience.
This commit is contained in:
2026-02-12 11:56:32 +01:00
parent 2f5529a93a
commit 3e025bcf1b
4 changed files with 117 additions and 5 deletions

View File

@@ -16,6 +16,15 @@ class TargetCreate(TargetBase):
password: str
class TargetConnectionTestRequest(BaseModel):
host: str
port: int = 5432
dbname: str
username: str
password: str
sslmode: str = "prefer"
class TargetUpdate(BaseModel):
name: str | None = None
host: str | None = None