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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user