diff --git a/src/common/customizations/defaults.ts b/src/common/customizations/defaults.ts index 729f7b81..f6943ef2 100644 --- a/src/common/customizations/defaults.ts +++ b/src/common/customizations/defaults.ts @@ -19,6 +19,7 @@ export const defaults: Customizations = { sshConnection: false, fileConnection: false, cancelQueries: false, + singleConnectionMode: false, // Tools processesList: false, usersManagement: false, diff --git a/src/common/customizations/mysql.ts b/src/common/customizations/mysql.ts index e3a8f614..01e61679 100644 --- a/src/common/customizations/mysql.ts +++ b/src/common/customizations/mysql.ts @@ -29,6 +29,7 @@ export const customizations: Customizations = { sslConnection: true, sshConnection: true, cancelQueries: true, + singleConnectionMode: true, // Tools processesList: true, // Structure diff --git a/src/common/interfaces/antares.ts b/src/common/interfaces/antares.ts index 1a72af62..ab5c2cec 100644 --- a/src/common/interfaces/antares.ts +++ b/src/common/interfaces/antares.ts @@ -52,6 +52,7 @@ export interface ConnectionParams { password: string; ask: boolean; readonly: boolean; + singleConnectionMode: boolean; ssl: boolean; cert?: string; key?: string; diff --git a/src/common/interfaces/customizations.ts b/src/common/interfaces/customizations.ts index 89ebd4de..70b6be9c 100644 --- a/src/common/interfaces/customizations.ts +++ b/src/common/interfaces/customizations.ts @@ -19,6 +19,7 @@ export interface Customizations { sshConnection?: boolean; fileConnection?: boolean; cancelQueries?: boolean; + singleConnectionMode?: boolean; // Tools processesList?: boolean; usersManagement?: boolean; diff --git a/src/main/ipc-handlers/connection.ts b/src/main/ipc-handlers/connection.ts index 1b4c042b..75448b41 100644 --- a/src/main/ipc-handlers/connection.ts +++ b/src/main/ipc-handlers/connection.ts @@ -146,7 +146,7 @@ export default (connections: Record) => { uid: conn.uid, client: conn.client, params, - poolSize: 5 + poolSize: conn.singleConnectionMode ? 0 : 5 }); await connection.connect(); diff --git a/src/renderer/components/WorkspaceAddConnectionPanel.vue b/src/renderer/components/WorkspaceAddConnectionPanel.vue index 3a8f869c..d9caa4c3 100644 --- a/src/renderer/components/WorkspaceAddConnectionPanel.vue +++ b/src/renderer/components/WorkspaceAddConnectionPanel.vue @@ -163,22 +163,30 @@ > -
+
-
-
+
-
+
+
+
+ +
+
diff --git a/src/renderer/components/WorkspaceEditConnectionPanel.vue b/src/renderer/components/WorkspaceEditConnectionPanel.vue index 4a4ab1e5..4c5e3200 100644 --- a/src/renderer/components/WorkspaceEditConnectionPanel.vue +++ b/src/renderer/components/WorkspaceEditConnectionPanel.vue @@ -165,22 +165,30 @@ >
-
+
-
-
+
-
+
+
+
+ +
+
diff --git a/src/renderer/i18n/en-US.ts b/src/renderer/i18n/en-US.ts index 00e7558d..7910728c 100644 --- a/src/renderer/i18n/en-US.ts +++ b/src/renderer/i18n/en-US.ts @@ -116,7 +116,8 @@ export const enUS = { readOnlyMode: 'Read-only mode', allConnections: 'All connections', searchForConnections: 'Search for connections', - keepAliveInterval: 'Keep alive interval' + keepAliveInterval: 'Keep alive interval', + singleConnection: 'Single connection' }, database: { // Database related terms schema: 'Schema',