Add test/prod environments for databases
- Migration 010: test_* columns on databases table, environment column on request_logs - DatabasePoolManager: dual-pool strategy (prod + test), getPool(id, env) with fallback - All executors (SQL, Script, AQL): environment param threaded through execution paths - dynamicApiController: X-Environment header detection, environment in logging - databaseManagementController: CRUD for test credentials, testConnection with ?env=test - Frontend: test env form in DatabaseModal, env toggle in EndpointEditor test panel Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -86,8 +86,8 @@ export const dbManagementApi = {
|
||||
delete: (id: string) =>
|
||||
api.delete(`/db-management/${id}`),
|
||||
|
||||
test: (id: string) =>
|
||||
api.get<{ success: boolean; message: string }>(`/db-management/${id}/test`),
|
||||
test: (id: string, env?: 'prod' | 'test') =>
|
||||
api.get<{ success: boolean; message: string }>(`/db-management/${id}/test${env === 'test' ? '?env=test' : ''}`),
|
||||
};
|
||||
|
||||
// Endpoints API
|
||||
@@ -120,6 +120,7 @@ export const endpointsApi = {
|
||||
aql_endpoint?: string;
|
||||
aql_body?: string;
|
||||
aql_query_params?: Record<string, string>;
|
||||
environment?: 'prod' | 'test';
|
||||
}) =>
|
||||
api.post<QueryTestResult>('/endpoints/test', data),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user