diff --git a/src/common/interfaces/antares.ts b/src/common/interfaces/antares.ts index 9bb4ed8a..bf8fd167 100644 --- a/src/common/interfaces/antares.ts +++ b/src/common/interfaces/antares.ts @@ -64,6 +64,7 @@ export interface ConnectionParams { sshKey?: string; sshPort?: number; sshPassphrase?: string; + sshKeepAliveInterval?: number; } export interface TypeInformations { diff --git a/src/main/ipc-handlers/connection.ts b/src/main/ipc-handlers/connection.ts index 318a0e6d..71732c65 100644 --- a/src/main/ipc-handlers/connection.ts +++ b/src/main/ipc-handlers/connection.ts @@ -23,6 +23,7 @@ export default (connections: {[key: string]: antares.Client}) => { port: number; privateKey: string; passphrase: string; + keepaliveInterval: number; } }; @@ -49,7 +50,8 @@ export default (connections: {[key: string]: antares.Client}) => { password: conn.sshPass, port: conn.sshPort ? conn.sshPort : 22, privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null, - passphrase: conn.sshPassphrase + passphrase: conn.sshPassphrase, + keepaliveInterval: conn.sshKeepAliveInterval ?? 30*60*1000 }; } @@ -98,6 +100,7 @@ export default (connections: {[key: string]: antares.Client}) => { port: number; privateKey: string; passphrase: string; + keepaliveInterval: number; } }; @@ -127,7 +130,8 @@ export default (connections: {[key: string]: antares.Client}) => { password: conn.sshPass, port: conn.sshPort ? conn.sshPort : 22, privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null, - passphrase: conn.sshPassphrase + passphrase: conn.sshPassphrase, + keepaliveInterval: conn.sshKeepAliveInterval ?? 30*60*1000 }; } diff --git a/src/main/libs/clients/MySQLClient.ts b/src/main/libs/clients/MySQLClient.ts index 403505e7..c4594a60 100644 --- a/src/main/libs/clients/MySQLClient.ts +++ b/src/main/libs/clients/MySQLClient.ts @@ -155,7 +155,6 @@ export class MySQLClient extends AntaresCore { this._ssh = new SSH2Promise({ ...this._params.ssh, - keepaliveInterval: 30*60*1000, debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null }); diff --git a/src/main/libs/clients/PostgreSQLClient.ts b/src/main/libs/clients/PostgreSQLClient.ts index c12762c4..3dbc4b10 100644 --- a/src/main/libs/clients/PostgreSQLClient.ts +++ b/src/main/libs/clients/PostgreSQLClient.ts @@ -167,7 +167,6 @@ export class PostgreSQLClient extends AntaresCore { try { this._ssh = new SSH2Promise({ ...this._params.ssh, - keepaliveInterval: 30*60*1000, debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null }); diff --git a/src/renderer/components/WorkspaceAddConnectionPanel.vue b/src/renderer/components/WorkspaceAddConnectionPanel.vue index da2803a6..391cd8f7 100644 --- a/src/renderer/components/WorkspaceAddConnectionPanel.vue +++ b/src/renderer/components/WorkspaceAddConnectionPanel.vue @@ -33,10 +33,10 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
@@ -187,12 +187,12 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
@@ -268,12 +268,12 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+ +
+
+ +
+
diff --git a/src/renderer/components/WorkspaceEditConnectionPanel.vue b/src/renderer/components/WorkspaceEditConnectionPanel.vue index 1943f104..fbee5212 100644 --- a/src/renderer/components/WorkspaceEditConnectionPanel.vue +++ b/src/renderer/components/WorkspaceEditConnectionPanel.vue @@ -33,10 +33,10 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
@@ -189,12 +189,12 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
@@ -270,12 +270,12 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+ +
+
+ +
+
diff --git a/src/renderer/i18n/de-DE.ts b/src/renderer/i18n/de-DE.ts index de12ddfe..b8d37ad4 100644 --- a/src/renderer/i18n/de-DE.ts +++ b/src/renderer/i18n/de-DE.ts @@ -105,7 +105,8 @@ export const deDE = { scratchpad: 'Scratchpad', array: 'Array', format: 'Formatierung', - sshTunnel: 'SSH Tunnel' + sshTunnel: 'SSH Tunnel', + keepAliveInterval: 'Keep-Alive-Intervall' }, message: { appWelcome: 'Willkommen im Antares SQL Client!', diff --git a/src/renderer/i18n/en-US.ts b/src/renderer/i18n/en-US.ts index e8aa49d5..ef24f26d 100644 --- a/src/renderer/i18n/en-US.ts +++ b/src/renderer/i18n/en-US.ts @@ -108,6 +108,7 @@ export const enUS = { changelog: 'Changelog', format: 'Format', sshTunnel: 'SSH tunnel', + keepAliveInterval: 'Keep alive interval', structure: 'Structure', small: 'Small', medium: 'Medium',