diff --git a/src/common/interfaces/antares.ts b/src/common/interfaces/antares.ts index ba040b27..6855cbf7 100644 --- a/src/common/interfaces/antares.ts +++ b/src/common/interfaces/antares.ts @@ -65,6 +65,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 ccef6362..ea8a0630 100644 --- a/src/main/ipc-handlers/connection.ts +++ b/src/main/ipc-handlers/connection.ts @@ -24,6 +24,7 @@ export default (connections: {[key: string]: antares.Client}) => { port: number; privateKey: string; passphrase: string; + keepaliveInterval: number; } }; @@ -50,7 +51,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 ?? conn.sshKeepAliveInterval*1000 }; } @@ -99,6 +101,7 @@ export default (connections: {[key: string]: antares.Client}) => { port: number; privateKey: string; passphrase: string; + keepaliveInterval: number; } }; @@ -128,7 +131,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 ?? conn.sshKeepAliveInterval*1000 }; } diff --git a/src/main/libs/clients/MySQLClient.ts b/src/main/libs/clients/MySQLClient.ts index 98c3f207..03a690fb 100644 --- a/src/main/libs/clients/MySQLClient.ts +++ b/src/main/libs/clients/MySQLClient.ts @@ -156,7 +156,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 3f375329..3ca56863 100644 --- a/src/main/libs/clients/PostgreSQLClient.ts +++ b/src/main/libs/clients/PostgreSQLClient.ts @@ -168,7 +168,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 8008d6c5..129fa244 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 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+ +
+
+
+ + {{ t('general.seconds') }} +
+
+
@@ -443,8 +459,10 @@ const connection = ref({ sshHost: '', sshUser: '', sshPass: '', + sshPassphrase: null, sshKey: '', sshPort: 22, + sshKeepAliveInterval: 1800, pgConnString: '' }) as Ref; diff --git a/src/renderer/components/WorkspaceEditConnectionPanel.vue b/src/renderer/components/WorkspaceEditConnectionPanel.vue index 3455aa8f..2ff18231 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 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+ +
+
+
+ + {{ t('general.seconds') }} +
+
+
diff --git a/src/renderer/i18n/de-DE.ts b/src/renderer/i18n/de-DE.ts index e4e00ce7..6feea442 100644 --- a/src/renderer/i18n/de-DE.ts +++ b/src/renderer/i18n/de-DE.ts @@ -67,7 +67,8 @@ export const deDE = { deleteConnection: 'Verbindung löschen', connectionSuccessfullyMade: 'Verbindung erfolgreich erstellt!', enableSsl: 'Aktiviere SSL', - enableSsh: 'Aktiviere SSH' + enableSsh: 'Aktiviere SSH', + keepAliveInterval: 'Keep-Alive-Intervall' }, database: { schema: 'Schema', diff --git a/src/renderer/i18n/en-US.ts b/src/renderer/i18n/en-US.ts index c46b1b3e..04a34e55 100644 --- a/src/renderer/i18n/en-US.ts +++ b/src/renderer/i18n/en-US.ts @@ -100,7 +100,8 @@ export const enUS = { connectionSuccessfullyMade: 'Connection successfully made!', readOnlyMode: 'Read-only mode', allConnections: 'All connections', - searchForConnections: 'Search for connections' + searchForConnections: 'Search for connections', + keepAliveInterval: 'Keep alive interval' }, database: { // Database related terms schema: 'Schema',